08-04-2020 08:54 AM
i have a java application and it can successfully connect to api.meraki.com in my local machine but when i deploy my java application to test server, the application which lives in a docker container can not connect to api.meraki.com. but in host machine i also can curl the api.meraki.com but inside my docker container (docker exec -it xxx /bin/bash), i can not curl it gives an connection refused error. i tried to use a new api key for test server but it is still giving connection refused error. i tried to allow my test server form meraki dashboard but no succcess. any ideas that what is the problem and solution?
Solved! Go to Solution.
08-05-2020 05:34 AM
test server was behind proxy and it was not configured, configuring both container and the application resolved the problem. (i think the application is connecting other service bypassing the proxy.
08-04-2020 12:04 PM
Can you ping api.meraki.com from within the container? Are you able to connect to some other http service from it?
08-04-2020 11:38 PM
i can not ping api.meraki.com in both host and container. but in host machine, running
curl -L --request GET --url https://api.meraki.com/api/v0/organizations --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-Cisco-Meraki-API-Key: xxx'return organizations successfully but if i run this inside container it returns connection refused.
application is connected another http service already but still not pinging in both host and container, but can be curl in both host and container.
08-04-2020 10:15 PM
It sounds like your test server either can not resolve the DNS name or does not have access to it. Check with whoever administers the firewall.
08-04-2020 11:41 PM
i think it resolves the dns name because when i ping it gives ip:
root@db3680bc4ba3:/usr/lib/jvm/java-8-openjdk-amd64/jre/bin# ping api.meraki.com
PING mun211.meraki.com (209.206.57.71): 56 data bytes
08-05-2020 12:18 AM
my container is redhat when i run
getent hosts api.meraki.comit gives
209.206.57.38 mun178.meraki.com api.meraki.com emea.api.meraki.com n3.meraki.com
08-05-2020 05:34 AM
test server was behind proxy and it was not configured, configuring both container and the application resolved the problem. (i think the application is connecting other service bypassing the proxy.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide