I have a java application deployed on docker container. My service access aws sqs as a requirement but while running service on container I am getting below exception:
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘queueProcessor’: Invocation of init method failed; nested exception is com.amazonaws.SdkClientException: Unable to execute HTTP request: sqs.ap-south-1.amazonaws.com
Looks like some firewall or iptables configuration is needed inside container in order to access outside resource. Please help
There should be more information in the exception which details the problem such as timeout or some other error. Take a look and post the entire exception here.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com…queue.QueueProcessor com.queueProcessor; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘queueProcessor’: Invocation of init method failed; nested exception is com.amazonaws.SdkClientException: Unable to execute HTTP request: sqs.ap-south-1.amazonaws.com
Above is complete stack trace. I am not able to do even CURL to external hosted service. ex. curl http://127.0.0.1:8084/health from container.
root@c87dd70e851b:/usr/dockerservice# netstat -an | grep :8084
bash: netstat: command not found
when i try to install basic command (vi, netstat, lsof etc) it’s not updating anything from outside. Seems like container not able connect anything from external world.