Search code examples
linuxdebiancherrypybeagleboneblackbeagleboard

(( '127.0.0.1', 8080)) already shut down


I am trying to run a server in BeagleBone Black using CherryPy and following this tutorial http://docs.cherrypy.org/en/latest/install.html, and every time I run it I have this error message

ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(( '127.0.0.1',8080))already shut down

How can I turn it on again ?


Solution

  • I tkink the port 8080 is already used. Your command is fine to kill a process running on particular port on Linux.

    fuser -k 8080/tcp
    

    If you try to access your device remotely you have to explicitly configure Cherrypy to bind on all interfaces:

    import cherrypy
    
    class HelloWorld(object):
        @cherrypy.expose
        def index(self):
            return "Hello world!"
    
    if __name__ == '__main__':
       cherrypy.config.update({'server.socket_host': '0.0.0.0'} )
       cherrypy.quickstart(HelloWorld())