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.(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.
You can use the tomcat application manager for starting and stopping the Servoy application, look on: ```
http://<tomcat_server_ip>:/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:
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:
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?
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?
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:
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.