Page 1 of 1

Problem accessing https web services after web server change

PostPosted: Tue Apr 03, 2012 10:36 am
by swingman
Hi all,

Mac OS X 10.6.x, latest Java, Servoy 6.0.5

We are using servoy to consume various restful web services over https.
We have upgraded the web server which provides the web services, so the IP address changed overnight. I have restarted the Servoy server, but not the server computer.
The web server providing the services was running with a self-signed certificate before the domain switched over.

I have updated the hosts file on the server machine and can access the same https urls using curl without any problems.

Now, when our headless client tries to access the web services we get messages like this.

Code: Select all
2012-04-03 09:20:30,042 ERROR [pool-4-thread-6] com.servoy.j2db.util.Debug - Throwable [2059C8AC-273D-454C-8E06-5E481607AFE5 wildy_automatic]
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
   at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
   at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
   at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:390)
   at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
   at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
   at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
   at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
   at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
   at com.servoy.extensions.plugins.http.BaseRequest.js_executeRequest(Unknown Source)
   at com.servoy.extensions.plugins.http.BaseRequest.js_executeRequest(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:367)
   at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
   at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
   at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134)
   at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
   at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:528)
   at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:514)
   at com.servoy.j2db.server.headlessclient.SessionClient.invokeAndWait(SessionClient.java:1196)
   at com.servoy.j2db.server.headlessclient.SessionClient.invokeLater(SessionClient.java:1186)
   at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:441)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)


Any ideas on how to get rid of this?

Re: Problem accessing https web services after web server ch

PostPosted: Tue Apr 03, 2012 12:29 pm
by swingman
I have found the problem now.
It was a bad apache config on the new server. Servoy picked up that something was wrong and refused to access the web feeds.