Https being downgraded to http in 10.14v


I have a java agent (sdk v10.14) and it points to c8y environment v10.14. when i try to get inventory obj from platform object secure https url is being downgraded to http and failing eventually throwing connection timed out.

Downgraded screenshot:


Caused by: org.apache.http.conn.HttpHostConnectException: Connect to [] failed: Connection timed out (Connection timed out)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.MainClientExec.establishRoute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.MainClientExec.execute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.ProtocolExec.execute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.RetryExec.execute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.execchain.RedirectExec.execute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.client.InternalHttpClient.doExecute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.client.CloseableHttpClient.execute( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.glassfish.jersey.apache.connector.ApacheConnector.apply( ~[jersey-apache-connector-2.35.jar!/:na]
        ... 27 common frames omitted
Caused by: Connection timed out (Connection timed out)
        at java.base/ Method) ~[na:na]
        at java.base/ ~[na:na]
        at java.base/ ~[na:na]
        at java.base/ ~[na:na]
        at java.base/ ~[na:na]
        at java.base/ ~[na:na]
        at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket( ~[httpclient-4.5.13.jar!/:4.5.13]
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect( ~[httpclient-4.5.13.jar!/:4.5.13]
        ... 36 common frames omitted

When i point same agent to c8y v10.6 environment, it works fine. So does any one know what could be causing this and how to fix it?


I think that the application hasn’t been created yet in your 10.14 environment. Also the logs in the background of your screen states that no credentials haven been set so I assume the platform is not correctly initialized with the correct credentials.

How is the platform initialized?

Actually its an agent. We do not want to create it as a serverside application. Sorry for that background, Its misleading. Please ignore that. I had used @MicroserviceApplication in the main class. Check the below image which is the updated one.

This is how platform object is initialized.

What is the return value of platformDetails.getServiceUrl() in both environment 10.14 and 10.6?

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.