1

When I am starting the WSO2 APIM 3.1.0 server, it fails with the below error since past 2 days. It was starting without any issue before that.

I checked from cmd, if the port 5672 is being used by any other process but found none. Any hints what could be causing this issue?

TID: [-1234] [] [2020-11-11 20:36:05,678]  INFO {qpid.message.broker.listening} - [Broker] BRK-1002 : Starting : Listening on TCP port 5672
TID: [-1234] [] [2020-11-11 20:36:05,694]  INFO {qpid.message.broker.listening} - [Broker] BRK-1002 : Starting : Listening on TCP/SSL port 8672
TID: [-1234] [] [2020-11-11 20:36:26,734] ERROR {org.wso2.carbon.andes.internal.QpidServiceComponent} - Wait until Qpid server starts on port 5672 java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:607)
    at java.net.Socket.connect(Socket.java:556)
    at java.net.Socket.<init>(Socket.java:452)
    at java.net.Socket.<init>(Socket.java:262) 

Found the fix in the link: WSO2 API Manager - Can't start the server

Added the below configurations in the deployment.toml file and the server started without any issue.

[broker.transport.amqp]
bind_address = "localhost"

[broker.transport.amqp.default_connection]
enabled = true
port = 5672
Suman
  • 77
  • 1
  • 12

2 Answers2

1

These error logs are printing since it cannot connect to the traffic manager endpoints.

Hence, please do check traffic manager connectivity configurations in deployment.toml file.

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://Traffic-Manager-host:9611"]
traffic_manager_auth_urls = ["ssl://Traffic-Manager-host:9711"]

[apim.throttling]
service_url = "https://Traffic-Manager-host:${mgt.transport.https.port}/services/"
throttle_decision_endpoints = ["tcp://Traffic-Manager-host:5672"]

According to the exception, it's trying to connect to the following.

ssl://10.0.75.1:9711

Try to telnet over the above host and port in order to check whether the host and port are reachable.

telnet 10.0.75.1 9711

If you are starting an API manager as an all-one node (not having a distributed environment). Try changing the above hostname to localhost.

Please try the above and share the feedback.

Thanks

  • Thanks Dileepa for the suggestion. The throttling configurations were disabled in deployment.toml. I enabled them and now getting just the Qpid error. I have updated the error log above. The hostname is kept as localhost as it is an all in one node. – Suman Nov 11 '20 at 15:14
  • this exception is thrown when the "qpid server" is not bound with port 5672 by the time the URL printer looks for the "qpid server" on port 5672 during the server startup. And the API-M server waits for the "qpid server" to be started and gets timed out. Usually, over time the Qpid server should start and this error should disappear. Are you observing the same. If not please check whether port 5672 is blocked for bound for another service in your environment. – Dileepa Disanayake Nov 11 '20 at 16:29
  • Hi Dileepa, I waited for sometime and checked but the Qpid server didn't start and no other service is using 5672. I verified it from cmd using the command: netstat -ano | findStr "5672" – Suman Nov 12 '20 at 09:45
0

Above issue can be sorted by updating the /etc/hosts file. For the IPV6 loopback address add an entry similar to the below.

::1             localhost   <hostNameOfYourMachine>.local
Rumado
  • 165
  • 2
  • 16