Servoy 7.4.5

I read that the default maxPostSize = 2 Mb…

I adjusted the server.xml in the following way (added maxPostSize=“-1”) :

and restarted the appl. server.

But no improvement, the client gets this error :

INFO - DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8080: Software caused connection abort: socket write error
INFO - DefaultHttpClient - Retrying request to {}->http://localhost:8080
INFO - DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8080: Software caused connection abort: socket write error
INFO - DefaultHttpClient - Retrying request to {}->http://localhost:8080
INFO - DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8080: Software caused connection abort: socket write error
INFO - DefaultHttpClient - Retrying request to {}->http://localhost:8080
dec 03, 2015 3:48:11 PM com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:181)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115)
at org.apache.http.entity.mime.content.FileBody.writeTo(FileBody.java:121)
at org.apache.http.entity.mime.AbstractMultipartForm.doWriteTo(AbstractMultipartForm.java:134)
at org.apache.http.entity.mime.AbstractMultipartForm.writeTo(AbstractMultipartForm.java:157)
at org.apache.http.entity.mime.MultipartFormEntity.writeTo(MultipartFormEntity.java:107)
at org.apache.http.entity.mime.MultipartEntity.writeTo(MultipartEntity.java:171)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:112)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:117)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:265)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:203)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:237)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:122)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at com.servoy.extensions.plugins.http.BaseRequest.executeRequest(BaseRequest.java:212)
at com.servoy.extensions.plugins.http.BaseRequest.js_executeRequest(BaseRequest.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:70)
at org.mozilla.javascript.gen.update_forms_update_solution_importSolution_30._c_importSolution_0(update/forms/update_solution/importSolution:478)
at org.mozilla.javascript.gen.update_forms_update_solution_importSolution_30.call(update/forms/update_solution/importSolution)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:88)
at org.mozilla.javascript.gen.update_forms_update_solution_updateNow_11._c_updateNow_0(update/forms/update_solution/updateNow:150)
at org.mozilla.javascript.gen.update_forms_update_solution_updateNow_11.call(update/forms/update_solution/updateNow)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:62)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_callMethod_10._c_svy_utl_callMethod_0(svy_utilities/scopes/globals/svy_utl_callMethod:2800)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_callMethod_10.call(svy_utilities/scopes/globals/svy_utl_callMethod)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:70)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_busy_process_9._c_svy_utl_busy_process_0(svy_utilities/scopes/globals/svy_utl_busy_process:2444)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_busy_process_9.call(svy_utilities/scopes/globals/svy_utl_busy_process)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:558)
at com.servoy.j2db.smart.J2DBClient.invokeAndWait(J2DBClient.java:4128)
at com.servoy.j2db.plugins.ClientPluginAccessProvider.executeMethod(ClientPluginAccessProvider.java:440)
at com.servoy.j2db.plugins.ClientPluginAccessProvider.executeMethod(ClientPluginAccessProvider.java:416)
at com.servoy.j2db.scripting.FunctionDefinition.exec(FunctionDefinition.java:301)
at com.servoy.j2db.scripting.FunctionDefinition.execute(FunctionDefinition.java:265)
at net.stuff.servoy.BusyAbstractProvider.callProcess(BusyAbstractProvider.java:73)
at com.servoyguy.plugins.busy.swing.BusySwingProvider.busy(BusySwingProvider.java:112)
at com.servoyguy.plugins.busy.BusyScriptObject.js_block(BusyScriptObject.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:62)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_busy_8._c_svy_utl_busy_0(svy_utilities/scopes/globals/svy_utl_busy:2426)
at org.mozilla.javascript.gen.svy_utilities_scopes_globals_svy_utl_busy_8.call(svy_utilities/scopes/globals/svy_utl_busy)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:62)
at org.mozilla.javascript.gen.update_forms_update_solution_updateNow_busy_7._c_updateNow_busy_0(update/forms/update_solution/updateNow_busy:60)
at org.mozilla.javascript.gen.update_forms_update_solution_updateNow_busy_7.call(update/forms/update_solution/updateNow_busy)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:97)
at org.mozilla.javascript.gen.update_forms_update_solution_onShow_6._c_onShow_0(update/forms/update_solution/onShow:43)
at org.mozilla.javascript.gen.update_forms_update_solution_onShow_6.call(update/forms/update_solution/onShow)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204)
at org.mozilla.javascript.gen.update_forms_update_solution_onShow_6.call(update/forms/update_solution/onShow)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:824)
at com.servoy.j2db.BasicFormController.executeFormMethod(BasicFormController.java:708)
at com.servoy.j2db.BasicFormController.executeOnShowMethod(BasicFormController.java:622)
at com.servoy.j2db.BasicFormController.access$2(BasicFormController.java:616)
at com.servoy.j2db.BasicFormController$1.run(BasicFormController.java:356)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Any ideas ?

but if it works through the browser then the problem is somehow in the plugin or something like that
But that one bombs out with a write error

i see that you already testing it purely localhost (so i guess you connect to a app server install where you run your smart client from?)

Still a browser doing the post or http client doing the post should be the same thing, for sure if you look at it from tomcat.

any error in the tomcat logs?

Yes, you’re right : we have our own update (Servoy) server and we start a smart client on that server doing the import.
Not much info in the Tomcat log about what happens at the solution import:

127.0.0.1 - - [03/Dec/2015:16:25:40 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:42 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:43 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:45 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:56 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:56 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:56 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:25:56 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:07 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:08 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:10 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:11 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:23 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:24 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:26 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:27 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:39 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:40 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:42 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [03/Dec/2015:16:26:43 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951

Again : small solution files are imported just fine (< 2 Mb ?) and no problem on server 7.4.4

And that there is no response return object at all from
var _response = _poster.executeRequest(_admin_user, _admin_password)
points imho in the direction that the http plugin has an issue with the changed Tomcat…

Is there a way to check the actual settings of the running Tomcat server ?

just a small note, if you just updated, you did’nt get the new tomcat version.
It is only updated when you do a fresh install.

You can check which tomcat version you have by firing this command line:

java.exe -cp lib\catalina.jar org.apache.catalina.util.ServerInfo

(you have to fire this from the folder: application_server\server)

Hi Harjo,
I didn’t do a fresh install on our Vision 7 test server :

Server version: Apache Tomcat/6.0.44
Server built: May 8 2015 12:18:30 UTC
Server number: 6.0.44.0
OS Name: Windows Server 2008 R2
OS Version: 6.1
Architecture: x86
JVM Version: 1.8.0_66-b18
JVM Vendor: Oracle Corporation

but is that the same localhost that you are testing against? (maybe a developer install?)

Because that looks like the latest release that’s now in the installer.

Setup 2 different servers :

  1. update-server Servoy application server 7 (no developer)
  2. End-user Servoy application server 7.4.5 (no developer)

Server 2 starts a smart client from server 1 and that smart client transfers files from server 1 to server 2
and the same smart client does also the http posting on server 2 (for solution import).

We are working for years now with this approach for updating binaries and solutions.
We have an internal update server for testing purposes.

Lambert,

I just tried a clean install of Servoy 7.4.5, imported a solution file with some big media (14MB), worked fine, also using the file plugin.

I guess something else than the size is the problem.
Do you have anything in the logs of server 2?

Rob

You mean the http plugin ?

In the Servoy log : nothing.
In the Tomcat log :
127.0.0.1 - - [04/Dec/2015:14:20:37 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [04/Dec/2015:14:20:37 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [04/Dec/2015:14:20:37 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951
127.0.0.1 - - [04/Dec/2015:14:20:37 +0100] “POST /servoy-admin/solutions/import HTTP/1.1” 401 951

Strange that the POST is fired 4 times.

I just tried a clean install of Servoy 7.4.5, imported a solution file with some big media (14MB), worked fine

Can there be some kind of difference in tomcat or other config between a clean install 7.4.5 and a
7.4.4 to 7.4.5 upgraded server ?

if you do a clean install of a app server of 7.4.5
and you connect to that locally do you still have the same problem?

but the weird thing is a 401 is a “Unauthorized”
That is what we throw when the username/pw is not correct and an admin user…

and an admin user…

and an admin user what?

only Admin users (belonging to the ‘Administrators’ group) are allowed to access the admin pages.

So if you log in with a user that is not known to the system at all, or not an admin user or the user/password combination is incorrect we throw that 401
Weird thing is that i guess the same user works for you in a smaller solution but not a big one. So i don’t fully understand where then the 401 comes from…

Servoy 7.4.5 releaseNumber 2041 is out since two month, but I don’t get the Servoy application server 7.4.4 (2039) updated by: java -jar servoy_updater.jar!

I always get:
$ java -jar servoy_updater.jar
Current Servoy version 2039
Checking for new Servoy version
Working in directory: /Applications/Servoy74
Loading version info…
No update found, if you want beta versions start with option: -beta
Done, Servoy can be started

What’s wrong?

Regards Thomas

Hi Thomas

You need to force the actual release number:

java -jar servoy_updater.jar -releaseNumber 2041

lwjwillemsen:
We are using the http-plugin to post new solutions (through admin page) into Servoy Application Server.
That works fine in Servoy 5 and Servoy 7.4.4
In 7.4.5 this is broken (Tomcat upgrade ?).
We use this code :
// _solution is file-object

var _client = plugins.http.createNewHttpClient()
_client.setTimeout(0)
_poster = _client.createPostRequest(_url)
_poster.addFile(‘if’, ‘file’, _solution.getAbsolutePath())
_poster.addParameter(‘ac’,‘on’) // Activate new release of imported solution and modules
// and more parameters

var _response = _poster.executeRequest(_admin_user, _admin_password) // _httpCode 200 is ok

The executeRequest returns immediately and _response has no value.
Strange thing is that smaller solution files import just fine!

Help!

We found out that this issue is related to the tomcat upgrade.
In Servoy 8 (yet another Tomcat version) this issue does not occur.

As a workaround, you can set the Authorization header before executing the POST:

poster.addHeader('Authorization', 'Basic ' + encodeBase64(user + ':'+password));

With helper function encodeBase64() as shown By Robert Ivens in viewtopic.php?f=22&t=21288

Rob

So the size of the solution did play a role!

With the Authorization header the solution import runs fine.

Regards and also thanks to Rob and Johan,