Servoy Http Tunnel not working after restart usiserver-admin

I have successfully implemented the http tunneling over port 80 on my Mac OS X server (10.5.2).

The only issue is that when i restart servoy server from the servoy-admin panel, it no longer works.

Rebooting the server, which restarts the servoy_server.sh script seems to fix the issue and it works again until you restart from the admin panel.

Cant think where the issue might be unless Servoy-Admin panel is running a different routine to restart servoy?

Thanks for any help. Otherwise it works great

David

Hi David, did you test also the performance?

we have huge, performace problems with the tunnel option ON.
the solution is becomming 3 times slower.

Sebster (of Servoy) is working on it…

Harjo,

No not yet. its sitting on a new 2.8G Quad processor X server on my desk prior to moving to a hosting centre in Manchester on Monday!!!

So its difficult to tell at this stage. It seems find, but i think i will be able to tell better when i move it to manchester.

Is the admin console restart thing a known issue, or have i configured something wrong somewhere?

David

Harjo,

Have your speed issues been sorted out since 3.5.5? My server is now hosted, but i a still testing it, so the volume of users isnt that large, so i cannot really tell regarding its speed.

I take it the problem with rebooting the server from the admin console is not just me configuring it badly, is it the same with other?

David

Nope, we did some tests again with 3.5.5 and have setup two identical servoy-servers, one with the tunnel and one without the tunnel.

the server with the tunnel is about 2-3 times slower.
(by just navigating trought the solution)

Also opening many times the solution (as was suggested) did’nt bring any solution. We have reported our results to the dev-team.

I have set mine back to the traditional 8080 setup for the time being.

Interstingly it seems to be the extra line in the servoy_server.sh file on the mac that breaks the ability to restart from the servoy-admin tool.

Lets see how the development progresses. Its a great idea, but i think i am a little premature as usual in deploying it commercially.

Thanks

The new version of Servoy (3.5.6) has a new tunnel implementation.

This implementation is now the same speed as plain RMI. Due to the built in bandwidth management though, sometimes the total time (start of first operation to end of last operation) of a group of operations is faster than with plain RMI, giving a smoother feel to the client.

Regards,
Sebastiaan

Seb,

Has the bug that doesnt let you restart the server from the web control panel been fixed in this release?

I think i posted here about it, it seemed to be related to the extra line of Java that had to be added to the bottom of the server.sh startup script on the mac which i think was necessary with the tunel

David

The tunnel should work fine without any modifications to servoy_server.sh.

In any case, it should not have any affect on restartability of the server from the admin pages. If it still does, the best thing to do is from the command prompt run:

servoy_server.sh 1> mylogfile 2> mylogfile

and then restart from the admin pages and see if there is any info in mylogfile (if you post it here, I will have a look at it). If you are using a csh related shell, use

servoy_server.sh >& mylogfile

instead.

Again, it should all work just fine, but just in case there is a problem I’m sure we can sort it out!

Regards,
Sebastiaan

By the way, the only thing you need to do to enable the new tunnel is set the line:

SocketFactory.rmiServerFactory=com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory

In the next release we will make it possible to enable/disable the tunnel from the admin pages.

thanks Seb,

by the sound of it you are confident that the thing should run as well as the normal RMI now,

so i think i may go for it again as it does get rid of firewall issues.

Am i right in thinking it is best to do a fresh installation rather than use the update from 3.5.5

David

Yes, I would definitely use a fresh install. While it is possible to run from a 3.5.5 and update and possibly change a few config files manually, I think to avoid problems a fresh install is better!

I am confident that the problems are gone: internally at Servoy we’ve been using the new tunnel for several weeks now, and all is going smoothly.

Sebster,

I have done a fresh install and made those changes.
I am on OS X 10.5.3

Basically the server continues to start but remains on Port 8080, not port 80.

I am thinking that i am just missing something that i need to change to Port 80?

if I go to server.xml and change the following to Port 80 then it appears to then work on Port 80. I must therefore assume that this makes the tunnel work, its just a matter of continuing to manual change the Port that remains and not the unchecking of other lines?

  Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="80" 
    		   protocol="HTTP/1.1" 
               maxThreads="400" connectionTimeout="60000" 
               redirectPort="8443" />

Sorry for hassling you, I am just keen to get rid of my increasing firewall issues

Is this now correct?

David


my servoy,properties file looks like this:

#servoy
#Thu Jun 05 18:28:04 BST 2008
ApplicationServer.pingDelay=300
ServerManager.numberOfServers=6
SocketFactory.rmiServerFactory=com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory
SocketFactory.useSSL=true
SocketFactory.useTwoWaySocket=true
font=Tahoma,0,11
java.rmi.server.hostname=127.0.0.1
lastSolution=_START_HERE
log4j.appender.configservlet=com.servoy.j2db.server.SlidingWindowAppender
log4j.appender.configservlet.layout=com.servoy.j2db.server.servlets.Log4JHTMLTableLayout
log4j.appender.configservlet.layout.dateTimeFormat=yyyy-MM-dd HH\:mm
log4j.appender.configservlet.windowSize=1000
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=servoy_log.txt
log4j.appender.file.MaxBackupIndex=1
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p [%t] %c - %m%n
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%t] %c - %m%n
log4j.debug=false
log4j.logger.com.servoy.j2db.util.Debug=WARN
log4j.logger.org.apache.wicket=WARN
log4j.rootCategory=WARN, file, configservlet
nativeStartupLauncher=sybase_db/dbsrv10|@sybase_db/sybase.config\#DYLD_LIBRARY_PATH\=sybase_db
pdf_forms_plugin_servername=pdf_forms
rect_Application_frame_bounds=240,100,800,622
rect_SelectSolutionDialog_bounds=500,304,280,213
server.0.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=servoy_repository&CHARSET\=utf8
server.0.catalog=<none>
server.0.connectionValidationType=0
server.0.driver=com.sybase.jdbc3.jdbc.SybDriver
server.0.enabled=true
server.0.maxConnectionsActive=10
server.0.maxConnectionsIdle=10
server.0.maxPreparedStatementsIdle=100
server.0.password=encrypted\:aD4kOmHPzcM\=
server.0.schema=<none>
server.0.serverName=repository_server
server.0.userName=DBA
server.1.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=user_data&CHARSET\=utf8
server.1.catalog=<none>
server.1.connectionValidationType=0
server.1.driver=com.sybase.jdbc3.jdbc.SybDriver
server.1.enabled=true
server.1.maxConnectionsActive=10
server.1.maxConnectionsIdle=10
server.1.maxPreparedStatementsIdle=100
server.1.password=encrypted\:aD4kOmHPzcM\=
server.1.schema=<none>
server.1.serverName=user_data
server.1.userName=DBA
server.2.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=example&CHARSET\=utf8
server.2.catalog=<none>
server.2.connectionValidationType=0
server.2.driver=com.sybase.jdbc3.jdbc.SybDriver
server.2.enabled=true
server.2.maxConnectionsActive=10
server.2.maxConnectionsIdle=10
server.2.maxPreparedStatementsIdle=100
server.2.password=encrypted\:aD4kOmHPzcM\=
server.2.schema=<none>
server.2.serverName=example_data
server.2.userName=DBA
server.3.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=log_data&CHARSET\=utf8
server.3.catalog=<none>
server.3.connectionValidationType=0
server.3.driver=com.sybase.jdbc3.jdbc.SybDriver
server.3.enabled=true
server.3.maxConnectionsActive=10
server.3.maxConnectionsIdle=10
server.3.maxPreparedStatementsIdle=100
server.3.password=encrypted\:aD4kOmHPzcM\=
server.3.schema=<none>
server.3.serverName=log_server
server.3.userName=DBA
server.4.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=udm&CHARSET\=utf8
server.4.catalog=<none>
server.4.connectionValidationType=0
server.4.driver=com.sybase.jdbc3.jdbc.SybDriver
server.4.enabled=true
server.4.maxConnectionsActive=10
server.4.maxConnectionsIdle=10
server.4.maxPreparedStatementsIdle=100
server.4.password=encrypted\:aD4kOmHPzcM\=
server.4.schema=<none>
server.4.serverName=udm
server.4.userName=DBA
server.5.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=pdf_forms&CHARSET\=utf8
server.5.catalog=<none>
server.5.connectionValidationType=0
server.5.driver=com.sybase.jdbc3.jdbc.SybDriver
server.5.enabled=true
server.5.maxConnectionsActive=10
server.5.maxConnectionsIdle=10
server.5.maxPreparedStatementsIdle=100
server.5.password=encrypted\:aD4kOmHPzcM\=
server.5.schema=<none>
server.5.serverName=pdf_forms
server.5.userName=DBA
servoy.didFirstTimeInit=true
toolbar.align=true
toolbar.align.row=2
toolbar.align.row.index=1
toolbar.design=true
toolbar.design.row=1
toolbar.design.row.index=0
toolbar.distribute=true
toolbar.distribute.row=2
toolbar.distribute.row.index=2
toolbar.draw=true
toolbar.draw.row=2
toolbar.draw.row.index=0
toolbar.edit=true
toolbar.edit.row=0
toolbar.edit.row.index=0
toolbar.text=true
toolbar.text.row=0
toolbar.text.row.index=1
usedRMIRegistryPort=1099
window_state_Application_frame=0

My ./servoy_server.sh file looks like this:

#!/bin/sh

while true
do
	java -Djava.net.preferIPv4Stack=true -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/concurrent.jar:lib/dom4j.jar:lib/help.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/xerces.jar:lib/concurrent.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

[/code]

Hi,

The port does not matter for the tunnel. If you want to run the tunnel on port 80, then you have to make tomcat run on port 80 (as you did above). Otherwise the tunnel will simply work on port 8080.

To enable the tunnel you need to add the following line to your servoy.properties:

SocketFactory.rmiServerFactory=com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory

If you are running tomcat behind apache you need to use mod_proxy with AJP (and the flushpackets=on option), otherwise the connection will not work properly.

Finally, you shouldn’t post your encrypted passwords in a public location unless you have your own private/public keypair in the keystore (and you are not using the default ones).

If you have any other questions, don’t hesitate to ask!

Regards,
Sebastiaan

Thanks Seb,

I am there on the Tunnel. (BTW, i was using the default password from Servoy)

I have got around the issue, by switching all my conventional services to Port 8080 and then it works fine with tomcat on Port 80.

Perhaps one day someone might do a tutorial on the tomcat/apache stuff, but for the moment its a bit above my head.

At least my main solution is served through a single tunnel on a port that no-one blocks!! so thats very cool.

Thanks.

David

I am not familiar with apple web server.

Normally you would configure your webserver to proxy requests for the tomcat which is embedded in Servoy. Note that if you have a webserver running in front of tomcat it is in general not necessary to change the port of the tomcat to 80, because you can just as easily proxy to 8080.

When proxying it is important that the proxy does not buffer. When using apache + mod_proxy this means that you have to use AJP with the flushpackets on option. To be specific, in apache you would need something like this:

    ProxyPass /tunnel ajp://localhost:8009/tunnel flushpackets=on

And in the server.xml of tomcat you would need an AJP connector:

    <Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />

Unfortunately I am not familiar with apple webserver and how to proxy requests using it (without buffering). You could test by using tomcat directly.

Regards,
Sebastiaan

I am not familiar with apple web server

If I am not mistaken OS X shippes with Apache 1.2 by default.

1.2? Are you sure? For mod_proxy with non-buffering AJP (flushpackets option) apache 2.2 is required. :-/

I did some searching.

I found that 1.3 was shipped by default but they seem to have upgraded to 2.0.x per 10.5.3…

Ah, thx for the info. This means that to proxy the tunnel on mac you will need to install Apache 2.2 manually (with mod_proxy).

To run the tunnel directly from tomcat is of course no problem.