• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

NoRouteToHostException after switching the architecture

I have been maintaining a pretty old and big legacy java project which has around 19 different web service integration. Previously all those web services had been accessed using different URLs (expectedly :) ). But lately customer decided to switch to a new way of security design internally and asked us to integrate to it.

new service access design

As you can see. Now we are accessing to the same Host with with different URIs to distinguish the services. But our app has a scheduler module which goes over a huge amount of data in touch with integrated services. After the switch completed now we are facing with below exception.

2019-12-18 06:58:13,247 ERROR WsClient - Error occured for record xxxxxx org.springframework.ws.client.WebServiceIOException: I/O error: Cannot assign requested address; nested exception is java.net.NoRouteToHostException: Cannot assign requested address     at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:543)     at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:384)     at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:374)     at com.company.apigw.ApiGatewayAwareWebServiceTemplate.marshalSendAndReceive(ApiGatewayAwareWebServiceTemplate.java:45)     at com.company.impl.WsClient.getDataFromService(WsClient.java:82)                 ..... Caused by: java.net.NoRouteToHostException: Cannot assign requested address     at java.net.PlainSocketImpl.socketConnect(Native Method)     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)     at java.net.Socket.connect(Socket.java:579)     at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)     at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)     at sun.net.NetworkClient.doConnect(NetworkClient.java:180)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)     at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:275)     at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371) 

considering this was not happening with previous design but started with new design.

Can we say there is an issue with accessing huge number of requests to the same host causes the ports stuck in TIME_WAIT and finally out of available source ports case throws the exception ?

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]