[CentOS] Starting the gotour server on CentOS 6

Fri Apr 18 17:29:50 UTC 2014
Evan Rowley <rowley.evan at gmail.com>

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.



On Fri, Apr 18, 2014 at 1:22 PM, Jay Leafey <jay.leafey at mindless.com> wrote:

> On 04/18/2014 12:13 PM, Evan Rowley wrote:
>
>> 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 at 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 at 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 at centos6-paas-dev gotour]$ getenforce
>> Permissive
>>
>> Any ideas?
>>
>>
>>
>>
> 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.
>
> --
> Jay Leafey - jay.leafey at mindless.com
> Memphis, TN
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>


-- 
 - EJR