Search code examples
ubuntuubuntu-8.10

Ubuntu - SmartFoxServer - Check program is running


I am wanting to run SmartFox Server on my Ubuntu 8.10 Intrepid server

default port is 9339

I cant telnet localhost 9339 as it says connection reused

UFW is off as status shows not loaded

So I want to:

  1. Check that the SMARTFOX is loaded - i do ./sfs start and it says loaded
  2. Check why I cant access localy via telnet to the 9339 port.

Cheers

Ian


Solution

  • Check to see if SmartFoxServer is running. Note that I have never used SmartFox, so I don't know the exact name that you'll be looking for, but I'm assuming that it will have "smartfox" or "sfs" somewhere in it:

    ps -ef | egrep -i "[s]martfox|[s]fs"
    

    If it is running, that command should output some information on the process. (The square brackets in the regular expression make sure that this command does not find itself in the process listing).

    Now, check to see if it's attached to a port:

    lsof -i :9339
    

    If SmartFox is running, you should get some output that ends with ":9339 (LISTEN)"

    So, now we've checked if the process is running or listening. The last thing to check is if there is a firewall that is blocking it from being accessed. Check to see if your firewall is enabled, and if so, what its settings are. I'm assuming that you would be using the default firewall for Ubuntu, ufw:

    sudo ufw status
    

    If the firewall is enabled, you should see some settings; otherwise, it should tell you that the firewall is not loaded.

    If it is enabled, you can try allowing the port in question:

    sudo ufw allow 9339
    

    edit: oops, I hadn't noticed that you said that UFW is off. Sorry for assuming you hadn't checked that yet.