如何通过局域网访问8080上的网页(由Ubuntu上的Pycharm许可证服务器提供)

如何通过局域网访问8080上的网页(由Ubuntu上的Pycharm许可证服务器提供),pycharm,licensing,ubuntu-16.04,lan,ports,Pycharm,Licensing,Ubuntu 16.04,Lan,Ports,我正试图在我的局域网上设置一个 我有一个Ubuntu 16.04服务器,hightower就是为了实现这一点而设置的。我已经安装了许可证服务器,它似乎在8080上成功运行: admin@hightower:/opt/jetbrains$ sudo bin/license-server.sh start Starting JetBrains License Service... * Logging initialized @269ms * jetty-9.3.z-SNAPSHOT INFO

我正试图在我的局域网上设置一个

我有一个Ubuntu 16.04服务器,hightower就是为了实现这一点而设置的。我已经安装了许可证服务器,它似乎在8080上成功运行:

admin@hightower:/opt/jetbrains$ sudo bin/license-server.sh start
Starting JetBrains License Service...
* Logging initialized @269ms 
* jetty-9.3.z-SNAPSHOT 
INFO  Config:92 - Reading classpath resource config/base.conf
INFO  Application:60 - Recources scan took 61
INFO  ApplicationContext:31 - Executing startup sequence on class com.jetbrains.ls.floating.LSApplication
INFO  Server:64 - Initializing from server-config.xml
INFO  Server:81 - server-config.xml is missing or corrupt. /root/.jb-license-server/server-config.xml (No such file or directory)
INFO  ApplicationContext:31 - Executing startup sequence on class com.jetbrains.ls.config.Config
INFO  ApplicationContext:31 - Executing startup sequence on class com.jetbrains.ls.floating.upstream.LogQueue
INFO  ApplicationContext:31 - Executing startup sequence on class com.jetbrains.ls.floating.reporting.ReportingQueue
INFO  ApplicationContext:31 - Executing startup sequence on class com.jetbrains.ls.floating.reporting.ResultStorage
MaxData ok
SimpleKey okCounterKeys ok
UsersAndIps ok
IntervalResults ok
INFO  Storage:41 - Results: 30/01/2017 12:45 - 30/01/2017 13:23. Last uploaded: null
INFO  ApplicationContext:31 - Executing startup sequence on class com.jetbrains.ls.floating.state.StallTicketRemover
* Started o.e.j.w.WebAppContext@49a1e95a{/,file:///opt/jetbrains/web/,AVAILABLE,localhost} 
* Started c.j.l.f.s.FakeHostsHandler@11922408{/,null,AVAILABLE} 
* Started ServerConnector@2280485f{HTTP/1.1,[http/1.1]}{hightower:8080} 
* Started @1055ms 
* JetBrains License Service is listening on {hightower:8080} 
JetBrains License Service is running
但我无法从局域网上的另一台计算机访问,以便继续此过程

从工作站,01-e在局域网上,使用GUI/Ubuntu 16.04,尝试访问hightower:8080或http://hightower:8080/register 或192.168.0.7:8080或hightower.domain.local:80801或任何组合给我:

Firefox无法与hightower:8080上的服务器建立连接

我能看到高塔:

...-01-e:~$ ping hightower
PING hightower.domain.local (192.168.0.7) 56(84) bytes of data.
64 bytes from hightower.domain.local (192.168.0.7): icmp_seq=1 ttl=64 time=0.170 ms
防火墙未打开,在服务器hightower上

在黑暗中刺穿以查看页面是否已被送达:

admin@hightower:/opt/jetbrains$ wget hightower:8080
--2017-01-30 13:47:38--  http://hightower:8080/
Resolving hightower (hightower)... 127.0.1.1
Connecting to hightower (hightower)|127.0.1.1|:8080... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://hightower:8080/register [following]
--2017-01-30 13:47:38--  http://hightower:8080/register
Reusing existing connection to hightower:8080.
HTTP request sent, awaiting response... 200 OK
那么,如何使此页面在局域网上可见

编辑:额外挖掘,似乎8080只提供给本地主机。我猜这就是问题所在

admin@hightower:/opt/jetbrains$ netstat -nl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN    
tcp6       0      0 127.0.1.1:8080          :::*                    LISTEN    
tcp6       0      0 :::22                   :::*                    LISTEN    
tcp6       0      0 127.0.0.1:33247         :::*                    LISTEN
编辑:


修好了。我必须跑:

<license_server_home>/bin/license-server.sh configure --port 8080 --listen 0.0.0.0

但有人向我建议,这不是一个好的做法,因为我只想访问一个端口。

问题的原因可能是许可证服务器设置为127.0.1.1,而不是机器的IP。您可以在安装许可证服务器的计算机上查看hosts文件,您可能可以在那里解决问题。如果没有,请发布主机文件的内容好吗?已添加。所以我只需要把hightower的IP换成它的LAN IP?
admin@hightower:~$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   hightower

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
<license_server_home>/bin/license-server.sh configure --port 8080 --listen 0.0.0.0
<license_server_home>/bin/license-server.sh configure --port 8080 --listen license-server.mydomain.com
admin@hightower:~$ cat /etc/hosts
127.0.0.1   localhost
0.0.0.0     hightower