Page 2 of 3

PostPosted: Tue Jul 31, 2007 12:37 pm
by Hans Nieuwenhuis
Would it be oke to install two instances of Servoy on the same Windows box? One as Server and one as Developer.

One "server" in .../Servoy_server

One "developer" in .../Servoy_developer

and start developer only from the developer instance ??
and have the server running from the server instance at the same time ??

If it is allowed, then you have a developer and a server environment on the same server. Mainly for testing purposes.

Tia

PostPosted: Tue Jul 31, 2007 12:47 pm
by IT2Be
So long as you use these two on different repositories and databases it is something many developers do.
However, when you mix either of these (or both) you are in trouble.

PostPosted: Tue Jul 31, 2007 12:48 pm
by jcompagner
you can't start the services on the the developer or you have to change all the ports (like 8080 and so on).

But it is possible to connect with a developer to the server repository, only be careful with database changes!
And when you alter stuff to the solution the server won't see it and you need to flush the soluton. Also when you change the database you need to restart the server.

PostPosted: Tue Jul 31, 2007 12:51 pm
by pbakker
You can have as many instances of Servoy running on the same machine, no problem there. The things you have to look out for are the following:
    - 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.
    - When sharing databases between instances, be aware that changes done through one instance of Servoy are not broadcast to the other instance of Servoy. When you make use of Servoy Sequences in your solutions, you're bound for trouble here, so either use database sequences then, or don't share databases between instances of Servoy.
    - when connecting multiple instances of Servoy to the same Repository Database: ALERT!!! ALERT!!! ALERT!!! know what you're doing.... Plenty of advice on this forum already about the do's and donts in this area.


Regards,

Paul

PostPosted: Tue Jul 31, 2007 12:53 pm
by pbakker
So, everyone eager to respond on this one.... :D

PostPosted: Tue Jul 31, 2007 12:53 pm
by IT2Be
You are correct :)

PostPosted: Tue Jul 31, 2007 1:14 pm
by jcompagner
hmm marcel was even 1 minute quicker then me..
i have to speed up.

Re:

PostPosted: Sun Aug 24, 2008 5:44 pm
by antonio
pbakker wrote:
    - 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)
Code: Select all
<Server port="8005" shutdown="SHUTDOWN_NOW">
  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector port="8080" minProcessors="1" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" connectionTimeout="60000"/>
    <!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">

      <!-- Because this Realm is here, an instance will be shared globally -->
      <Realm className="org.apache.catalina.realm.MemoryRealm" />

      <!-- Define the default virtual host -->
      <Host name="localhost" appBase="webapps" unpackWARs="true">


        <!-- Access log processes all requests for this virtual host.  By
             default, log files are created in the "logs" directory relative to
             $CATALINA_HOME.  If you wish, you can specify a different
             directory with the "directory" attribute.  Specify either a relative
             (to $CATALINA_HOME) or absolute path to the desired directory.
        -->
        <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)

Code: Select all
<Server port="9005" shutdown="SHUTDOWN_NOW">
  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8081 -->
    <Connector port="8081" minProcessors="1" maxProcessors="75"
               enableLookups="true" redirectPort="9443"
               acceptCount="10" connectionTimeout="60000"/>
    <!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">

      <!-- Because this Realm is here, an instance will be shared globally -->
      <Realm className="org.apache.catalina.realm.MemoryRealm" />

      <!-- Define the default virtual host -->
      <Host name="localhost" appBase="webapps" unpackWARs="true">


        <!-- Access log processes all requests for this virtual host.  By
             default, log files are created in the "logs" directory relative to
             $CATALINA_HOME.  If you wish, you can specify a different
             directory with the "directory" attribute.  Specify either a relative
             (to $CATALINA_HOME) or absolute path to the desired directory.
        -->
        <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.

Re: Re:

PostPosted: Mon Aug 25, 2008 8:18 am
by svroemisse
antonio wrote: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:
Code: Select all
-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.

Re: Servoy 3.5 rc7

PostPosted: Mon Aug 25, 2008 5:21 pm
by antonio
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).

Re: Servoy 3.5 rc7

PostPosted: Mon Aug 25, 2008 6:30 pm
by antonio
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

Code: Select all
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

Re: Servoy 3.5 rc7

PostPosted: Mon Aug 25, 2008 10:20 pm
by ROCLASI
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.

Re: Servoy 3.5 rc7

PostPosted: Tue Nov 25, 2008 4:49 pm
by 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?

Re: Servoy 3.5 rc7

PostPosted: Tue Nov 25, 2008 4:56 pm
by IT2Be
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.

Re: Servoy 3.5 rc7

PostPosted: Tue Nov 25, 2008 4:56 pm
by svroemisse
jkipling wrote: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:
Code: Select all
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.