Servoy Server suddenly won't start

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Servoy Server suddenly won't start

Postby guydoms » Mon May 08, 2006 6:47 pm

My Application Server (on Fedora Linux) would not restart after I changed the DB structure on the MySQL backend & imported an updated solution.

I have tried to start it manually but no success.
Typing "./servoy_server.sh & " seizes the terminal and does not complete.

Running a log file simply shows...

Code: Select all
Loading servoy.properties from /usr/local/servoy/servoy.properties
Loading - Done


The repository (on SYBASE) seems to be running ok, as I can access it from my local Developer with no problems.

The SYBASE log shows...

Code: Select all
I. 05/08 13:27:43. Running on Linux 2.4.20-021stab028.17.777-enterprise #1 SMP Tue Jul 19 19:31:27 MSD 2005
I. 05/08 13:27:44. Database server started at Mon May 08 2006 13:27
I. 05/08 13:27:44. Trying to start SharedMemory link ...
I. 05/08 13:27:44.     SharedMemory link started successfully
I. 05/08 13:27:44. Trying to start TCPIP link ...
I. 05/08 13:27:44. Starting on port 2638
I. 05/08 13:27:44.     TCPIP link started successfully
I. 05/08 13:27:44. Now accepting requests


I have since deleted SERVOY and re-installed a fresh copy (now 2.2.5) (SYBASE DB as well)...BUT the problem persists.

I've run out of ideas and would appreciate some pointers.

Thanks...
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby sebster » Tue May 09, 2006 11:35 am

You can add a -DSTACKTRACE=true to the java command line in servoy_server.sh. This will give more information as to where the problem may be.
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby guydoms » Tue May 09, 2006 5:13 pm

Thanks for the suggestion...but where exactly in the .sh file do I put the trace option
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby sebster » Tue May 09, 2006 5:33 pm

Right after "java", i.e., "java" becomes "java -DSTACKTRACE=true"...
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby guydoms » Tue May 09, 2006 5:41 pm

Thanks...I tried this but there was no additional info in server.log

All it reports is...

Code: Select all
Loading servoy.properties from /usr/local/servoy/servoy.properties
Loading - Done


Is there any other logging I can set up or look at ?
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby guydoms » Tue May 09, 2006 5:46 pm

More info...

Looking at the processes running after kicking of the .sh script I see these

Code: Select all
root     25139  0.0  0.0  2000  916 pts/1    S    16:38   0:00 /bin/sh ./servoy_server.sh -DSTACKTRACE=true
root     25140  0.3  0.5 221020 23080 pts/1  S    16:38   0:01 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25141  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25142  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25143  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25144  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25147  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25148  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25149  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     25151  0.0  0.5 221020 23080 pts/1  S    16:38   0:00 java -DSTACKTRACE=true -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/c
root     24513  0.0  0.0  2244  772 pts/1    R    16:44   0:00 ps -aux


Not sure what this tells me...any ideas ?
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby sebster » Wed May 10, 2006 10:22 am

This shows that Servoy is running. Strange that nothing is happening in the logs. Are you sure your servoy.properties file is correct? Does it list all the database servers? Can you connect to the local http or rmi ports of the Servoy Server? (telnet localhost 1099 and telnet localhost 8080)?

Did you change the mysql database version? Do you have the right jdbc driver for that version?
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby guydoms » Wed May 10, 2006 10:58 am

Thanks for the pointers..

1. The servoy.properties file looks OK to me - it all works on my local Linux box, and I simply copied that install over to the online host.

2. No I can't connect to either port 'Connection refused'...that's strange, if SERVOY really is running !!! Why is this ?

3. When the problem first occured I was using MySQL 3.23.58 on both machines...since I've had these problems I've resorted to upgrading to MySQL 5.0.21 and am now using the latest 3.12 (stable) driver. I'm using MySQL as the data backend.
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby sebster » Wed May 10, 2006 1:45 pm

can you

kill -QUIT <pid>

where <pid> is the process id of the servoy java process which has as parent process id the servoy_servoy.sh script.

In the log you should have a stack dump which if you mail it to me, I can look at what it's doing.

Thanks
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby sebster » Wed May 10, 2006 3:29 pm

Hi,

It seems your entropy source is blocking in a read:

Code: Select all
"main" prio=1 tid=0x0805b948 nid=0x4dfb runnable [bfffb000..bfffb8bc]
   at java.io.FileInputStream.readBytes(Native Method)
   at java.io.FileInputStream.read(FileInputStream.java:194)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
   - locked <0x447b95c8> (a java.io.BufferedInputStream)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
   - locked <0x447b93f8> (a java.io.BufferedInputStream)
   at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedByte(SeedGenerator.java:467)
   at sun.security.provider.SeedGenerator.getSeedBytes(SeedGenerator.java:137)
   at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:132)
   at sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:112)
   at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:169)
   - locked <0x447b8ec0> (a sun.security.provider.SecureRandom)
   at java.security.SecureRandom.nextBytes(SecureRandom.java:381)
   - locked <0x447b8300> (a java.security.SecureRandom)
   at org.doomdark.uuid.UUIDGenerator.getDummyAddress(UUIDGenerator.java:116)
   - locked <0x447b8190> (a java.lang.Object)
   at org.doomdark.uuid.UUIDGenerator.generateTimeBasedUUID(UUIDGenerator.java:237)
   at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)


Try adding the following flag to the java commandline:

-Djava.security.egd=file:/dev/urandom
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby guydoms » Wed May 10, 2006 5:06 pm

That got things moving again ! All ports OK now and Servoy Server & Client up again.

Thanks very much for your help.

So it would appear to be a Java Security issue, if I understand you correctly ?


[/code]
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby sebster » Wed May 10, 2006 5:26 pm

Well it's a bit Java and a bit OS and a bit Servoy. Basically, Java by default uses a secure source for random bits when using the standard random generator in java.util. By default this is /dev/random on unix, and on some unixes (Fedora Linux, FreeBSD) a read blocks until there is enough entropy to give you truly, cryptographically secure random bits. In this case we're not using the random data for security purposes but for UUID (unique identifier) generation; so it's not really necessary to user /dev/random, and we can use /dev/urandom which never blocks. But we have to tell java this.
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby guydoms » Wed May 10, 2006 5:51 pm

Thanks for the explanation...Excellent !

This will be useful in case anyone else comes across this.

Is there anything one should do to correct the situation where /dev/random is usable again ? Not really my strong point this area.

Thanks again.
Guy Doms
Gemini Business Services Ltd.
Wiltshire, UK

Servoy v2.2.6
Windows XP (SP2)
Java 1.5.0_04-b05 (Windows XP)
MySQL 5.0.27
guydoms
 
Posts: 40
Joined: Thu Feb 17, 2005 7:00 pm
Location: Wiltshire, UK

Postby sebster » Wed May 10, 2006 6:35 pm

Nope, /dev/urandom is fine. Not all OS-es have /dev/urandom and a blocking /dev/random, otherwise we could change the default flag to use /dev/urandom.
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 4 guests