Don't open Servoy Application Server on MAC

Hi everybody,
I Have a problem to deploy my solution on a Mac. (MAC OS X Versione 10.4.10
Processor 1 Ghz PowerPC G4 Memory 324 Mb SDRAM.)

On a Mac similar to the customer’s server I have made a complete installation of Servoy.
But I don’t succeed in opening either Sybase that particularly Servoy Application Server.
All I managed to do is to open the DB Sybase but only the Servoy Developer launching that it doesn’t need me on the Mac.

If someone can help me, this is the first solution I have to deploy to my customer.
Thanks!
P.S.
I am developing on Windows and I have to deploy on a Mac server on which:
1-I have perform an installation Java J2SE 5.0
2-I have perform an installation with Developer Servoy 3.5 RC3
3-I have perform an installation Sybase 9.xxx with Sybase Central .
I have inserted in file sybase.config:…

-ud -ti 0 -x tcpip{dobroadcast=no} -qs -qw -o sybase_db/sybase_log.txt

I have inserted in servoy_server.sh:

#!/bin/sh
cd /Applications/Servoy;
export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db; /Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config&

To launch Servoy Server from terminal with ./Servoy_server.sh … and it seems ok:

Computer-di-xx-xx:/applications/servoy eMac$ ./servoy_server.sh
0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
1227 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
log4j: Parsing for [root] with value=[WARN, file, configservlet].
log4j: Level token is [WARN].
log4j: Category root set to WARN
log4j: Parsing appender named “file”.
log4j: Parsing layout options for “file”.
log4j: Setting property [conversionPattern] to [%d %p [%t] %c - %m%n].
log4j: End of parsing for “file”.
log4j: Setting property [maxFileSize] to [10MB].
log4j: Setting property [file] to [servoy_log.txt].
log4j: Setting property [maxBackupIndex] to [1].
log4j: setFile called: servoy_log.txt, true
log4j: setFile ended
log4j: Parsed “file” options.
log4j: Parsing appender named “configservlet”.
log4j: Parsing layout options for “configservlet”.
log4j: Setting property [dateTimeFormat] to [yyyy-MM-dd HH:mm].
log4j: End of parsing for “configservlet”.
log4j: Setting property [windowSize] to [1000].
log4j: Parsed “configservlet” options.
log4j: Parsing for [org.apache.wicket] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org.apache.wicket set to WARN
log4j: Handling log4j.additivity.org.apache.wicket=[null]
log4j: Parsing for [com.servoy.j2db.util.Debug] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category com.servoy.j2db.util.Debug set to WARN
log4j: Handling log4j.additivity.com.servoy.j2db.util.Debug=[null]
log4j: Finished configuring.
10-lug-2007 16.41.02 org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
10-lug-2007 16.41.02 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4496 ms
10-lug-2007 16.41.02 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
10-lug-2007 16.41.02 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
10-lug-2007 16.41.04 org.apache.catalina.startup.DigesterFactory register
AVVERTENZA: Could not get url for /javax/servlet/resources/web-app_2_5.xsd
10-lug-2007 16.41.08 org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
10-lug-2007 16.41.08 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5381 ms

I would like to open the admin pages , but either with firefox and Safari I get the empty page and the following message always written on the terminal:

GRAVE:
java.net.SocketException: Invalid argument
at sun.nio.ch.Net.setIntOption0(Native Method)
at sun.nio.ch.Net.setIntOption(Net.java:152)
at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:372)
at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:330)
at org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:171)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:967)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1183)
at java.lang.Thread.run(Thread.java:613)
10-lug-2007 16.47.42 org.apache.tomcat.util.net.NioEndpoint setSocketOptions

Over Monitor Activity the like: dbsrv9 and java… I suppose that besides the Sybase opened by the Developer is also started the Application Server of Servoy.
Michele Annese
Imola-Italy

Hi Mike,

if you search the forum you will find a number of old topics describing the problems of getting Servoy server to run on a Mac.

The problem we had, more than 6 months ago, with an older version of Servoy is that the Servoy server starts before the database, Sybase or in our case PostgreSQL is ready to accept connections.

If you are familiar with unix scripting you may able to insert a delay in the script. We used an AppleScript to solve the problem. If checks that the database is running (using unix ps x), waits 30 seconds, the runs ‘servoy_server.sh’.

java.net.SocketException: Invalid argument
at sun.nio.ch.Net.setIntOption0(Native Method)
at sun.nio.ch.Net.setIntOption(Net.java:152)
at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:372)
at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:330)
at org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:171)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:967)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1183)
at java.lang.Thread.run(Thread.java:613)
10-lug-2007 16.47.42 org.apache.tomcat.util.net.NioEndpoint setSocketOptions

please download the latest RC then we rollbacked the change in the server.xml file of tomcat (conf dir) You use the new NIO Connectior in tomcat, that handles the browser request. This connector is needed for the new Http Tunnel factory we have but there are problems on various systems with this new technology so you should replace that with the default connector.

Johan Compagner to wrote:

please download the latest RC then we rollbacked the change in the server.xml file of tomcat (conf dir) You use the new NIO Connectior in tomcat, that handles the browser request. This connector is needed for the new Http Tunnel factory we have but there are problems on various systems with this new technology so you should replace that with the default connector.

A)Resolved connection to the pages admin of Servoy:
-Unistall Servoy 3.5 rc3
-Install Servoy 3.5 rc6 (with Developer) onMac of Customer.
And to open Sybase with Developer:

  1. Typed 2 lines in servoy_server.sh :
    cd /Applications/Servoy export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db TO GO TO HEAD!!!
    /Applications/ Servoy /sybase_db/dbsrv9 @/Applications/ Servoy /sybase_db/sybase.config&
    while true etc…
  2. to launch ./servoy_server.sh we succeed in connecting us Servoy Admin Pages. :D

B)Now the problem :
-Open manually of Sybase (???)
-Open automatic of Sybase and Servoy Server.
Thanks, Michele Annese

what are now exactly your problems?
sybase doesn’t start automatic when you start the developer?

Johan Compagner to wrote:

what are now exactly your problems?
sybase doesn’t start automatic when you start the developer?

Yes. All ok, since I have installed RC6 last version.
-To start Developer: open Sybase DB
-To launch servoy_server.sh file: open Servoy Server.
When I will have to deliver the solution to the customer and installed Servoy, I find the way to get automatic opening both Sybase DB and Servoy Server to start Mac server. I will try the scripts by Marcel Trapman on article How to created to startup item on OSX.
Thanks, Michele Annese

I have finally succeeded in starting Sybase DB and Servoy server automatically .
With this simple steps of Rogert Ivens on Magazine:
Figured out how you can startup the Application Server in OS X without any extra tools:

  • Put extra info in servoy_server.sh and sybase.config as mentioned in former posts
  • Select servoy_server.sh
  • get info (CMD i)
  • set Open With at ‘Terminal’, save and close
  • Open System Preferences
  • Go to Accounts > Serveraccount
  • Drag servoy_server.sh to Startup Items
  • Restart OS X Server (in case you like to test it)
    Thanks to Robert.