I'm getting the below error messages interchangeably when trying to consume an API. It seems so generic error message.
Error 1:
<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>
Error 2:
<am:fault xmlns:am="http://wso2.org/apimanager">
<am:code>303001</am:code>
<am:type>Status report</am:type>
<am:message>Runtime Error</am:message>
<am:description>Currently , Address endpoint : [ Name : somename-AT-sometenant--test_me_APIproductionEndpoint_0 ] [ State : SUSPENDED ]</am:description>
</am:fault>
Any suggestions on how to fix this issue.
I have done some googling and found out it's a timeout that's happening between API Manager and backend. I have tried the solution mentioned in the https://docs.wso2.com/display/AM200/Prevent+API+Suspension link but no use.
Thanks
Related
I try to add (and consume) an REST api on HTTPS through API Manager.
So, with a little schema :
Client (SoapUi) --HTTPS--> APIM --HTTPS--> REST API
Result: Failed
Client (SoapUi) --HTTP--> APIM --HTTPS--> REST API
Result: Failed
Here the stack :
2019-05-17 10:31:02,090 [-] [HTTPS-Listener I/O dispatcher-1] ERROR SourceHandler I/O error: Received fatal alert: certificate_unknown
javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1666)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1634)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1800)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1083)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doUnwrap(SSLIOSession.java:245)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:280)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:410)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586)
at java.lang.Thread.run(Thread.java:745)
I think the problem is between API Manager and the REST API
The REST API Certificate is composed like this :
CA Root Sectigo
|
--> Gandi
|
--> wildcard's Company
I try to add (via publisher's site) the Wildcard's company => no change
I try to add CA root to jvm keystore => no change
Actually, API Manager had the default Self Signed certificate.
Maybe it's a part of the problem.
Any ideas?
Regards,
Mike
Using WSO2 API Manager (V1.10), I published a API and I imported the SSL certificate to client-truststore.jks. But When I call this API, I 'm receving this error:
2016-07-11 11:42:11,296 [-] [HTTPS-Sender I/O dispatcher-7] ERROR TargetHandler I/O error: Received fatal alert: handshake_failure
javax.net.ssl.SSLException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1650)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1618)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1787)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1071)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:893)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:767)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doUnwrap(SSLIOSession.java:228)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:263)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:391)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586)
at java.lang.Thread.run(Thread.java:745)
I suspect your API calling client program does not have the API server's certificate. (Usually you import your certificate into your JRE's jacerts or other trust store)
But When I call this API, I 'm receving this error:
When you call this API, did this API calling client program (Java, for example) also get this WSO2 server's certificate imported? This may solve your problem.
According to the error log this happens in http sender. i.e when api manger invokes the back-end . if your backend is "HTTPS" you need to import its public certificate to trustore of APIM
Had same issue in Java 1.7. Java 1.8 has resolved my problem
I publised one test API on WSO2 API Manager as prototype API. But When I am trying to curl the API endpoint I am getting bellow error
curl http://localhost:8280/weather2/v1.0.0
<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>
I am getting the same error for Managed API as well.
There is existing issue which cause this behavior[]. However you can create a custom sequence as below and add it as a insequencefor the API in manage API phase. The issue was, without below sequence the host header going to endpoint asHost: api.mydubaitrip.com:80 which is not supported by that endpoint.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="remove_port_In">
<property name="REQUEST_HOST_HEADER" value="api.mydubaitrip.com" scope="axis2"/>
</sequence>
[1] https://wso2.org/jira/browse/APIMANAGER-4429
The WSO2 Gateway returns this format of error message:
{"fault":{"code":404,"type":"Status report","message":"Not Found",
"description":"The requested resource (/account-info/1.0/) is not available."}}
But we have a standard format for all error messages that our microservices (which implement the APIs served by WSO2) return. We return a simple JSON object with two fields, error & error_description. So that we can present a consistent interface to our users, in this particular case we would like to see the WSO2 Gateway return exactly this:
{"error":"SERVICE_UNAVAILABLE","error_description":
"The requested resource (/account-info/1.0/) is not available."}
and return the HTTP status code only in the header.
Can you please tell me what I need to do to achieve this. Thank you.
These error messages are generated from default sequences shipped with WSO2 API Manager.
If the requested resource is not found in API Manager, it will execute the main sequence ($AM_HOME/repository/deployment/server/synapse-configs/default/sequences/main.xml). If you open this file, you will see that the above default error message is generated using a payload factory mediator as shown below.
<payloadFactory>
<format>
<am:fault xmlns:am="http://wso2.org/apimanager">
<am:code>404</am:code>
<am:type>Status report</am:type>
<am:message>Not Found</am:message>
<am:description>The requested resource (/$1) is not available.</am:description>
</am:fault>
</format>
<args>
<arg expression="$axis2:REST_URL_POSTFIX" />
</args>
</payloadFactory>
So if you want to customize the error message, then you need to modify the above payload factory mediator according to your need.
Likewise, if there is any faults occur, the fault sequence ($AM_HOME/repository/deployment/server/synapse-configs/default/sequences/fault.xml) will be executed. You might want to change the message format there as well.
Description: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- IIS 7.5 Detailed Error - 500.24 - Internal Server Error Server Error in Application "DEFAULT WEB SITE" Internet Information Services 7.5 Error Summary HTTP Error 500.24 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. Detailed Error Information
Change your application pool properties to:
.NET Framework Version
-- .NET Framework *version*
Pipeline Mode
-- Classic
change your web.config like this:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>