FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-02-2009, 08:55 AM
Robert Bielik
 
Default Startup script woes

Ok, I think I'm going nuts. I simply want to startup a Java Service like so:

daemon --pidfile=$PIDFILE --user $USER "cd $WORKING_DIR && /usr/bin/java $DAEMON_ARGS >/dev/null 2>&1 &"

I can get it to startup alrite, but the litte "thingy" is that I have no way of getting the process ID of the
started service to put in the PIDFILE, in order for me to later on be able to stop the service.
(I can have up to 5 of these Java services running, each needing a different pidfile).

This is a BREEZE to do in Debian/Ubuntu with start-stop-daemon!

Please help!
TIA
/Rob

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 09:44 AM
Christoph Maser
 
Default Startup script woes

Am Mittwoch, den 02.12.2009, 10:55 +0100 schrieb Robert Bielik:
> Ok, I think I'm going nuts. I simply want to startup a Java Service like so:
>
> daemon --pidfile=$PIDFILE --user $USER "cd $WORKING_DIR && /usr/bin/java $DAEMON_ARGS >/dev/null 2>&1 &"
>
> I can get it to startup alrite, but the litte "thingy" is that I have no way of getting the process ID of the
> started service to put in the PIDFILE, in order for me to later on be able to stop the service.
> (I can have up to 5 of these Java services running, each needing a different pidfile).
>
> This is a BREEZE to do in Debian/Ubuntu with start-stop-daemon!
>
> Please help!
> TIA
> /Rob


We are a java shop and use an old/patched debian version of
start-stop-daamon rolled in our own rpm. It works but but one problem
whe have is when java is updated stop/restart won't work because the
inode of the process binary is changed.
Also interesting to have a look at is jsvc, we use that for tomcat and
we are quite happy with it.

Chrid


financial.com AG

Munich head office/Hauptsitz München: Maria-Probst-Str. 19 | 80939 München | Germany
Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany
Management board/Vorstand: Dr. Steffen Boehnert | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach
Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender)
Register court/Handelsregister: Munich – HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 09:55 AM
Robert Bielik
 
Default Startup script woes

Christoph Maser skrev:
> We are a java shop and use an old/patched debian version of
> start-stop-daamon rolled in our own rpm. It works but but one problem
> whe have is when java is updated stop/restart won't work because the
> inode of the process binary is changed.
> Also interesting to have a look at is jsvc, we use that for tomcat and
> we are quite happy with it.

Thnx, I remember trying jsvc for my java services before, but I failed then to get it to work
properly. But I'll try again

Regards
/Rob
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 10:00 AM
John Doe
 
Default Startup script woes

From: Robert Bielik <robert.bielik@xponaut.se>
> Ok, I think I'm going nuts. I simply want to startup a Java Service like so:
> daemon --pidfile=$PIDFILE --user $USER "cd $WORKING_DIR && /usr/bin/java
> $DAEMON_ARGS >/dev/null 2>&1 &"
> I can get it to startup alrite, but the litte "thingy" is that I have no way of
> getting the process ID of the
> started service to put in the PIDFILE, in order for me to later on be able to
> stop the service.

Try without the '='

JD



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 12:47 PM
Jeff
 
Default Startup script woes

On Wed, Dec 2, 2009 at 3:55 AM, Robert Bielik <robert.bielik@xponaut.se> wrote:
> Ok, I think I'm going nuts. I simply want to startup a Java Service like so:
>
> daemon --pidfile=$PIDFILE --user $USER "cd $WORKING_DIR && /usr/bin/java $DAEMON_ARGS >/dev/null 2>&1 &"
>
> I can get it to startup alrite, but the litte "thingy" is that I have no way of getting the process ID of the
> started service to put in the PIDFILE, in order for me to later on be able to stop the service.
> (I can have up to 5 of these Java services running, each needing a different pidfile).
>
> This is a BREEZE to do in Debian/Ubuntu with start-stop-daemon!

I use the Java Service Wrapper to run JBoss in CentOS 4. A little work
to set up, but it works great once you get it figured out. My version
is s few years old now, so I can't speak for what may have changed in
the meantime.

http://wrapper.tanukisoftware.org/doc/english/download.jsp

--
Jeff
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 12:54 PM
Les Mikesell
 
Default Startup script woes

Robert Bielik wrote:
> Ok, I think I'm going nuts. I simply want to startup a Java Service like so:
>
> daemon --pidfile=$PIDFILE --user $USER "cd $WORKING_DIR && /usr/bin/java $DAEMON_ARGS >/dev/null 2>&1 &"
>
> I can get it to startup alrite, but the litte "thingy" is that I have no way of getting the process ID of the
> started service to put in the PIDFILE, in order for me to later on be able to stop the service.
> (I can have up to 5 of these Java services running, each needing a different pidfile).
>
> This is a BREEZE to do in Debian/Ubuntu with start-stop-daemon!
>
> Please help!

The straightforward way would be to give each of your services a different name
(service-a, service-b, etc) so you would have different init file instances,
different pid file names, and can specify the appropriate arguements to each
program.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 12:56 PM
Steve Huff
 
Default Startup script woes

On Dec 2, 2009, at 8:47 AM, Jeff wrote:


I use the Java Service Wrapper to run JBoss in CentOS 4. A little work
to set up, but it works great once you get it figured out. My version
is s few years old now, so I can't speak for what may have changed in
the meantime.

http://wrapper.tanukisoftware.org/doc/english/download.jsp



this software is also available from the JPackage repository (http://jpackage.org/
) as 'tanukiwrapper'.


-steve

--
If this were played upon a stage now, I could condemn it as an
improbable fiction. - Fabian, Twelfth Night, III,v

http://five.sentenc.es

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 02:12 PM
Robert Bielik
 
Default Startup script woes

Les Mikesell skrev:
>
> The straightforward way would be to give each of your services a different name
> (service-a, service-b, etc) so you would have different init file instances,
> different pid file names, and can specify the appropriate arguements to each
> program.

Yeah, thought of doing multiple:
ln -s /usr/bin/java service_a
ln -s /usr/bin/java service_b
etc.

If the jsvc track fails, I'll fallback on this.

Thnx
/R


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-02-2009, 02:49 PM
Les Mikesell
 
Default Startup script woes

Robert Bielik wrote:
> Les Mikesell skrev:
>> The straightforward way would be to give each of your services a different name
>> (service-a, service-b, etc) so you would have different init file instances,
>> different pid file names, and can specify the appropriate arguements to each
>> program.
>
> Yeah, thought of doing multiple:
> ln -s /usr/bin/java service_a
> ln -s /usr/bin/java service_b
> etc.
>
> If the jsvc track fails, I'll fallback on this.

Don't they really need different config files for things like which port
to bind to anyway? Using different init scripts instead of links would
give you a place to specify that - or you could use the RedHat-style
scheme of extrapolating specific variable settings into files that match
the service name under /etc/sysconfig to keep local changes out of the
distributed init and config files.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org