PDA

View Full Version : Resin as Service - Cannot Create Directory


defenderjim
01-06-2010, 09:56 PM
When running Resin as a service, I am getting the error: java.io.IOException: Cannot create directory: d:\web\war-dir\blah\WEB-INF\tmp

If I run Resin (httpd.exe) from the command line, all works fine.

I figure this is a permissions issue, but not sure where to start.

alex
01-08-2010, 06:09 AM
-Does the user used to run the service have the permissions? The user can be looked up in the "Log On As" column of the "Services" explorer (ControlPanel->Administration Tools->Services.

-What version of Resin is this?

defenderjim
01-11-2010, 03:12 PM
-Does the user used to run the service have the permissions?
I tried with "Local System Account" and with my account logon. Same problem either way.

-What version of Resin is this?
Pro 3.0.27

defenderjim
09-24-2010, 06:14 PM
I finally have the solution. Here is the answer for anyone that may encounter this issue.

It was a problem in Resin.

I am running my app on D:

D: is a mapped drive. It is mapped to C:\development\apps\yada\yada.

If D: is mapped straight forward to C:\ then no problem.

Here is how to make it work with D: mapped to a subfolder:

create a new string key in location

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlS et\Control\Session Manager\DOS Devices\

key name will be the drive letter with column "d:" without the quotes
key value will have the following \DosDevices\c:\path

reboot...

Works on Vista, should work on XP too.

There is more detail at the url below. The changes above should be sufficient to get things running.

http://en.wikipedia.org/wiki/Subst#Persisting_across_reboots

pedro paramo
01-13-2011, 02:10 PM
I have the same problem but with linux (ubuntu) Resin 3.1.10 Ubuntu? How can I fix this?

Thanks.

Pedro Paramo

domdorn
01-13-2011, 02:14 PM
How are you starting resin?
Through the /etc/init.d scripts or another way?

Please provide the commands you used to start resin and the output you've got on your console.

pedro paramo
01-13-2011, 04:27 PM
Thanks for your help. I was using

java -jar lib/resin.jar

but your question got me thinking and I tried using

sudo java -jar lib/resin.jar

and it works!

How can I update my bash profile to start resin automatically whenever I start my machine?

Thanks again.

Pedro

domdorn
01-13-2011, 05:44 PM
you shouldn't update your bash profile for this.

I always install resin like this:

download the package
unzip to a directory
change into that directory
./configure --prefix=/usr/local/resin
make

sudo chown YOURUSERNAME /etc/init.d
sudo mkdir /usr/local/resin
sudo chown YOURUSERNAME /usr/local/resin
make install
sudo chown root:root /usr/local/resin -r
sudo chown root:root /etc/init.d -r

this installs resin and places the init.d script correctly. you then can use your distributions utilities to start resin during boot, e.g. by linking

ln -s /etc/init.d/resin /etc/rc2.d/S91resin
ln -s /etc/init.d/resin /etc/rc3.d/S91resin
ln -s /etc/init.d/resin /etc/rc4.d/S91resin
ln -s /etc/init.d/resin /etc/rc5.d/S91resin

ln -s /etc/init.d/resin /etc/rc0.d/K91resin
ln -s /etc/init.d/resin /etc/rc1.d/K91resin
ln -s /etc/init.d/resin /etc/rc6.d/K91resin


hope that helps,

dominik