Archived
This forum has been archived. Please start a new discussion on GitHub.
A trivial problem
in Help Center
hi,
I want to start the glacier2router as a service .
1)
\Ice-2.1.2\demo\issue\Chat4>glacier2router --install OrNot ice.config=config.glacier2
2)
\Ice-2.1.2\demo\issue\Chat4>glacier2router --start OrNot
but failed:
Service start pending.
Service failed to start.
Current state: STOPPED
Exit code: 1066
Service specific exit code: 1
Check point: 0
Wait hint: 0
What is wrong with my operations?
OS: win2K server Sp4.
Thank you very much.
OrNot
I want to start the glacier2router as a service .
1)

2)

but failed:
Service start pending.
Service failed to start.
Current state: STOPPED
Exit code: 1066
Service specific exit code: 1
Check point: 0
Wait hint: 0
What is wrong with my operations?
OS: win2K server Sp4.
Thank you very much.
OrNot
0
Comments
-
You should provide the full path to the config file, and make sure it's readable by the SYSTEM user.
Cheers,
Bernard0 -
hi, Bernard,
Do you mean:\Ice-2.1.2\demo\issue\Chat4>glacier2router --install OrNot
\\Ice-2.1.2\\demo
\\issue\\Chat4\\ice.config=config.glacier2\Ice-2.1.2\demo\issue\Chat4>glacier2router --start OrNot
but also failed.
Service start pending.
Service failed to start.
Current state: STOPPED
Exit code: 1066
Service specific exit code: 1
Check point: 0
Wait hint: 0
I can start it as a common application so I think the confing file is readable , isn't it?0 -
Hi,
You need to check the configuration file permissions to ensure that it's readable by the SYSTEM user. You should also check the Windows event log with the Event Viewer application. It might contain some information on the reasons why the service isn't starting.
Benoit.0 -
hi,
I have checked the config file permissions and make sure that it is readable to administrator(I always log into my pc with Administrator and never changed the file perperties since it was downloaded. Any special considerations are needed?)
The event log:
Event source: Service Control Manager
event ID: 7024
User: N/A
Description: The OrNot service terminated with service-specific error 1.
BTW: If I run it as a common app., It works very well.\Ice-2.1.2\demo\issue\Chat4>glacier2router --Ice.Config=config.glacier2
Thanks .
OrNot0 -
Did you also check the "Application" log in the event viewer? There should be more information there about the error.
Also note that the local system account doesn't have the same rights as an administrator, it might not be able to read the config file even if you can as an administrator. Did you try to grant read access to everyone on the configuration file? You can do this with the command line (or the Windows GUI):C:\> cacls config.glacier2 /G Everyone:R
I was able to run the Glacier2 router as a service using the configuration from the chat application from the Issue 4 of the newsletter. I had to do the following:- Start IceStorm
- Start the chat server
- Edit config.glacier2 and change the IceSSL.Client.CertPath and IceSSL.Server.CertPath properties to "C:\Ice-2.1.2\certs" (full paths)
- Ensure that the "config.glacier2" file was readable by the local system account by giving it read access to everyone with "cacls config.glacier2 /G Everyone:R"
- Register the Glacier2 service with "glacier2router --install Glacier2 --Ice.Config=C:\Ice-2.1.2\demo\chat\config.glacier2"
- Start the Glacier2 service with "glacier2router --start Glacier2"
Hope this helps!
Benoit.0 -
Thank you Benoit. The problems have been resolved following your steps. In comparison with your steps, an once not noticed error was :
glacier2router --install OrNot\\Ice-2.1.2\\demo
\\issue\\Chat4\\ice.config=config.glacier2
should be:
glacier2router --install OrNot --ice.config=D:\\Ice-2.1.2\\demo\\issue\\Chat4\\config.glacier2
Thank you again. Thank you for your patience. ICE is nice not only for itself but also for you and your colleagues.
Cheers
OrNot0 -
Hi, Benoit,
So sorry but I have to trouble you again.
I have written a service program and run well in the mode of the console command.But it can not be started as a service when I installed and started it. The output of the system log seems like that in my previous post in this thread. What made me confused is that there isn't any application log output therefore I can not get any hints.
Service start pending.
Service failed to start.
Current state: STOPPED
Exit code: 1066
Service specific exit code: 1
Check point: 0
Wait hint: 0
What did I neglect ? How can I debug it ?
Thank you so much.
OrNot0 -
You could add some logging to your service to see where it's failing to start. You can use the Ice logger to do this (you can get a reference on the logger with the communicator->getLogger() method). You'll also need to configure the logger to log to the system event log by setting the Ice.UseEventLog property to 1.
Hope this helps,
Benoit.0