Search code examples
pycharmlicensingubuntu-16.04lanports

How to access webpage (served by Pycharm License Server, on Ubuntu) on 8080 over LAN


I am attempting to set up a PyCharm License Server on my LAN.

I have an Ubuntu 16.04 server, hightower set up to do this. I've installed the license server, and it appears to be successfully running on 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

But I can't access the webpage at 8080 from another computer on the LAN, in order to continue the process.

From a workstation, 01-e on the LAN with a GUI/Ubuntu 16.04, trying to access hightower:8080 or http://hightower:8080/register or 192.168.0.7:8080 or hightower.domain.local:80801 or any combo gives me:

Firefox can’t establish a connection to the server at hightower:8080.

I can 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

Firewall isn't on, on the server hightower

admin@hightower:/opt/jetbrains$ sudo ufw status
Status: inactive

Stabbing in the dark to see if the page is actually being served:

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

So how do I make this page visible on my LAN?

Edit: Additional digging, it appears 8080 is only being served to localhost. I'm guessing this is the problem.

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

Edit:

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

Solution

  • Fixed it. I had to run:

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

    instead of the suggested:

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

    I probably could have also changed /etc/hosts to read:

    admin@hightower:~$ cat /etc/hosts
    127.0.0.1   localhost
    0.0.0.0     hightower
    

    But it was recommended to me that this was not good practice since I only want the one port accessible.