ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Weird behavior when running my mq client app as NT Service

Post new topic  Reply to topic
 Weird behavior when running my mq client app as NT Service « View previous topic :: View next topic » 
Author Message
Ravee
PostPosted: Tue Sep 07, 2004 12:28 pm    Post subject: Weird behavior when running my mq client app as NT Service Reply with quote

Newbie

Joined: 28 Oct 2002
Posts: 9
Location: New York, NY

Hi,
I am in the process of converting an existing legacy system which is running as an DOS application (VC++ 6.0 and MQ 5.1 client libraries) connecting to the queue on the mainframe, into a NT Based service.

The service app runs only when I am running it in debug mode. When I start my services (using control panel / net start <svcapp>), it has problem loading and initializing the app. It gives an error "Application failed to initialize 0xC0000022.

However, if I comment out MQ related code and delink the IMQ libs, it gets loaded and runs properly.

I am in a bind as not to redo whole set of classes for the implemented design and also with the time frame I am working with.

Has anybody ever had any related incidents with the imq client libs running as NT service or such error occuring in the past. If so, could you please point me in the right direction or share your experience of fixing it.

Thanks in advance for your time, it is deeply appreciated.
Ravee.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Sep 07, 2004 12:43 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What user is the service being run by?

This might be an authentication issue.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Ravee
PostPosted: Wed Sep 08, 2004 1:46 am    Post subject: Reply with quote

Newbie

Joined: 28 Oct 2002
Posts: 9
Location: New York, NY

Hi Jeff,

Sorry I forgot to mention those. The service is running in the local system account context. I tried it without and with the "Desktop Interactive" setting enabled, still got the same behavior.

Thanks
Ravee.
Back to top
View user's profile Send private message
JasonE
PostPosted: Wed Sep 08, 2004 2:24 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Is the MQ bin directory on the SYSTEM wide path (not the user one), ie can your service actually load the amq*.dll files?
Back to top
View user's profile Send private message
Ravee
PostPosted: Wed Sep 08, 2004 7:24 am    Post subject: Reply with quote

Newbie

Joined: 28 Oct 2002
Posts: 9
Location: New York, NY

Hi Jason,
The MQSeries Bin is in the SYSTEM PATH and not in the USER PATH.

Ravee.
Back to top
View user's profile Send private message
JasonE
PostPosted: Wed Sep 08, 2004 7:28 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Thoughts...
1. Try turning on trace, then net start your service - do you get a trace file created for your service app, and if so how far does it get
2. Try running regmon and filemon while net starting your service - any obvious errors listed? Check for amq* being loaded from anywhere other than the bin dir as well, in the filemon output
Back to top
View user's profile Send private message
Ravee
PostPosted: Wed Sep 08, 2004 7:47 am    Post subject: Reply with quote

Newbie

Joined: 28 Oct 2002
Posts: 9
Location: New York, NY

Jason,
I have tried the Trace, and the control didn't even hit the main. The app bummed out while loading all the dependants.

Let me try the Regmon and FileMon and will post my findings.

As far as multiple copies of amq*.dll being present on the system, I have confirmed that there is only one copy existing which is in the system path.
Back to top
View user's profile Send private message
Ravee
PostPosted: Wed Sep 08, 2004 8:40 am    Post subject: Reply with quote

Newbie

Joined: 28 Oct 2002
Posts: 9
Location: New York, NY

Jason,

The FileMon was a great Idea... Thanks a ton. Even though the MQ\Bin is in the SYSTEM PATH variable, it is not getting looked up in that folder. I think I might have to make sure of that and do a reboot and try running it again.

Will post an update as I find out why even though the control panel system applet shows the folder in the path, it is being recogonised.

Thanks again Jason and all
Ravee.
Back to top
View user's profile Send private message
JasonE
PostPosted: Wed Sep 08, 2004 8:45 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Probably you havent rebooted since installing

The env for a service comes from scm.exe (the service control manager) and this does not change its environment when the panels update the system path. Hence the **only** way to get new environment changes to impact a service is a reboot
Back to top
View user's profile Send private message
Ravee
PostPosted: Wed Sep 08, 2004 9:08 am    Post subject: Problem Solved... Many Thanks Reply with quote

Newbie

Joined: 28 Oct 2002
Posts: 9
Location: New York, NY

Jason,
You were right on the money as to the path variable. The s/w were installed long ago, but some recent installations have added much to the system path variable. My guess is it must have execeeded the max limit. So the mq bin path was not visible. I cleaned out most of the folders from the path, it started working fine.

Now I gotta get the app calling the queue and hope the MQOO_WAIT option to get a message will not block my other thread which is listening on the WinSock.

Thanks again for yours and others help
Ravee
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Weird behavior when running my mq client app as NT Service
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.