• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Java SocketServer running as a Linux Service .exec() question  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,

I have a java socket server I wrote to allow me to keep a web clusters code base in sync. When I run the init.d script from a shell login like so



Logout and all will work fine but if the server reboots or I run the init.d using services like so



Any of the exec() commands passed to the socket server will not get executed on the linux box. I am assuming it has to do with the JVM having no real shell. If I login and run

[root@web11 www]# /etc/init.d/servermngr start ...and logout all runs nice all CVS commands are executed.

Another note when run as a service the socket server responds to status checks so it is running along with the log showing it received commands
[root@web11 ~]# tail -f /www/logs/ServerManager.log
Server Started on ip 192.168.56.151
Server Started on port 4444
MaxConnections:0
CVS Update Received: cd /www;cvs up -d htdocs/;cvs up -d phpinclude/

They just dont get executed on the OS. I get no errors in Linux or Java

Here is the init.d script



Thanks for any help
 
Eric Haskins
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the part of the java code that execs the commands


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!