如何通过 LAN 在 8080 上访问网页(由 Pycharm 许可证服务器提供服务,位于 Ubuntu)
How to access webpage (served by Pycharm License Server, on Ubuntu) on 8080 over LAN
我正在尝试在我的 LAN 上设置 PyCharm License Server。
我有一个 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
但是我无法从局域网上的另一台计算机访问 webpage at 8080,以便继续该过程。
从工作站 01-e
在 LAN 上使用 GUI/Ubuntu 16.04,尝试访问 hightower:8080
或 http://hightower:8080/register
或 192.168.0.7:8080
或 hightower.domain.local:80801
或任何组合给我:
Firefox can’t establish a connection to the server at hightower:8080.
我可以 ping hightower:
...-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$ sudo ufw status
Status: inactive
在黑暗中刺探以查看页面是否实际被提供:
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
那么如何让这个页面在我的 LAN 上可见?
编辑:进一步挖掘,似乎 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
编辑:
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
我可能也可以将 /etc/hosts 更改为:
admin@hightower:~$ cat /etc/hosts
127.0.0.1 localhost
0.0.0.0 hightower
但有人向我推荐这不是一个好的做法,因为我只想访问一个端口。
我正在尝试在我的 LAN 上设置 PyCharm License Server。
我有一个 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
但是我无法从局域网上的另一台计算机访问 webpage at 8080,以便继续该过程。
从工作站 01-e
在 LAN 上使用 GUI/Ubuntu 16.04,尝试访问 hightower:8080
或 http://hightower:8080/register
或 192.168.0.7:8080
或 hightower.domain.local:80801
或任何组合给我:
Firefox can’t establish a connection to the server at hightower:8080.
我可以 ping hightower:
...-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$ sudo ufw status
Status: inactive
在黑暗中刺探以查看页面是否实际被提供:
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
那么如何让这个页面在我的 LAN 上可见?
编辑:进一步挖掘,似乎 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
编辑:
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
我可能也可以将 /etc/hosts 更改为:
admin@hightower:~$ cat /etc/hosts
127.0.0.1 localhost
0.0.0.0 hightower
但有人向我推荐这不是一个好的做法,因为我只想访问一个端口。