2

I'm trying to configure an application with XPM.

But my application returns an error 500.

That is my application's cd_core.log:

2016-04-05 12:56:03,415 INFO ClientSessionManager - Cleanup of expired preview session for machine name: MachineName1 started. 2016-04-05 12:56:03,415 INFO ClientSessionManager - Cleanup of expired preview session for machine name: MachineName1 started. 2016-04-05 12:56:03,415 DEBUG DefaultODataClient - Getting entity for query ODataClientQuery[GetExpiredPreviewSessionsFunctionImport] 2016-04-05 12:56:03,415 DEBUG BasicEndpointCaller - Preparing the call endpoint for given url: http://localhost:8083/client/v4/content.svc/GetExpiredPreviewSessionsFunctionImport 2016-04-05 12:56:03,417 ERROR BasicEndpointCaller - Exception when getting Input Stream java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_31] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_31] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_31] at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) ~[na:1.8.0_31] at com.sdl.odata.client.caller.BasicEndpointCaller.getInputStream(BasicEndpointCaller.java:251) [odata_client-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.client.caller.BasicEndpointCaller.getResponse(BasicEndpointCaller.java:218) [odata_client-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.client.caller.BasicEndpointCaller.callEndpoint(BasicEndpointCaller.java:80) [odata_client-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.client.DefaultODataClient.getODataResponse(DefaultODataClient.java:141) [odata_client-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.client.DefaultODataClient.getEntity(DefaultODataClient.java:69) [odata_client-2.0.0-1218.jar:2.0.0-1218] at com.sdl.web.content.client.ContentClient.getEntitiesFromStorage(ContentClient.java:238) [content-client-api-8.1.0-1233.jar:8.1.0-1233] at com.sdl.web.content.client.ContentClient.getEntityFromDataStore(ContentClient.java:214) [content-client-api-8.1.0-1233.jar:8.1.0-1233] at com.sdl.web.content.client.ContentClient.getEntity(ContentClient.java:162) [content-client-api-8.1.0-1233.jar:8.1.0-1233] at com.sdl.web.preview.client.session.ClientSessionManager.performCleanup(ClientSessionManager.java:123) [cd_preview_content_client-8.1.0-1241.jar:8.1.0-1241] at com.sdl.web.preview.client.session.ClientSessionCleanerMonitor.run(ClientSessionCleanerMonitor.java:50) [cd_preview_content_client-8.1.0-1241.jar:8.1.0-1241] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] 2016-04-05 12:56:03,417 ERROR BasicEndpointCaller - Exception when getting data from service endpoint java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_31] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_31] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_31] at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:1.8.0_31] at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:1.8.0_31] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168) ~[na:1.8.0_31]

I have my discovery service in another machine. I have configured all services with IP not with 'localhost'.

2nd EDITION:

I can access to discovery via Postman. Also I can do Telnet from my web server to Discovery (server and port).

Could anyone helps me?

Thanks in advance!

  • The error suggests a connectivity issue ("Connection refused at java.net.PlainSocketImpl.socketConnect"). Can you double check connections between services? – Nuno Linhares Apr 5 '16 at 13:04
3

If you have changed the discovery services to another machine, as you said, then probably some of the capabilities remain unchanged in the discovery database.

Try checking the capabilities registered with

java - jar discovery-registration.jar read

There you may find your "http://localhost:8083/..." reference, and update it to your IP or hostname url.

If you have deleted some of the capabilities and you have run the registration tool with the update option, this doesn't remove the deleted capabilities.

As it is stated in the documentation you have to run the discovery tool with the sync option to update and remove the deleted capabilities but this "sync" option must be available in some patch, because I don't have this option.

  • Exactly! when I executed the command that you say, I can see some services with old configuration. I solved the issue Thanks a lot! – Jose Honorato Apr 6 '16 at 7:46
  • Hi Raúl. As you say, in the last update Sync option was modified to delete capabilities: Improved Capability management The sync command in the Capability registration tool enables you to delete Capabilities from the registry. – Jose Honorato Apr 12 '16 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.