[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Issue start tomcat with mango remotely  XML
Forum Index » Mango M2M 1.12.5 and Earlier general discussion
Author Message
cyberoblivion

Initiate

Joined: 02/12/2008 14:21:59
Messages: 49
Offline

I'm having a strange issue, I would say bug in mango...

OK, so I installed mango on one of my linux servers this server is at my house and I installed it remotely from work. When I tried to start tomcat6 and mango was extracted in the webapps directory tomcat crashes on start up.
Last message is always
"X11 connection rejected because of wrong authentication"
Catalina log shows nothing abnormal
If I remove mango tomcat6 starts normally.

When I got home I sat at the server logged into X-Session and tomcat starts fine even with mango in the webapps directory.

Only thing I can think of is for some reason mango is trying to use the window manager or something, and even though I was forwarding X-Connection with -X -C options in ssh it fails because tomcat start up using a script and as the tomcat user which doesn't have permission to connect to my remote X-Session...

This is a large issue for me because I don't want to have to have someone go to the console every time I restart tomcat..

Any thoughts on fixes for this.
Or maybe I'm just doing something wrong!

mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1847
Offline

Weird. Mango doesn't do anything platform specific, or even very unusual; it's just a web app under Tomcat. The only thing i can think of is writing to the filesystem or something (which the derby database would do). Maybe there are differences between the owner of the directory in which the database lives and the user with which you're starting Tomcat?

Best regards,
Matthew Lohbihler
cyberoblivion

Initiate

Joined: 02/12/2008 14:21:59
Messages: 49
Offline

Yeah that is exactly what I thought. So I double checked the filesystem and user info.

the start script is the one that came with tomcat 6 it uses jsvc it must be ran with root permissions but TOMCAT_USER is tomcat and the entire directory structure is owned by tomcat...
I'm puzzled....

here is the start command.

The script case "$1" in
start)
#
# Start Tomcat
#
$DAEMON_HOME \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
-wait 10 \
-pidfile $PID_FILE \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
exit $?
;;
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1847
Offline

What user id did you use to connect via X? Did you try connecting as root (although X might not allow this) and starting Tomcat?

This message was edited 1 time. Last update was at 03/12/2008 20:22:58


Best regards,
Matthew Lohbihler
cyberoblivion

Initiate

Joined: 02/12/2008 14:21:59
Messages: 49
Offline

Yes I did try logging in as root. I wonder if any of the libraries used may do something which requires an window manager connection?

I use Derby in some of my apps and run them without even having a window manager running, so I don't think that would be an issue.
cyberoblivion

Initiate

Joined: 02/12/2008 14:21:59
Messages: 49
Offline

gets even more strange... but better..

OK so the last post gave me the idea to try and it turned out to work...
Forwarding X connections was in fact causing the issue. If I connect without forwarding X connections then it works fine.
Don't know why. But I'm good with it. just have to remember that.
craig

Initiate

Joined: 06/08/2007 16:50:46
Messages: 163
Offline

I think this may stem from the 'headless' mode in java.

Before headless mode some libraries (swing, awt?) would balk if there was no display.

Maybe java is detecting your display and letting libs know that they can use it?
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1847
Offline

It was probably the Advanced Imaging package, or at least i recall there being some issues around that. Since Sun moved it into the JDK distribution i haven't heard of any problems.

Best regards,
Matthew Lohbihler
cyberoblivion

Initiate

Joined: 02/12/2008 14:21:59
Messages: 49
Offline

Has anyone tried deploying mango from the tomcat manager app on any linux dist? I tried this last week on CentOS 5 and it fails due to same issue I believe.

mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1847
Offline

I use start, stop, restart, and list without any issues on Fedora and Windows.

Best regards,
Matthew Lohbihler
cyberoblivion

Initiate

Joined: 02/12/2008 14:21:59
Messages: 49
Offline

Huh could be something with my initscript... if I put xhost+ in my bashrc it seems to fix the issue as well.
can you post your tomcat initscript?

mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1847
Offline

We use the ANT build script. I think it's included in the source.

Best regards,
Matthew Lohbihler
 
Forum Index » Mango M2M 1.12.5 and Earlier general discussion
Go to:   
Powered by JForum 2.1.9 © JForum Team