AMCeScience / docking-gateway

AMC Docking Gateway
0 stars 0 forks source link

catalina home? #6

Closed mjaghouri closed 9 years ago

mjaghouri commented 9 years ago

Where is the base folder on which web-apps run? Normally, it has been the home folder of the user running tomcat. On dockingdev, this is not the case. Without knowing this, I cannot configure processing manager (i.e., I don't know where to put the config file to be read by processing manager).

PS: Assigned to @juanlufont but maybe @Flythe should also have a say on it?

Flythe commented 9 years ago

Last week me and @juanlufont spoke about this, apparently the home folder is at a place which is not writeable with the tomcat user, I believe the location is /home actually (please confirm Luis?). However with system properties you can get the correct location for the tomcat installation: http://www.mkyong.com/java/how-to-get-the-tomcat-home-directory-in-java/

mjaghouri commented 9 years ago

I don't need to get it in Java. In Java, I just read from "current directory" which according to your message, should be equivalent to $CATALINA_HOME, I suppose. So I need to put my files there so that they are readable by Java. If you have an alternative solution, please let me know!

On Mon, Nov 3, 2014 at 2:02 PM, Allard van Altena notifications@github.com wrote:

Last week me and @juanlufont https://github.com/juanlufont spoke about this, apparently the home folder is at a place which is not writeable with the tomcat user, I believe the location is /home actually (please confirm Luis?). However with system properties you can get the correct location for the tomcat installation: http://www.mkyong.com/java/how-to-get-the-tomcat-home-directory-in-java/

— Reply to this email directly or view it on GitHub https://github.com/AMCeScience/docking-gateway/issues/6#issuecomment-61474155 .

Flythe commented 9 years ago

That 'current directory' in java is (probably) at the /home dir on the machine, why this is so I do not know. You can get the correct dir with the system property (which will work for all machines running tomcat). I do not know another fix as Luis and me tried to fix this last week.

juanlufont commented 9 years ago

The base folder for the Tomcat/Liferay installation on dockingdev is:

/home/tomcat/liferay-portal-6.2-ce-ga2/tomcat-7.0.42

This thread is mostly about default working directory for the running tomcat process (I find "home directory" term a bit misleading).

As Jalmar pointed, from the Java process it can be determined which one is the original working directory using the env. properties. For other processes which want to interact with Tomat/Liferay, we would have to define and env. variable to let the rest of the processes know which one is the default working directory.

mjaghouri commented 9 years ago

Since the actual exception occurs in your configuration-management code, would it make sense to you to print this 'current directory' along with the error message you print?

On Mon, Nov 3, 2014 at 2:59 PM, Allard van Altena notifications@github.com wrote:

That 'current directory' in java is (probably) at the /home dir on the machine, why this is so I do not know. You can get the correct dir with the system property (which will work for all machines running tomcat). I do not know another fix as Luis and me tried to fix this last week.

— Reply to this email directly or view it on GitHub https://github.com/AMCeScience/docking-gateway/issues/6#issuecomment-61480508 .

mjaghouri commented 9 years ago

Luis, thanks for your remark. But the folder you gave does not work. If I put the file in that directory, it is not picked up by the processing manager.

On Mon, Nov 3, 2014 at 3:11 PM, juanlufont notifications@github.com wrote:

The base folder for the Tomcat/Liferay installation on dockingdev is:

/home/tomcat/liferay-portal-6.2-ce-ga2/tomcat-7.0.42

This thread is mostly about default working directory for the running tomcat process (I find "home directory" term a bit misleading).

As Jalmar pointed, from the Java process it can be determined which one is the original working directory using the env. properties. For other processes which want to interact with Tomat/Liferay, we would have to define and env. variable to let the rest of the processes know which one is the default working directory.

— Reply to this email directly or view it on GitHub https://github.com/AMCeScience/docking-gateway/issues/6#issuecomment-61482106 .

Flythe commented 9 years ago

If you update the config manager code to the latest version (1.0.9 I think) it will display the folder it is looking in. The folder Luis gave will only work if you concat the system property of the catalina home to the filename http://www.mkyong.com/java/how-to-get-the-tomcat-home-directory-in-java/

mjaghouri commented 9 years ago

config manager 1.0.9 on artifactory dates back to 22-10-14 and does not print the folder. There is no 1.0.10 by the way!

On Mon, Nov 3, 2014 at 3:36 PM, Allard van Altena notifications@github.com wrote:

If you update the config manager code to the latest version (1.0.9 I think) it will display the folder it is looking in. The folder Luis gave will only work if you concat the system property of the catalina home to the filename http://www.mkyong.com/java/how-to-get-the-tomcat-home-directory-in-java/

— Reply to this email directly or view it on GitHub https://github.com/AMCeScience/docking-gateway/issues/6#issuecomment-61486071 .