无法访问 AWS EC2 实例上的飞行审查软件

huangapple go评论81阅读模式
英文:

Unable to access flight-review software on AWS EC2 instance

问题

我已经在AWS EC2实例上设置了并安装了必要的软件包以运行航班评论软件。然而,我无法访问EC2实例上的航班评论软件。

我尝试在EC2实例上运行以下命令:

./serve.py --show

但它没有任何响应。当我运行以下命令:

sudo bokeh serve serve.py --port 5006

它指示服务器正在5006端口上运行。然而,当我尝试访问URL http://localhost:5006/serve 时,无法访问该站点。

另外,当我打开EC2实例的公共IP地址时,它显示了一个 "It Works!" 消息,而不是航班评论软件。

我预期在EC2实例上运行命令 ./serve.py --show 将在新页面中打开航班评论软件,类似于在我的本地系统上的运行方式。我也预期访问URL https://localhost:5006/serve 将显示航班评论软件。然而,这两个预期都没有实现,我不确定如何解决这个问题。

当我同时运行以下命令:

./serve.py --show

curl http://localhost:5006

它会打印文件的HTML内容。

英文:

I have set up an AWS EC2 instance and installed the necessary packages to run the flight-review software. However, I am unable to access the flight-review software on the EC2 instance.

I tried running the command

`./serve.py --show` 

on the EC2 instance, but it doesn't give any response.When I ran

sudo bokeh serve serve.py --port 5006,

it indicated that the server is running on port 5006. However, when I try to access the URL http://localhost:5006/serve, the site cannot be reached.

Additionally, when I open the EC2 instance's public IP address, it shows a "It Works!" message instead of the flight-review software.

I expected that running the command ./serve.py --show on the EC2 instance would open the flight-review software in a new page, similar to how it works on my local system. I also expected that accessing the URL https://localhost:5006/serve would display the flight-review software. However, neither of these expectations were met, and I am unsure of how to resolve this issue.

when i run

./serve.py --show

and

 curl http://localhost:5006

simultaneously it prints the html content of the file.

答案1

得分: 1

由于您的服务正在端口5006上运行,您需要在安全组上添加一个入站规则,以允许端口5006上的入站流量。

然后,您可以访问该服务:

http://1.2.3.4:5006/serve

(其中1.2.3.4应替换为实际的公共IP地址)

如果修改/etc/nginx/sites-available/default文件,将其运行在默认的HTTP端口80上可能会更方便。然后,您可以通过以下方式访问该站点:

http://1.2.3.4/serve

英文:

Since your service is running on port 5006, you will need to add an Inbound rule on the Security Group to allow inbound traffic on port 5006.

You could then access the service on:

http://1.2.3.4:5006/serve

(where 1.2.3.4 should be replaced with the actual public IP address)

It might be more convenient to run it on default HTTP port 80 by modifying the /etc/nginx/sites-available/default file. You could then access the site via:

http://1.2.3.4/serve

huangapple
  • 本文由 发表于 2023年7月3日 15:37:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76602721.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定