.war servoy deployment...anyone?

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

.war servoy deployment...anyone?

Postby john.allen » Wed Nov 14, 2012 8:52 am

Has anyone used the new .war deployment available with 6.1? We are trying to use it as it eliminates a bunch of headaches in deploying applications here at the Stanford Medical Department.

I've run into a few funny things though and I'm wondering if anyone else has too. In the wiki there is no mention of this but it seems that one loses the ability to stop or restart Servoy server in the servoy-admin pages. At least in our case (6.1.2 on a Linux server), those buttons don't show up. Plus the whole file structure on the server is different so I'm not sure one can run the standard ./servoy_server.sh file to start the server. As I understand from our Linux guy here the other way to 'restart' an application from a .war file is just to 'touch' that .war file and that should force a restart. However we are running into problems trying to do that. I've had it down for a day and half trying to figure out how to get it going again. It seems maybe that the RMI port from the first start might still be left open - does that seem possible? These are the error messages in the servoy_log.txt file:

First one (only on launch):
2012-11-12 14:31:02,037 ERROR [2 way Server Acceptor] com.servoy.j2db.util.Debug - ServerTwoWaySocket accept failure [ ] java.net.SocketException: Socket closed

Then these next two keep on repeating. After the first bit they seem to repeat every half an hour or so...

2012-11-12 14:31:07,321 ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]] com.servoy.j2db.util.Debug - couldnt instantiatie the rmi socketfactory [ ] java.lang.reflect.InvocationTargetException
.
.
Caused by: java.net.SocketException: factory already defined at java.rmi.server.RMISocketFactory.setSocketFactory(RMISocketFactory.java:94)
at com.servoy.j2db.rmi.DefaultServerRMIServerSocketFactoryFactory.<init>(DefaultServerRMIServerSocketFactoryFactory.java:69)
... 27 more

2012-11-12 14:44:41,288 ERROR [TP-Processor12] com.servoy.j2db.util.Debug - Could not register MBean [ ] javax.management.InstanceAlreadyExistsException: com.servoy.datasource:type=repository_server

Anyone have any success with this? In general I think it is a cool way to deploy but right now this is causing a big headache here.

Thanks,

John
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Re: .war servoy deployment...anyone?

Postby Joas » Wed Nov 14, 2012 11:44 am

You can use the tomcat application manager for starting and stopping the Servoy application, look on:
Code: Select all
http://<tomcat_server_ip>:<port>/manager/html

Before you can enter that page you need a user that has the manager-gui role, you can add that in the file tomcat-users.xml in the tomcat/conf folder.
Add something like this:
Code: Select all
<tomcat-users>
  <role rolename="manager-gui"/>
  <user username="john" password="yourpassword" roles="manager-gui"/>
</tomcat-users>
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: .war servoy deployment...anyone?

Postby john.allen » Wed Nov 14, 2012 5:50 pm

Hi Joas,

Thanks for that. I'll talk to the guy in charge of the server when he comes in about setting that up. Couple of things:

1) There isn't any mention of how to handle all of this on the wiki. On the contrary it says everything about what you can do on servoy-admin page is the the same except for the few things it lists like not being able to import new or updated plugins, etc. Could this (how to restart the servoy server) get spelled out there in some detail for idiots like myself? :)

2) On the wiki it says when you do need to add plugins, etc. you simply export a new .war file. If on our server the mechanism for deploying a war file is just to place it (which I believe is the case), wouldn't using the 'touch' command on that war file do a 'restart' also? In this case there wasn't an upgrade of the .war file itself but I was under the impression that simply 'touching' it would do the same thing. I didn't actually know/think that myself but was told that by someone here. I'll pass along your suggestions now of course but should I tell them that the 'touch' command really isn't suitable for ever restarting the .war file/process?

Thanks again
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Re: .war servoy deployment...anyone?

Postby jcompagner » Mon Nov 19, 2012 11:18 am

john.allen wrote:1) There isn't any mention of how to handle all of this on the wiki. On the contrary it says everything about what you can do on servoy-admin page is the the same except for the few things it lists like not being able to import new or updated plugins, etc. Could this (how to restart the servoy server) get spelled out there in some detail for idiots like myself? :)


if you use the WAR deployment, there is no servoy server..
There is just an APP (the war file) the server is standalone can be anything like Tomcat, Websphere, Glassfish

Restart of a server (so the external thing to servoy) is not in servoy's control, also a redeploy (a touch) is not in servoy's control, that is just all handled by the app server you have installed.
Like Joas already mentioned app servers have mananers for that like the tomcat example above. There you can stop/start and redeploy the war/app

So restarting the app/war should be done by a manager application of the App server. Restarting the completely server should be done by using the start/shutdown scripts of the server itself.

john.allen wrote:2) On the wiki it says when you do need to add plugins, etc. you simply export a new .war file. If on our server the mechanism for deploying a war file is just to place it (which I believe is the case), wouldn't using the 'touch' command on that war file do a 'restart' also? In this case there wasn't an upgrade of the .war file itself but I was under the impression that simply 'touching' it would do the same thing. I didn't actually know/think that myself but was told that by someone here. I'll pass along your suggestions now of course but should I tell them that the 'touch' command really isn't suitable for ever restarting the .war file/process?


No touching will not 100% work, for updating plugins.. This is because the WAR exporter generates a few files besides the plugin jars to know what plugin jars there are and what the sizes and timestamps the plugins/bean jar do have.
If you update just a lib or add a plugin, then those files (plugins.properties, beans.properties) are not updated so servoy doesn't know that then.
If you want to update beans, you really just have to generate a new WAR file and upload that (through a mananger app) and redeploy it.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 15 guests