I have created Red Hat VM in Microsoft Azure and able to connect via ssh.
我在Microsoft Azure中创建了Red Hat VM,并且能够通过ssh进行连接。
I have started Java server in VM with port 8081 and it started successfully. But I am not able view it in browser. Its doesn't get loaded.
我已经在VM中使用端口8081启动了Java服务器并且它已成功启动。但是我无法在浏览器中查看它。它没有加载。
I have tried the following and but all doesn't get loaded:-
我尝试过以下内容,但所有内容都没有加载: -
host:80
host:8080
host:8081
I have added Inbound security rule in Network security Group and associated subnet to it. Still I am not able view my server in browser.
我已在网络安全组和相关子网中添加了入站安全规则。我仍然无法在浏览器中查看我的服务器。
I have followed this document for inbound security rule
我已遵循此文档的入站安全规则
这是我的入境规则
netstat -tuplen
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 127.0.0.1:29131 0.0.0.0:* LISTEN 0 20864 -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 13894 -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 18132 -
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 994 19499 -
tcp6 0 0 :::111 :::* LISTEN 0 13893 -
tcp6 0 0 :::8081 :::* LISTEN 1000 28721 3212/java
tcp6 0 0 :::22 :::* LISTEN 0 18143 -
tcp6 0 0 :::9080 :::* LISTEN 1000 28547 3212/java
udp 0 0 0.0.0.0:68 0.0.0.0:* 0 16585 -
udp 0 0 0.0.0.0:111 0.0.0.0:* 0 23825 -
udp 0 0 127.0.0.1:323 0.0.0.0:* 995 15601 -
udp 0 0 0.0.0.0:45876 0.0.0.0:* 0 16574 -
udp 0 0 0.0.0.0:893 0.0.0.0:* 0 23826 -
udp6 0 0 :::57126 :::* 0 16575 -
udp6 0 0 :::111 :::* 0 23827 -
udp6 0 0 ::1:323 :::* 995 15602 -
udp6 0 0 :::893 :::* 0 23828 -
ss -tln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 10 127.0.0.1:29131 *:*
LISTEN 0 128 *:111 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 127.0.0.1:27017 *:*
LISTEN 0 128 :::111 :::*
LISTEN 0 50 :::8081 :::*
LISTEN 0 128 :::22 :::*
LISTEN 0 50 :::9080 :::*
1 个解决方案
#1
2
According to your screenshot, I notice that your service is listening on tcp6. Based on my knowledge, if the port only provides ipv6 service, you could not use IPv4 address to access.
根据你的截图,我注意到你的服务正在监听tcp6。据我所知,如果端口只提供ipv6服务,则无法使用IPv4地址进行访问。
I notice that you use jetty container, jetty use IPv6 by default. You could allow jetty force to use IPv4. There is a good answer about this.
我注意到你使用jetty容器,jetty默认使用IPv6。您可以允许jetty force使用IPv4。对此有一个很好的答案。
#1
2
According to your screenshot, I notice that your service is listening on tcp6. Based on my knowledge, if the port only provides ipv6 service, you could not use IPv4 address to access.
根据你的截图,我注意到你的服务正在监听tcp6。据我所知,如果端口只提供ipv6服务,则无法使用IPv4地址进行访问。
I notice that you use jetty container, jetty use IPv6 by default. You could allow jetty force to use IPv4. There is a good answer about this.
我注意到你使用jetty容器,jetty默认使用IPv6。您可以允许jetty force使用IPv4。对此有一个很好的答案。