Restart Application Server broken

Running Servoy 4.1 on Max OSX.

Under 4.0.1 and 4.1 we are finding that the Restart Application Server button in the admin console doesn’t restart the server but causes it to quit, with output to the Terminal window suggesting that an invalid command was sent to the OS (see below). Any ideas why this is happening?

smarttrash:application_server smarttrash$ ./servoy_server.sh
Usage: java [-options] class [args…]
(to execute a class)
or java [-options] -jar jarfile [args…]
(to execute a jar file)

Can’t say anything about 4.0.1 but for 4.1 I have not seen that behaviour.
Restarted several times for testing purposes in the last days without any issues.

Adrian,

Have you edited servoy_server.sh?
It should look something like:

#!/bin/sh

while true
do
	java -Djava.awt.headless=true -Xmx256m -Xms64m -XX:MaxPermSize=128m -classpath ...... com.servoy.j2db.server.ApplicationServer "$@" 1>> server.log 2>> server.log
	EXITCODE=$?
	if [ "$EXITCODE" != 99 ]; then exit $EXITCODE; fi
done

It sounds strange that server does start first time and does not restart (the same java command is invoked)

Rob

I found the following additional command in my servoy_server.sh file:

java -Djava.net.preferIPv4Stack=true

I’m not sure how that got there. I certainly didn’t type it in myself! I removed it and now Restart is working.

If that command served some purpose I should be aware of please let me know.

Thanks for your help.

Its for FreeBSD alike distros to make sure you use IPV4 instead of IPV6 (Which is for some reason standard on BSD java versions).

I dont know what kinda OS you are using, but this line isnt automaticly added to the server startup script.