Help! Can't start server

Hello,

I can’t start Servoy 4.0.1… dbserv10 is available in my activity list but the application server doesn’t run.
This is what the server.log says:

0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy4.0/application_server/servoy.properties
270 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
Exception in thread “main” org.apache.commons.dbcp.DbcpException: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Operation timed out
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
at com.servoy.j2db.persistence.datasource.n.createConnection(Unknown Source)
at com.servoy.j2db.persistence.datasource.r.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.checkIfTableExistsInDatabase(Unknown Source)
at com.servoy.j2db.persistence.Repository.for(Unknown Source)
at com.servoy.j2db.persistence.Repository.(Unknown Source)
at com.servoy.j2db.persistence.Repository.(Unknown Source)
at com.servoy.j2db.persistence.Server.getRepository(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)
Caused by: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Operation timed out
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseErrorCheckDead(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.login(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
… 12 more

Can somebody help me out?

Hi Irene,

Anything in the Sybase log ?
Also you say the application server doesn’t run. You mean it crashes ?
Normally a failed db connection will not stop the application server, even if it is the repository server connection.

Hello Robert,

The sybase.log seems to be normal. I can normally connect with Sybase central.

I. 10/03 12:30:17. Running Darwin 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 on X86 (X86_64)
I. 10/03 12:30:17. Server built for X86 processor architecture
I. 10/03 12:30:19. Database server started at Fri Oct 03 2008 12:30
I. 10/03 12:30:19. Trying to start SharedMemory link …
I. 10/03 12:30:19. SharedMemory link started successfully
I. 10/03 12:30:19. Trying to start TCPIP link …
I. 10/03 12:30:19. TCPIP link started successfully
I. 10/03 12:30:19. Now accepting requests
I. 10/03 12:30:24. Cache size adjusted to 105840K
I. 10/03 12:30:29. Cache size adjusted to 104352K
I. 10/03 12:30:34. Cache size adjusted to 103984K

If I try to connect with the app-server, you know… localhost:8080 it fails to ‘open the page’.
When I start Servoy I can see the startsplash then it freezes.

Just to be sure I reinstalled Servoy but it didn’t help.

Hi Irene,

Are you sure you are using a 32-bits java ? ? Eclipse for instance doesn’t work in 32bit.
See the java settings in /Applications/Utilities/Java/Java Preferences.app .

Hi Robert,

Eclipse for instance doesn’t work in 32bit.

I dragged all 64-bit java on top of the list but… to bad.

ACK! :oops: my bad.
I meant to say Eclipse doesn’t work in 64-bit.
So drag the 64-bit java down the list.

64-bit down the list, still nothing! :evil:

Hi Irene,

So even Developer will not launch ?
Did it work before ? If so what has changed ? Enabled the firewall ?
Did you fixed the disk permissions lately (Disk Utility) ?

A few days ago I updated my Java… thanks to Apple. After that I wanted to change the brand settings, but it didn’t work. At that time I could reach the server without problems.
This morning I reseted the pram, but I can’t imagine that that causes the problem.

Now that I have reinstalled Servoy, the developer launches. But I still cant reach the server by the browser.

Hi Irene,

So when Developer is running you can’t reach the servoy-admin pages via localhost ?
See what the settings are in Preferences > Servoy > Services.

They appear to be normal, if I do the test it says it’s running. See pict.

When developer is running I can reach the server. When it is not running I can’t.
The application server is supposed to start as a service when I start the machine, and it always worked… till this morning.

Hi Irene,

I can’t reproduce your problem.
In terminal I launch servoy_server.sh by going to the directory first (cd /path/to/servoyserver) and then launching the servoy_server.sh (./servoy_server.sh).
How do you start Servoy server exactly ?

In /library/startupitems/servoy I have an executable to start the servoy-server.sh. So when I start the computer it runs the server in the background. I work with this method for years and it did well… till this morning.

I attach the file and sevoy-server.sh which is a little modified.

somehow my attachment didn’t come throug. This is the text of the excutable:

#!/bin/sh

Servoy Application Server

. /etc/rc.common
StartService () {
ConsoleMessage “Starting Servoy Application Server…”
cd /Applications/Servoy4.0/
. /Applications/Servoy4.0/application_server/servoy_server.sh&
}
StopService()
{
ConsoleMessage “In the future Stop Servoy Application Server here”
}
RestartService ()
{
ConsoleMessage “Restarting Servoy Application Server…”
StopService
StartService
}
RunService “$1”

and this of sevoy-server.sh

#!/bin/sh

cd /Applications/Servoy4.0/application_server/
export DYLD_LIBRARY_PATH=/Applications/Servoy4.0/application_server/sybase_db
/Applications/Servoy4.0/application_server/sybase_db/dbsrv10 @/Applications/Servoy4.0/application_server/sybase_db/sybase.config &

while true
do
java -Djava.awt.headless=true -Xmx256m -Xms64m -XX:MaxPermSize=128m -classpath .:lib/ohj-jewt.jar:lib/MRJAdapter.jar:lib/compat141.jar:lib/commons-codec.jar:lib/commons-httpclient.jar:lib/activation.jar:lib/antlr.jar:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/commons-pool.jar:lib/dom4j.jar:lib/help.jar:lib/jabsorb.jar:lib/hibernate3.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/jdbc2_0-stdext.jar:lib/jmx.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/BrowserLauncher2.jar:lib/jug.jar:lib/log4j.jar:lib/mail.jar:lib/ohj-jewt.jar:lib/oracle_ice.jar:lib/server-bootstrap.jar:lib/servlet-api.jar:lib/wicket-extentions.jar:lib/wicket.jar:lib/wicket-calendar.jar:lib/slf4j-api.jar:lib/slf4j-log4j.jar:lib/joda-time.jar:lib/rmitnl.jar:lib/networktnl.jar com.servoy.j2db.server.ApplicationServer “$@” 1>> server.log 2>> server.log
EXITCODE=$?
if [ “$EXITCODE” != 99 ]; then exit $EXITCODE; fi
done

irenem:
I attach the file and sevoy-server.sh which is a little modified.

Nothing attached to your post.

But to rule anything out. If you launch it the way I described does that work for you?

I guess I was too quick.

Anyway. Is this path still correct ?

/Applications/Servoy4.0/application_server/

Yes Robert, the path is correct and it always worked, that makes me so angry!

If I use tour method I get this:

GeniusBook:application_server irene$ servoy_server.sh
./servoy_server.sh: line 9: server.log: Permission denied
GeniusBook:application_server irene$ SQL Anywhere Network Server Version 10.0.1.3419

Copyright (c) 2001-2007, iAnywhere Solutions, Inc. Portions copyright (c) 1988-2007, Sybase, Inc.
All rights reserved. All unpublished rights reserved.

Developer edition, not licensed for deployment.
Please confirm your acceptance of these license terms:
I accept and agree to abide by the terms and conditions of the
“IANYWHERE NO-CHARGE DEVELOPER EDITION LICENSE AGREEMENT”.
Enter ‘Y’ for Yes and ‘N’ for No:
Y
-bash: Y: command not found
GeniusBook:application_server irene$

Almost looks like Sybase is launching in some unregistred (license-wise) state, never seen that message before…
In any case it seems you have a permission issue. Line 9 is in fact your Servoy server launch command in servoy_server.sh

I suggest you run Disk Utility and fix your disk permissions. Something I always do after any update of the system.

Done. It doesn’t help. The problem is still there.

Hello Robert,
We are back in business! Thanks to your remark about privileges, I looked closer to the permissions,the group of servoy_server.sh (as of many other items) was ‘unknown’. Somehow DiskUtility couldn’t correct the problem. According to some Mac forums this problem seems to be a kind of bug on Leopard, normally it’s not a big issue because in many cases the user can work normally, but Servoy seems to be sensitive to this. So I spent my sunday rebuilding my computer and now everything is back to normal and the app.server is up again. It doesn’t matter, it was miserable weather anyway :wink:

Thanks again for your time and patience
Irene