Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ernest fakudze
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ernest fakudze
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob. I will give it a go and let you know how I get on.
 
ernest fakudze
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic