Forum Discussion

bill_w's avatar
bill_w
New Contributor
9 years ago
Solved

server running on IPv6 instead of IPv4

I just installed the Code Reviewer to try out on a Linux ubuntu 14.04 LTS machine.  I already had a service on port 8080, so I put this at port 8888.  I can access it fine on the local linux machine, but not from any others.  When I ran a 'netstat  -ntlp' I received the following that looks like it is listening on IPv6.

 

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      3747/mysqld     
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      4501/redis-server 1
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      1769/smbd       
tcp        0      0 0.0.0.0:23470           0.0.0.0:*               LISTEN      3507/sshd       
tcp        0      0 127.0.0.1:8085          0.0.0.0:*               LISTEN      7702/unicorn.rb -E 
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      3282/vsftpd     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      4984/cupsd      
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      4481/master     
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      28909/0         
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1769/smbd       
tcp        0      0 127.0.0.1:3551          0.0.0.0:*               LISTEN      4872/apcupsd    
tcp        0      0 0.0.0.0:902             0.0.0.0:*               LISTEN      5014/vmware-authdla
tcp6       0      0 :::139                  :::*                    LISTEN      1769/smbd       
tcp6       0      0 :::23470                :::*                    LISTEN      3507/sshd       
tcp6       0      0 :::80                   :::*                    LISTEN      5760/apache2    
tcp6       0      0 :::8080                 :::*                    LISTEN      4114/java       
tcp6       0      0 :::8081                 :::*                    LISTEN      4114/java       
tcp6       0      0 :::4949                 :::*                    LISTEN      2426/perl       
tcp6       0      0 :::8086                 :::*                    LISTEN      5760/apache2    
tcp6       0      0 ::1:631                 :::*                    LISTEN      4984/cupsd      
tcp6       0      0 :::8888                 :::*                    LISTEN      5457/java       
tcp6       0      0 :::3000                 :::*                    LISTEN      5760/apache2    
tcp6       0      0 :::25                   :::*                    LISTEN      4481/master     
tcp6       0      0 ::1:6010                :::*                    LISTEN      28909/0         
tcp6       0      0 :::443                  :::*                    LISTEN      5760/apache2    
tcp6       0      0 :::445                  :::*                    LISTEN      1769/smbd       
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      4114/java       

How do I set this up to have it listening on IPv4 so we can access from other machines on our network?  My guess is it is in the tomcat settings, just not sure what to modify.  Any ideas?

  • I found the problem.  I needed to update the Linux firewall to allow accesses to port 8888.  I did this with the following command.

    sudo ufw allow 8888

    I also found out how to force IPv4 usage instead of IPv6.  That probably wasn't my problem, but I found out how to do it and thought I would pass this on too.  I modified the ccollab-server.vmoptions file in /opt/ccollab_server folder.  I added the following two lines:

    -Djava.net.preferIPv4Stack=true
    -Djava.net.preferIPv4Addresses=true

    This will direct the Tomcat and Catalina processes to use IPv4.

1 Reply

  • bill_w's avatar
    bill_w
    New Contributor

    I found the problem.  I needed to update the Linux firewall to allow accesses to port 8888.  I did this with the following command.

    sudo ufw allow 8888

    I also found out how to force IPv4 usage instead of IPv6.  That probably wasn't my problem, but I found out how to do it and thought I would pass this on too.  I modified the ccollab-server.vmoptions file in /opt/ccollab_server folder.  I added the following two lines:

    -Djava.net.preferIPv4Stack=true
    -Djava.net.preferIPv4Addresses=true

    This will direct the Tomcat and Catalina processes to use IPv4.