EC2 Java Spring Boot App Request Problem

0

Hi everyone, I have a java spring boot application. The application scrapes some pages with jsoup. On localhost everything works fine but i set up ec2 server with elastic beanstalk and i am trying to request my api but api response with "java.net.SocketTimeoutException: Connect timed out" so what i am supposed to do.

  • What are the security group settings for your Beanstalk? Does it allow outbound connections? Can you test it with something like amazon.com to make sure? If that is ok then it is very possible that the destination API is blocking traffic from AWS to prevent scraping at scale. Can you share the site where you're getting the timeout?

  • i have tried and the api works with another url but url i want doesn't work still.

Wallog
已提问 5 个月前301 查看次数
2 回答
0

Make sure CORS is enabled for your application to scrape external pages.

profile pictureAWS
审核人员
已回答 5 个月前
0

i have tried and the api works with another url but url i want doesn't work still.

Wallog
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则