I am unable to make any API calls. When I make the API calls via the UI, I am getting the following error:
Error Sending Request Could not connect to http://<hostalias>/myapi. Make sure the URL is correct.
Can you please help in fixing this error ?
Solved! Go to Solution.
netstat -lnt
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN tcp 0 0 <Internal IP address>:9001 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:443 0.0.0.0:* LISTEN tcp 0 0 <Internal IP address>:443 0.0.0.0:* LISTEN tcp 0 0 <External IP address>:443 0.0.0.0:* LISTEN
curl -v http://<Router's IP address>:9001/myapi -H "Host: <hostalias>"
Enabling the routers to listen on the port # 9001 for external IP address resolved the issue.
netstat -lnt
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN tcp 0 0 <Internal IP address>:9001 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:443 0.0.0.0:* LISTEN tcp 0 0 <Internal IP address>:443 0.0.0.0:* LISTEN tcp 0 0 <External IP address>:443 0.0.0.0:* LISTEN
curl -v http://<Router's IP address>:9001/myapi -H "Host: <hostalias>"
Enabling the routers to listen on the port # 9001 for external IP address resolved the issue.
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |