GeeCON Prague 2014*
The moose likes Java in General and the fly likes Program can't create external processes when running in Windows Service Mode, please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Program can Watch "Program can New topic
Author

Program can't create external processes when running in Windows Service Mode, please help

ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216

Hello to all,

I have a RMI server application which invokes two external programs in order to complete its task. So I run two external
processes using Runtime.exec(...) and synchronize between the processes. The application has been running fine for over 8
months now but all of a sudden (last week) it broke.

When going through the logs I can see that it's failing to create the two external processes. In fact, I can see from the logs that
the program does create the first external process but the process never returns i.e it does not run the command which has been
fed into Runtime.exec(...).

Now the strange part: the program only fails when it's running as a Windows Service (java-windows-service-wrapper). I'm now running it
from the console and it's fine. It's deployed in a Windows 2003 Server box running Java 6. Has anyone ever experienced such a strange problem
and if so how can I sort it out? I'm sure that something changed in the box to bring about the problem but I just can't seem to figure out what
it is. There is also a Seagate firewall running on the box and at times it can be very hyper-sensitive. It's been installed from the beginning
when the machine was deployed and my program was working fine with it installed so I'm not suspecting the firewall yet.

Please help.


In a time of drastic change it is the learners who inherit the future. The learned usually find themselves equipped to live in a world that no longer exists.<br />Eric Hoffer
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Looks like a rights issue. What happens if you change the user that is used for running the service? Double click the service, go to the logon tab, change there.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
Thanks Rob. I will give it a go and let you know how I get on.
ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
That sorted it out Rob. Thanks very much. Now I'm confused as to why it worked fine for such a long time and then suddenly broke.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Perhaps one of your network administrators has changed some of the privileges. I know one at our company did - all of a sudden, several test servers couldn't reach each other...
ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
Thanks Rob.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Program can't create external processes when running in Windows Service Mode, please help