I have a proxy to an external web services being called by a schedule task in WSO2 EI 6.0. I can see the request being sent out of the ESB as an instance gets logged in ESB Analytics but it's not clear to me what is happening with the response payload.
These log messages show up in wso2carbon.log file:
TID: [-1] [] [2017-05-08 18:22:27,875] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Connection time out after request is read: http-incoming-85 Socket Timeout : 180000 Remote Address : /XX.XX.XX.XX:35380 {org.apache.synapse.transport.passthru.SourceHandler}
TID: [-1] [] [2017-05-08 18:17:27,896] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Connection time out after request is read: http-incoming-84 Socket Timeout : 180000 Remote Address : /XX.XX.XX.XX:57507 {org.apache.synapse.transport.passthru.SourceHandler}
TID: [-1] [] [2017-05-08 18:12:28,364] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Connection time out after request is read: http-incoming-83 Socket Timeout : 180000 Remote Address : /XX.XX.XX.XX:50387 {org.apache.synapse.transport.passthru.SourceHandler}
XX.XX.XX.XX is the remote address where the webserices are hosted. I can understand from this the the response is getting lost because these ports are not open in the firewall hosting this WSO2 instance, but for security reasons I cannot open all ports so these random ports would always work.
I need to understand why WSO2 is expecting the response at these ports and not on the same port where the request connection was made (443 in my case), and even why a separate connection need to be established since this is a synchronous web service.
Please let me know any resource available containing more details on how the transport pass trough is affecting this.
If this is some functionality from WSO2 or Synapse is there a way to disable it?
If I end up having to open all ports in the firewall to support this, is there a way to limit the random port numbers to an specific range?
Thanks in advance.
Related
We deployed a long running HTTP service on WSO2 APIM 3.2.0 that needs approx. 6-15minutes to reply to a request. To support long running HTTP calls we configured the API endpoint timeouts to 15mins and also the APIM in the deployment.toml:
[synapse_properties]
'synapse.global_timeout_interval' = 900000
[passthru_http]
'http.socket.timeout' = 1000000
However, always after exactly 5 minutes we get the following error:
<am:fault xmlns:am=“http://wso2.org/apimanager”><am:code>101508</am:code><am:type>Status report</am:type><am:message>Runtime Error</am:message><am:description>Error in Sender</am:description></am:fault>
This indicates that our backend service is terminating the connection. However, if we call the service directly, i.e. without APIM Gateway it replies after 6-15min. Do we miss any timeout settings in APIM that it completes after 5mins ?
Thanks a lot for your help!
Cheers,
Sebastian
101508, this will happen because the backend endpoint is getting timed out. You could see the occurrences of the endpoint time out and in the same way, the entire HTTP socket also gets timeout in the wso2carbon.log.
Sample endpoint timeout log
TID: [-1234] [] [2022-02-22 21:30:43,187] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : <ENDPOINT> will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
Sample socket timeout
TID: [-1] [] [2022-02-22 21:30:43,186] WARN {org.apache.synapse.transport.passthru.TargetHandler} - Connection closed by target host before receiving the response {org.apache.synapse.transport.passthru.TargetHandler
Please check the endpoint and htp.socket.timeout values as mentioned in the WSO2 documentation[1].
You should increase the above values that should be more than 6-15 minutes. You can configure it in milliseconds.
[1] https://apim.docs.wso2.com/en/3.2.0/learn/design-api/endpoints/resiliency/endpoint-timeouts/
Note: The socket timeout value should be greater than both the Synapse global timeout and any endpoint timeouts given for your API.
I'm getting the below error after starting a new WSO2 APIM 4 instance.
TID: [-1] [] [2022-01-09 09:19:45,277] ERROR {org.wso2.carbon.apimgt.common.jms.JMSListener} - JMS Provider is not yet started. Please start the JMS provider now.
TID: [-1] [] [2022-01-09 09:19:45,277] ERROR {org.wso2.carbon.apimgt.common.jms.JMSListener} - Connection attempt : 4 for JMS Provider failed. Next retry in 160 seconds
OS: CentOS 7.9
Java: OpenJDK 8
wso2apim version :4.0.0
I was using super admin password containing (#) issue resolved by removing the (#) from my admin password.
API amanger uses this password in connection strings to connect to JMS .
I'm trying to create a new API from a rest service in WSO2 Publisher and I'm getting an error when I try to validate the endpoint:
When I go to log it shows the message:
[2021-03-30 22:09:54,744] ERROR - ApisApiServiceImpl Error occurred while sending the HEAD request to the given endpoint url:
java.net.ConnectException: Connection refused (Connection refused)
What am I doing wrong?
If I progress the creation when I try to test I get another error:
[2021-03-30 22:15:31,311] WARN - SourceHandler I/O error: Received fatal alert: certificate_unknown
[2021-03-30 22:15:31,351] WARN - ConnectCallback Connection refused or failed for : localhost/127.0.0.1:8888
[2021-03-30 22:15:31,353] WARN - EndpointContext Endpoint : CpoExecutorAPI--v1.0.0_APIproductionEndpoint with address http://localhost:8888/cpo-executor/dev will be marked SUSPENDED as it failed
Apart from the certificate issue, another possible cause for this error is network connectivity. Please make sure that there weren't any network issues while invoking the request and the network connectivity was stable. Also, please check whether you can directly connect to the provided endpoint URL and get the responses without any issues.
WARN - SourceHandler I/O error: Received fatal alert: certificate_unknown
With the above-mentioned warning, we can suspect there is an issue with certificates.
Therefore, if you have made any recent certificate changes in your environment can you check whether the required certs are available in the API Manager Keystore?
I have change the carbon.xml, Offset 0 to 1
Server started with message:
[2017-08-03 11:51:56,169] INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} - Mgt Console URL : https://IP:9444/carbon/
But I am not able to access to Application server with the URL above
Issue have been resolved.
My LAN connection have blocked the port.
my client sending me single request that time my proxy processing the response well
whenever number of clients increasing my proxy went error
means same service hit by number of client request with HTTP request
my error like this
PassThroughHttpListener System may be unstable: HTTP ListeningIOReactor encountered a runtime exception : null
java.lang.NullPointerException
at org.apache.synapse.transport.passthru.SourceResponse.start(SourceResponse.java:83)
at org.apache.synapse.transport.passthru.SourceHandler.responseReady(SourceHandler.java:184)
at org.apache.http.impl.nio.DefaultNHttpServerConnection.produceOutput(DefaultNHttpServerConnection.java:223)
at org.apache.http.impl.nio.DefaultServerIOEventDispatch.outputReady(DefaultServerIOEventDispatch.java:161)
at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:179)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:344)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:318)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542)
at java.lang.Thread.run(Thread.java:679)
Can we handle number of clients in wso2esb for that i need to set any HTTP NOnBlocking Property