Starting The Gotour Server On CentOS 6

Home » CentOS » Starting The Gotour Server On CentOS 6
CentOS 7 Comments

Hey CentOS folks!

I have an interesting issue with starting a server on a CentOS 6 KVM guest. The server (service) in particular is gotour, which is a web application created by Google and their Golang developers, intended to teach users the basics of using the Go programming langauge.

When starting gotour, the program claims to be binding to port 12049, but the VM doesn’t seem to be serving anything on that port. Upon checking the netstat output, I see a process bound to port 12049.

It is definitley possible that the problem is with Go itself, but I’d like to rule out the possibility that something on an out-of-the-box CentOS 6
image might be preventing the server from working.

Here is some of the output:

[appengine@CentOS6-paas-dev gotour]$ gotour
2014/04/17 22:04:33 Serving content from
/home/appengine/goprojects/firstproj/go/src/code.google.com/p/go-tour
2014/04/17 22:04:33
WARNING! WARNING! WARNING!
I appear to be listening on an address that is not localhost. Anyone with access to this address and port will have access to this machine as the user running gotour. If you don’t understand this message, hit Control-C to terminate this process. WARNING! WARNING! WARNING!
2014/04/17 22:04:34 Please open your web browser and visit http://10.10.10.205:12049

[root@CentOS6-paas-dev ~]# netstat -pnaevZ
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name Security Context
… tcp 0 0 10.10.10.205:12049 0.0.0.0:*
LISTEN 505 224898 9331/gotour fined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[appengine@CentOS6-paas-dev gotour]$ getenforce Permissive

Any ideas?

7 thoughts on - Starting The Gotour Server On CentOS 6

  • iptables -L ? do you have the local firewall running?
    ‘service iptables stop’, test, but don’t leave it that way.

  • Is that port open in your host firewall? A quick check with iptables should tell you. If ‘iptables -L -n | grep 12049’ doesn’t return something then it might need to be opened up in the firewall.

  • For the record, this is what I added to /etc/sysconfig/iptables

    -A INPUT -m state –state NEW -m tcp -p tcp –dport 12049 -j ACCEPT

    ^ right after the same line for allowing SSH connections.

  • Your network config needs attention

    (Sent from iPhone, so please accept my apologies in advance for any spelling or grammatical errors.)

  • Hal Wigoda wrote:


    Is that 10.10.10.205 on your internal network, or is it the host’s visible to the guest network? Have you gone there?

    mark

  • Tbh, this is actually running on an undisclosed public IP address. The server is only being used for small tests, so I do consider it somewhat disposable. Even then, I should look into isolating it’s exposure with some stricter iptables rules.