PDA

View Full Version : Centos install - working - just not /etc/init.d/resin


jdamnation
08-09-2010, 01:25 PM
Hi all.

We have set up Resin on a Centos server and it works very nicely.

However - a problem is that although we can start Resin with:

java -jar /usr/local/resin/lib/resin.jar start

Which works fine

We are unable to start it using

/etc/init.d/resin

If we use this - we get back 'start failed'.

Is there any debug we can use / log file you know of that we can see what the error is with /etc/init.d/resin?

Many thanks,

JD

alex
08-09-2010, 11:27 PM
JD,

Check the logs at location specified in /etc/init.d/resin's -log-directory option

jdamnation
08-10-2010, 01:13 PM
Hmm - well there is nothing in /var/log/resin - so it's obviously not getting far.

Looking through the /etc/init.d/resin file (attached as resin.txt) it seems that everything is there and in the right place.

Resin is in

/usr/local/resin

Java is in

/etc/alternatives/

Can anyone suggest any tests I can run to get to the bottom of this?

JD

emil
08-10-2010, 11:39 PM
Hi JD,

Can you edit the /etc/init.d/resin and remove all the redirects to /dev/null? (They look like this: "1>/dev/null" and/or "2>/dev/null" ) Rerun /etc/init.d/resin start and you should see what's going on.

Thanks,
Emil

jdamnation
08-11-2010, 10:07 AM
Hmm - I had another question regarding permissions - but I was going to save that one, and tackle this 'easier' one first!

But it looks like the issue is related. Basically, as this is centos, there is no www-data user. So I am launching resin as root for now, just to get it working - which it does.

However, after removing the null redirects - this error shows up. Seems like a permission error - but how come? Resin is running as root!

And the strange thing is - running the resin.sh command manually works....

Error below for failed service shutdown (service still runs after doing /etc/init.d/resin stop as root user.

Stopping resin:java.io.IOException: Cannot create directory: /home/resinwww/watchdog-data
at com.caucho.vfs.FilePath.mkdirs(FilePath.java:489)
at com.caucho.env.service.RootDirectoryService.<init>(RootDirectoryService.java:73)
at com.caucho.env.service.ResinSystem.<init>(ResinSystem.java:155)
at com.caucho.boot.ResinBoot.<init>(ResinBoot.java:117)
at com.caucho.boot.ResinBoot.main(ResinBoot.java:323)
java.io.IOException: Cannot create directory: /home/resinwww/watchdog-data
at com.caucho.vfs.FilePath.mkdirs(FilePath.java:489)
at com.caucho.env.service.RootDirectoryService.<init>(RootDirectoryService.java:73)
at com.caucho.env.service.ResinSystem.<init>(ResinSystem.java:155)
at com.caucho.boot.ResinBoot.<init>(ResinBoot.java:117)
at com.caucho.boot.ResinBoot.main(ResinBoot.java:323)
failed!