public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Starting cruisecontrol -> initscript
@ 2007-07-16 15:41 Johannes Skov Frandsen
  2007-07-16 17:01 ` Mick
  2007-07-16 23:35 ` Iain Buchanan
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Skov Frandsen @ 2007-07-16 15:41 UTC (permalink / raw
  To: gentoo-user

Hey

I don't no if this is question for the gentoo mailing list but I'll try
here first.

I'm trying to write a initscript for gentoo so cruisecontrol can start
automatically on boot.

This is my progress so far:


> > # this next comment is important, don't remove it - it has to be
> > somewhere in
> > # the init script to kill off a warning that doesn't apply to us
> > # svc_start svc_stop
> >
> > depend() {
> >         need net
> >         use dns
> > }
> >
> > start() {
> >         ebegin "Starting Cruise Control"
> >         start-stop-daemon --start --exec "$JAVA_HOME/bin/java 
> > -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
> > -Dcc.library.dir=/opt/cruisecontrol/lib -jar
> > /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
> > -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080
> > //I more or less copied this line from cruisecontrol.sh
> >         eend $?
> > }
>   
running '/etc/init.d/cruise start'  yields this response:

 * Starting Cruise Control ...
/sbin/start-stop-daemon: stat /bin/java
-Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
-Dcc.library.dir=/opt/cruisecontrol/lib -jar
/opt/cruisecontrol/lib/cruisecontrol-launcher.jar
-configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080:
No such file or directory (No such file or directory)

obviously a file could not be found, but which and why?

When I run the same command from the shell:

java
-Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
-Dcc.library.dir=/opt/cruisecontrol/lib -jar
/opt/cruisecontrol/lib/cruisecontrol-launcher.jar
-configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080

I get his output:


> > WARNING: cc.home reset to /opt/cruisecontrol
> > Classpath:
> > /opt/cruisecontrol/lib/cruisecontrol-launcher.jar:/opt/cruisecontrol/lib/xml-apis-2.8.0.jar:/opt/cruisecontrol/lib/jaxen-1.1-beta-8.jar:/opt/cruisecontrol/lib/jasper-compiler.jar:/opt/cruisecontrol/lib/cruisecontrol.jar:/opt/cruisecontrol/lib/xmlrpc-2.0.1.jar:/opt/cruisecontrol/lib/checkstyle-all-3.1.jar:/opt/cruisecontrol/lib/saxon8-dom.jar:/opt/cruisecontrol/lib/org.mortbay.jetty.jar:/opt/cruisecontrol/lib/cruisecontrol-launcher.jar:/opt/cruisecontrol/lib/comm.jar:/opt/cruisecontrol/lib/mx4j-tools.jar:/opt/cruisecontrol/lib/serializer-2.7.0.jar:/opt/cruisecontrol/lib/simian-2.2.14.jar:/opt/cruisecontrol/lib/commons-logging.jar:/opt/cruisecontrol/lib/x10.jar:/opt/cruisecontrol/lib/jasper-runtime.jar:/opt/cruisecontrol/lib/javax.servlet.jar:/opt/cruisecontrol/lib/ant.jar:/opt/cruisecontrol/lib/saxon8.jar:/opt/cruisecontrol/lib/smack.jar:/opt/cruisecontrol/lib/emma_ant.jar:/opt/cruisecontrol/lib/mx4j.jar:/opt/cruisecontrol/lib/ant-launcher.jar:/opt/cruisecontrol/lib/jdom.jar
>   
 :/opt/cruisecontrol/lib/maven-embedder-2.0.4-dep.jar:/opt/cruisecontrol/lib/xercesImpl-2.8.0.jar:/opt/cruisecontrol/lib/jakarta-oro-2.0.3.jar:/opt/cruisecontrol/lib/emma.jar:/opt/cruisecontrol/lib/fast-md5.jar:/opt/cruisecontrol/lib/commons-el.jar:/opt/cruisecontrol/lib/mx4j-remote.jar:/opt/cruisecontrol/lib/log4j.jar:/opt/cruisecontrol/lib/junit-3.8.2.jar:/opt/cruisecontrol/lib/smackx.jar:/opt/cruisecontrol/lib/activation.jar:/opt/cruisecontrol/lib/commons-net-1.1.0.jar:/opt/cruisecontrol/lib/mail.jar:/opt/cruisecontrol/lib/xml-apis-2.8.0.jar:/opt/cruisecontrol/lib/jaxen-1.1-beta-8.jar:/opt/cruisecontrol/lib/jasper-compiler.jar:/opt/cruisecontrol/lib/cruisecontrol.jar:/opt/cruisecontrol/lib/xmlrpc-2.0.1.jar:/opt/cruisecontrol/lib/checkstyle-all-3.1.jar:/opt/cruisecontrol/lib/saxon8-dom.jar:/opt/cruisecontrol/lib/org.mortbay.jetty.jar:/opt/cruisecontrol/lib/cruisecontrol-launcher.jar:/opt/cruisecontrol/lib/comm.jar:/opt/cruisecontrol/lib/mx4j-tools.jar:/opt/cruisecontrol/lib
 /serializer-2.7.0.jar:/opt/cruisecontrol/lib/simian-2.2.14.jar:/opt/cruisecontrol/lib/commons-logging.jar:/opt/cruisecontrol/lib/x10.jar:/opt/cruisecontrol/lib/jasper-runtime.jar:/opt/cruisecontrol/lib/javax.servlet.jar:/opt/cruisecontrol/lib/ant.jar:/opt/cruisecontrol/lib/saxon8.jar:/opt/cruisecontrol/lib/smack.jar:/opt/cruisecontrol/lib/emma_ant.jar:/opt/cruisecontrol/lib/mx4j.jar:/opt/cruisecontrol/lib/ant-launcher.jar:/opt/cruisecontrol/lib/jdom.jar:/opt/cruisecontrol/lib/maven-embedder-2.0.4-dep.jar:/opt/cruisecontrol/lib/xercesImpl-2.8.0.jar:/opt/cruisecontrol/lib/jakarta-oro-2.0.3.jar:/opt/cruisecontrol/lib/emma.jar:/opt/cruisecontrol/lib/fast-md5.jar:/opt/cruisecontrol/lib/commons-el.jar:/opt/cruisecontrol/lib/mx4j-remote.jar:/opt/cruisecontrol/lib/log4j.jar:/opt/cruisecontrol/lib/junit-3.8.2.jar:/opt/cruisecontrol/lib/smackx.jar:/opt/cruisecontrol/lib/activation.jar:/opt/cruisecontrol/lib/commons-net-1.1.0.jar:/opt/cruisecontrol/lib/mail.jar:/opt/sun-jdk-1.5.0.11/li
 b/tools.jar:.:/opt/cruisecontrol/

> > [cc]Jul-13 13:05:43 Main          - CruiseControl Version 2.6.1
> > Compiled on February 28 2007 0657
> > [cc]Jul-13 13:05:43 Main          - error setting config file on
> > controller
> > net.sourceforge.cruisecontrol.CruiseControlException: Config file not
> > found: /etc/init.d/config.xml
> >         at
> > net.sourceforge.cruisecontrol.CruiseControlController.setConfigFile(CruiseControlController.java:89)
> >         at
> > net.sourceforge.cruisecontrol.Main.startController(Main.java:112)
> >         at net.sourceforge.cruisecontrol.Main.start(Main.java:98)
> >         at
> > net.sourceforge.cruisecontrol.launch.Launcher.run(Launcher.java:244)
> >         at
> > net.sourceforge.cruisecontrol.launch.Launcher.main(Launcher.java:108)
> > [cc]Jul-13 13:05:43 Main          - Config file not found:
> > /etc/init.d/config.xml
>   
Any pointers or help would be greatly appreciated.

This is my first attempt on writing a initscript so bare with me if I
have missed something obvious.

-- Regards / Venlig hilsen Johannes Skov Frandsen *Address:* Egelundsvej 
18, DK-5260 Odense S *Web:* www.omesc.com | *Email:* joe@omesc.com


--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] Starting cruisecontrol -> initscript
  2007-07-16 15:41 [gentoo-user] Starting cruisecontrol -> initscript Johannes Skov Frandsen
@ 2007-07-16 17:01 ` Mick
  2007-07-16 23:35 ` Iain Buchanan
  1 sibling, 0 replies; 3+ messages in thread
From: Mick @ 2007-07-16 17:01 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

On Monday 16 July 2007 16:41, Johannes Skov Frandsen wrote:

[snip...]
> -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080:
> No such file or directory (No such file or directory)
>
> obviously a file could not be found, but which and why?

Perhaps this one:  /opt/cruisecontrol/config.xml

I wouldn't know why (I don't have java on my machines).

Someone more knowledgeable on init scripts and java should hopefully be able 
to help.
-- 
Regards,
Mick

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] Starting cruisecontrol -> initscript
  2007-07-16 15:41 [gentoo-user] Starting cruisecontrol -> initscript Johannes Skov Frandsen
  2007-07-16 17:01 ` Mick
@ 2007-07-16 23:35 ` Iain Buchanan
  1 sibling, 0 replies; 3+ messages in thread
From: Iain Buchanan @ 2007-07-16 23:35 UTC (permalink / raw
  To: gentoo-user

On Mon, 2007-07-16 at 17:41 +0200, Johannes Skov Frandsen wrote:
> Hey
> 
> I don't no if this is question for the gentoo mailing list but I'll try
> here first.
> 
> I'm trying to write a initscript for gentoo so cruisecontrol can start
> automatically on boot.

sounds like a good question for this list :)

[snip]

> running '/etc/init.d/cruise start'  yields this response:
> 
>  * Starting Cruise Control ...
> /sbin/start-stop-daemon: stat /bin/java
> -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
> -Dcc.library.dir=/opt/cruisecontrol/lib -jar
> /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
> -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080:
> No such file or directory (No such file or directory)
> 
> obviously a file could not be found, but which and why?

the output is coming from start-stop-daemon, because that is the first
line printed (/sbin/start-stop-daemon: ...) so I think start-stop-daemon
can't find something.

usually you have to put a "--" between the executable and it's options,
or start-stop-daemon can get confused:

/sbin/start-stop-daemon --start --exec /path/to/bin -- --options

> When I run the same command from the shell:
> 
> java
> -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
> -Dcc.library.dir=/opt/cruisecontrol/lib -jar
> /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
> -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080
> 
> I get his output:
> 
> 
> > > WARNING: cc.home reset to /opt/cruisecontrol

that looks more like java output, but you didn't run the command the
same way.  Try running start-stop-daemon from the shell.

> This is my first attempt on writing a initscript so bare with me if I
> have missed something obvious.

you may want to look at the --make-pidfile and --pidfile options to
start-stop-daemon when you've got it working.  This helps you stop the
daemon later.

HTH,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

BOFH Excuse #206:

Police are examining all internet packets in the search for a narco-net-trafficker

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-16 23:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 15:41 [gentoo-user] Starting cruisecontrol -> initscript Johannes Skov Frandsen
2007-07-16 17:01 ` Mick
2007-07-16 23:35 ` Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox