Author |
Message |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
Unable to contact agent running as a service on windows XP |
|
I installed 24x7 version 4.4 agent on an XP machine as a windows service by running the following command
C:\Program Files\24x7_Scheduler>24x7srv.exe /install pcxxxx\administrator password /agent
and got the message:
24x7 Scheduler service has been installed.
I could start the service under local administrator as well as local system account. However I am not able to connect this agent from the master running on a Windows 2003 server . However, when I run the agent by invoking agent.bat I am able to connect from the master. How can I resolve this issue?
|
|
Fri Oct 22, 2010 4:06 am |
|
 |
SysOpJ
Joined: 20 Aug 2010 Posts: 95
|
|
|
|
When you say that you could not connect to the agent, do you mean that after you configured the agent profile, the Test Connect failed in one case, but succeeded in the other?
|
|
Fri Oct 22, 2010 8:39 am |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
Yes. Test connection failed in one case and succeeded in another case.
|
|
Fri Oct 22, 2010 8:42 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
Hi,
Please check 2 things:
1. Stop the service. Enable the tracing option. Restart the service and review schedule.log and debug.log files. This is to verify that agent actually starts successful and there are no errors like post in use, file not found, evaluation expired, ...
2. If #1 is ok, on the agent computer open command line and type telnet localhost 1096 command. Do you get a blank screen, cannot connect, or something else? If you get a blank screen or something similar, the connection is ok and there must be some firewall between your master and agent systems blocking the connection.
|
|
Fri Oct 22, 2010 9:04 am |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
Opened agent in GUI mode and enabled tracing. Then emptied scheduler.log and debug.log. Started the service. I could not find any new entries in both scheduler.log and debug.log. However, when I start the agent in GUI mode using agent.bat, I can see the following in scheduler.log
22-Oct-2010 05:44:36 PM 2 null null 24x7 Scheduler 24x7 Remote Agent starting...
and the following in debug.log
2010-10-22 17:44:35,928 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - JVM version: 1.5.0_22-b03
2010-10-22 17:44:35,928 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - main(...) : start
2010-10-22 17:44:35,928 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : start
2010-10-22 17:44:36,022 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : creating business objects
2010-10-22 17:44:36,053 [main] DEBUG com.softtreetech.jscheduler.business.AbstractBusiness - System started from C:\Program Files\24x7_Scheduler\master.bat
2010-10-22 17:44:36,053 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : creating UI controller
2010-10-22 17:44:36,069 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : initializing business objects
2010-10-22 17:44:36,069 [main] DEBUG com.softtreetech.jscheduler.business.preferences.AbstractPrefDatabase - Creating backup for preferences file preferences.xml
2010-10-22 17:44:36,085 [main] DEBUG com.softtreetech.jscheduler.business.preferences.AbstractPrefDatabase - Preferences file has been copied to preferences.bak
2010-10-22 17:44:36,241 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : loading preferences
2010-10-22 17:44:36,241 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : Setting shutdown event hook
2010-10-22 17:44:36,241 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : creating user interface...
2010-10-22 17:44:36,522 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : ready to run jobs
2010-10-22 17:44:39,100 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - startup() : end
2010-10-22 17:44:39,100 [main] DEBUG com.softtreetech.jscheduler.JSchedulerStarter - main(...) : end
----------------------------------------------------------------------------------------------------------------------------------------------
When I tried to follow your step 2, I get the following message
Connecting To localhost...Could not open connection to the host, on port 1096: Connect failed
|
|
Fri Oct 22, 2010 9:49 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
I believe the agent is not really starting. Did you set your JAVA_HOME environment variable as a system-scope variable or as a user-scope variable? I suspect the Java VM is not loading (or wrong one is loading) when started as a service.
Also, what do you have in the registry in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\Services\24x7jscheduler\AppParameters value?
|
|
Fri Oct 22, 2010 10:11 am |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
I use a windows XP machine and it doesn't show the option of whether to add environment variable as system-scope or user-scope. I suspect it is system-scope variable only. I tied to start the service using an account using that i used to logging on and to start agent.bat. telnet is still not successfull. As far as registry entries are considered, I can see only
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
and none of them has AppParameters entry under 24x7jscheduler
Is it because that I am using evaluation version?
|
|
Fri Oct 22, 2010 11:02 am |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
Yes, it is system-scope variable
|
|
Fri Oct 22, 2010 1:19 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
I believe the AppParameter value should be set in this case to "agent nogui" without double quotes
|
|
Fri Oct 22, 2010 9:45 pm |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
Following is AppParameters entry value under CurrentControlSet\Services\24x7jscheduler
"C:\Program Files\Java\jre1.5.0_22\bin\java.exe" -Xms64m -Xmx96m -Xrs -jar jscheduler.jar agent nogui
I tried to run this command from CMD prompt and I am able to run it without any issue. Telent also works after I run it from comamnd propmpt. I checked the application event log and found the following error:
The description for Event ID ( 0 ) in Source ( 24x7 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Stop Reason: 267
CreateProcess failed..
|
|
Sun Oct 24, 2010 1:37 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
Could it be a permissions or file sharing issue? Some log file opened and locked in some program when the service is starting?
When you start the service, the first thing it should do is writing an event log entry to Windows application event log indicating that the service is starting and then writing a similar record to schedule.log indicating the same event. If tracing option is enabled, it should also be writing something to debug.log for the JVM version used, activating certain features, etc...
If the above is not happening, there is some configuration problem.
|
|
Sun Oct 24, 2010 11:11 am |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
I reinstalled jav run time and 24x7scheduler.
I gave full permission on c:\program files\java and c:\programfiles\24x7scheduler to the service log on account and tried to start the service. Still it throws the same error. Apart from writing the following 2 entries in application event log (as shown below) it doesnt do anything. It doesnt write anything to scheduler.log and debug.log. Do you have any idea on stop reason: 267 and createprocess failed?
The description for Event ID ( 0 ) in Source ( 24x7 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Service start requested..
The description for Event ID ( 0 ) in Source ( 24x7 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Stop Reason: 267
CreateProcess failed..
|
|
Sun Oct 24, 2010 1:55 pm |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
Will this service be only for Windows server? Can be there on Windows XP machine? The only difference I could between my windows 2003 server and windows xp machine is that windows xp machine had jdk 1.6 had been installed before installing 24x7. In the server we have only jdk 1.5.x
|
|
Mon Oct 25, 2010 6:08 am |
|
 |
iqbal
Joined: 16 Sep 2010 Posts: 56
|
|
|
|
Also, let me know whether it has something to do with license.
|
|
Mon Oct 25, 2010 7:24 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7951
|
|
|
|
Hi,
For the services, there is no difference between Windows XP and 2003.
The mention of JDK 1.6 on XP makes me think that somehow it gets in the way. When you run 24x7 as a service, some difference in environment variables or service settings makes the system invoke JDK 1.6 instead of 1.5 and that's why the service doesn't start.
By the way, you are aware that Java versions aren't fully backward or forward compatible?
24x7 requires Java 1.5, it won't run with other versions. You can have multiple Java versions on the same system, but for 24x7 you need to choose 1.5. Please verify AppParameters entry value under CurrentControlSet\Services\24x7jscheduler points to your Java 1.5 installation.
Also, I noticed in your previous post a reference to "C:\Program Files\Java\jre1.5.0_22\bin\java.exe" -Xms64m -Xmx96m -Xrs -jar jscheduler.jar agent nogui
The value of Xmx parameter should be like –Xmx256m . if you are going to run more than a dozen jobs on that system, please set it to –Xmx1024m. This parameter controls maximum amount of memory the 24x7 processes can allocate.
|
|
Mon Oct 25, 2010 8:12 am |
|
 |
|