Re: jdbc-problem
Re: jdbc-problem
- Subject: Re: jdbc-problem
- From: jacques couzteau <email@hidden>
- Date: Mon, 29 Sep 2003 13:30:10 +0200
Am Sonntag, 28.09.03 um 20:04 Uhr schrieb Chuck Hill:
Perhaps the database was restarted and the app lost connection? It
*should* reconnect, but perhaps there is a bug with mySQL? Try
restarting
the apps.
i did that byissuing a /Library/WebObjects/Applications/myApp.woa/maApp
from the shell
i responded with the usual output that i see when i'm launching apps in
my dev-envirnment from projectBuilder which ends with:
...
[2003-09-29 11:44:24 CEST] <main> Opening application's URL in browser:
http://dixon.local.:62231/cgi-bin/WebObjects/myApp.woa
[2003-09-29 11:44:24 CEST] <main> Waiting for requests...
do to my firewall i cannot load
http://dixon.local.:62231/cgi-bin/WebObjects/myApp.woa in my browser.
i assume that the app is now up and running but the http-Adaptor still
needs to know about that. The docs only cover manging apps using
JavaMonitor which i cannot use because of the firewall. (i only have
ssh-access)
i snooped around my system and found that i have a
javawoservice.sh-process running which was launched with the following
command:
sh
/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/
Resources/javawoservice.sh -appPath
/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd
i assume that command spawns wotaskd processes that javamonitor is
configured to manage. i assume that my wotasd has died because i can't
see any wotasd-processes when i check my processes by issuing a ps -xa
in the shell.
if issue that command again i receive the error-message that there
already is a process running on port 1085:
...
[2003-09-29 12:02:44 CEST] <main> Unable to establish a connection to
port 1085 on this host. Perhaps this port is already in use by another
WebObjects application instance.
...
i can successfully start a wotaskd on a different port by issuing the
following command:
sudo sh
/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/
Resources/javawoservice.sh -appPath
/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort
1087
i assume that this wotaskd doesn't know anything about my app. so it
isn't any good to run that.
i can use the javaservice.sh to sucessfully launch my wo-app on a port
of my choice:
sudo sh
/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/
Resources/javawoservice.sh -appPath
/Library/WebObjects/Applications/myApp.woa/myApp -WOPort 2005
...
http://dixon.local.:2005/cgi-bin/WebObjects/myApp.woa
[2003-09-29 12:15:53 CEST] <main> Waiting for requests...
...
in JavaMonitor i configured my app to run on port 2001. this port is
blocked, by the processes that were running before (i assume).
i can pull the url from the shell (using curl
http://dixon.local.:2005/cgi-bin/WebObjects/myApp.woa) and receive the
jdbc-error below:
...
An exception occurred while trying to open a channel:
com.webobjects.jdbcadaptor.JDBCAdaptorException: Unable to connect to
any hosts due to exception: java.net.ConnectException: Operation timed
out
...
so i restart my mysqld and try again, but get the same result.
I'am very confused. It seems hard to find out how to relaunch an app
without using JavaMonitor. I have about 10 java-processes running on
the machine and i don't know what they do.
after killing all the java-processes (i'm not running any other
java-programs on my machine, so i know all java processes are related
to wo)
i've manually restarted JavaMonitor. But now i'm only getting a "No
instance available"-message, when i call my app from my browser.
If that does not work, then someone has changed something on the
machine (paths, permissions, passwords, deleted something etc.).
impossible. no one besides me has access to the machine. It's just that
i'm not there and left the machine with the firewall blocking
everything but ssh and www. I'm sure everything would be back to normal
if i restarted the machine, but since I'm not there i wouldn't be able
to login because it wouldn't have internet access ... may be i could
kill the firewall (???) and then use JavaMonitor but i'm not quite sure
if that is really a good idea.
thank you
jacques
Find out
what happened and fix it.
Chuck
At 02:48 PM 28/09/2003 +0200, jacques couzteau wrote:
i posted the following to email@hidden but no
one
answered, so i hope i might get some help here. my big problem is that
i only have access to the machine via ssh and i cannot reboot it. How
do i get my app up and running again?
i appreciate your help.
thank you
jacques
hello
i depleyed a wo app on a webserver (osx 10.2.6)
I t was working fine for 5 days. suddenly i got the errormessage "no
instance available". after reloading i got the error below.
Original Exception:
java.lang.IllegalStateException: _obtainOpenChannel --
com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.EODatabaseContext@315e08: failed to open
database channel. Check your connection dictionary, and ensure your
database is correctly configured.
i assume this means that the woapp has
problems connecting to my mysql-db. which would lead to problems
using
the jdbc driver because i can login to the db with my
commandline-mysql-client and do everything i want.
i've tested the driver with a little java testprogram (thanks to Marc
Liyanage the program is available here:
http://www.entropy.ch/software/MacOSx/mysql/TestMySQL.java)
java -classpath
/Library/Java/Extensions/mysql-connector-java-3.0.8-stable-bin.jar:.
TestMySQL
result:
2003-09-26 12:48:36
which shows that the jdbc drivers ar available as well.
i don't know how to get my app up and running again. please help.
thanks
jacques couzteau
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.