You are correct
hmm marcel was even 1 minute quicker then me…
i have to speed up.
pbakker:
- Don’t share the same properties file between two instances (an instance being Servoy server or Servoy Developer)
- Make sure you configure different ports for all instances (or disable HTTP Services in Developer instances)
- When each environment uses their own databases: Make sure they run on different ports and you connect to the proper one.
…
Paul
Hi Paul, I’ve followed the instructions in the Servoy Server manual. What i did was duplicate the entire Servoy folder, changed the ports in server.xml for one instance, changed the RMI settings in Properties. If I run both at once, it always connects to the first opened database (eg MyData.db, which exists in both Servoy and Copy of Servoy folders), as there is only a single ASA Anywhere server running.
Here’s the first server.xml (and RMI set to 1098)
<Server port="8005" shutdown="SHUTDOWN_NOW">
<Service name="Catalina">
<Connector port="8080" minProcessors="1" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" connectionTimeout="60000"/>
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="localhost" appBase="webapps" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common"/>
<Context path="/lib" docBase="../../lib"/>
<Context path="/plugins" docBase="../../plugins"/>
<Context path="/beans" docBase="../../beans"/>
<Context path="/lafs" docBase="../../lafs"/>
</Host>
</Engine>
</Service>
</Server>
and here’s the other (and RMI set to 1099)
<Server port="9005" shutdown="SHUTDOWN_NOW">
<Service name="Catalina">
<Connector port="8081" minProcessors="1" maxProcessors="75"
enableLookups="true" redirectPort="9443"
acceptCount="10" connectionTimeout="60000"/>
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="localhost" appBase="webapps" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common"/>
<Context path="/lib" docBase="../../lib"/>
<Context path="/plugins" docBase="../../plugins"/>
<Context path="/beans" docBase="../../beans"/>
<Context path="/lafs" docBase="../../lafs"/>
</Host>
</Engine>
</Service>
</Server>
How should I make sure DBs run on different ports and I’m connecting to the proper one?
Thanks for the help.
antonio:
How should I make sure DBs run on different ports and I’m connecting to the proper one?
In your Servoy sybase_db/sybase.config file, the port either is or can be configured. In newer installs, the first line looks like this:
-ti 0 -x tcpip{dobroadcast=no;port=2638} -qs -qw -o sybase_db/sybase_log.txt
The Sybase default port number is 2638, change it to anything you like. Then, in the Servoy database definions, you must alter the port number to match. You’ll need to restart both Sybase en Servoy afterwards.
Thanks, that’s clear (and obvious now that you mention it!). Could I suggest that something (suitably generic for different flavours of SQL) is added to the section of the Servoy Server Admin Guide that deals with running multiple instances of Server on one machine (para 14.7 in the Servoy 3.5 manual).
Clear, but no joy yet. I changed the DB ports in sybase_config and in Servoy Prefs and restarted.
I can start either copy of Servoy alone. However, when I try to run them both, the second opened instance fails with Can’t connect to the repository server…
I’ve got different RMI ports etc in each server.xml, as above.
(Mac OS 10.4, Sybase 9)
This is the servoy log
2008-08-26 02:21:26,820 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at com.servoy.j2db.plugins.ClientPluginAccessProvider.getServerService(Unknown Source)
at com.it2be.servoy.plugin.q.a(Unknown Source)
at com.it2be.servoy.plugin.q.a(Unknown Source)
at com.it2be.servoy.plugin.menubar.b.c(Unknown Source)
at com.it2be.common.y.e(Unknown Source)
at com.it2be.common.fg.b(Unknown Source)
at com.it2be.common.fg.a(Unknown Source)
at com.it2be.servoy.plugin.menubar.c.unload(Unknown Source)
at com.servoy.j2db.plugins.PluginManager.flushCachedItems(Unknown Source)
at com.servoy.j2db.ClientState.shutDown(Unknown Source)
at com.servoy.j2db.J2DBClient.shutDown(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.shutDown(Unknown Source)
at com.servoy.j2db.J2DBClient$7.windowClosing(Unknown Source)
at java.awt.Window.processWindowEvent(Window.java:1203)
at javax.swing.JFrame.processWindowEvent(JFrame.java:267)
at java.awt.Window.processEvent(Window.java:1161)
at java.awt.Component.dispatchEventImpl(Component.java:4050)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3885)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:430)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.<init>(Socket.java:367)
at java.net.Socket.<init>(Socket.java:180)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 31 more
2008-08-26 02:21:26,822 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at com.servoy.j2db.plugins.ClientPluginAccessProvider.getServerService(Unknown Source)
at com.it2be.servoy.plugin.q.a(Unknown Source)
at com.it2be.servoy.plugin.q.a(Unknown Source)
at com.it2be.servoy.plugin.ftp.b.c(Unknown Source)
at com.it2be.common.y.e(Unknown Source)
at com.it2be.common.fg.b(Unknown Source)
at com.it2be.common.fg.a(Unknown Source)
at com.it2be.servoy.plugin.ftp.c.unload(Unknown Source)
at com.servoy.j2db.plugins.PluginManager.flushCachedItems(Unknown Source)
at com.servoy.j2db.ClientState.shutDown(Unknown Source)
at com.servoy.j2db.J2DBClient.shutDown(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.shutDown(Unknown Source)
at com.servoy.j2db.J2DBClient$7.windowClosing(Unknown Source)
at java.awt.Window.processWindowEvent(Window.java:1203)
at javax.swing.JFrame.processWindowEvent(JFrame.java:267)
at java.awt.Window.processEvent(Window.java:1161)
at java.awt.Component.dispatchEventImpl(Component.java:4050)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3885)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:430)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.<init>(Socket.java:367)
at java.net.Socket.<init>(Socket.java:180)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 31 more
Hi Tony,
Did you change/add the port setting for Sybase in the sybase.conf, changed it to another port than 2638? (Also Sandor said it was in sybase_db/servoy.conf but that is sybase_db/sybase.conf)
Also check the sybase_log.txt in that same directory to see WHY the database server won’t open (from either installation).
‘Can’t connect to the repository server’ has everything to do with your database server (i.e. Sybase).
Hope this helps.
This is probably a stupid question, but how do you upgrade servoy server from 3.5 rc6 to rc7 without using auto-updater? I need to upgrade developer and server. Is there anyway to do it remotely using the Servoy Server admin page?
Is there anyway to do it remotely using the Servoy Server admin page?
Nope, not through the admin pages.
You can update the server through servoy_server_updater.jar though.
jkipling:
This is probably a stupid question, but how do you upgrade servoy server from 3.5 rc6 to rc7 without using auto-updater? I need to upgrade developer and server. Is there anyway to do it remotely using the Servoy Server admin page?
I assume you mean to upgrade to Servoy 3.5.7
There is no way to do it via the admin page. You can, however, update from the command prompt - whether remote or local - like so:
java -jar servoy_server_updater.jar
With 3.5, you will need to repeat the process for every version released between your current version and the desired version. This is fixed in 4.0.
Yes, I meant 3.5.7, thanks.
So, If I run that java line it will find the necessary upgrade files and take care of everything? I don’t need to move any new files to the servoy directory first?
svroemisse:
I assume you mean to upgrade to Servoy 3.5.7There is no way to do it via the admin page. You can, however, update from the command prompt - whether remote or local - like so:
java -jar servoy_server_updater.jarWith 3.5, you will need to repeat the process for every version released between your current version and the desired version. This is fixed in 4.0.
jkipling:
Yes, I meant 3.5.7, thanks.So, If I run that java line it will find the necessary upgrade files and take care of everything? I don’t need to move any new files to the servoy directory first?
Yes, it will fetch all the files it needs by itself. You will obviously need to shut down your Servoy server or developer instance first though.