我正在尝试在我的局域网上设置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,以便继续此过程。
从具有GUI / Ubuntu 16.04的LAN上的工作站01-e
,尝试访问hightower:8080
或http://hightower:8080/register
或192.168.0.7:8080
或hightower.domain.local:80801
或任何组合给了我:
Firefox无法在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
所以如何在局域网上显示此页面?
编辑:额外挖掘,看来8080只被送到localhost。我猜这是问题所在。
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
答案 0 :(得分:1)
修正了它。我不得不跑:
<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
但有人建议我这不是一个好习惯,因为我只希望一个端口可以访问。