We're trying out using Discord. Check the thread for the link. These forums will continue to operate as normal.

HTPC port busy

edited February 10 in I'm new to OpenFLIXR
Hi, first of all hats off to the creators of this openflixr project. Motivates me to learn more linux :)

The problem I'm having now, after doing the setup and having everything to work. I wanted to make more memory and cpus available so I had to reboot the VM in Esxi. After this boot I can't get Htpc manager to work anymore. In Monit it shows that it can't get connection with HTPC and when trying to restart service there it gives me the CSRF error. So I tried to start it manually:

root@openflixr:/home/openflixr# python /opt/HTPCManager/Htpc.py

2019-02-11 00:11:31 :: root :: INFO :: Welcome to Hellowlol's HTPC Manager fork

2019-02-11 00:11:31 :: root :: INFO :: Loglevel set to info

2019-02-11 00:11:31 :: htpc.updater :: INFO :: Using GitUpdater engine

2019-02-11 00:11:31 :: apscheduler.scheduler :: INFO :: Added job "Updater.update_needed" to job store "default"

2019-02-11 00:11:31 :: modules.kodi :: WARNING :: No configured kodi-Servers.

2019-02-11 00:11:31 :: htpc.server :: INFO :: Starting up webserver

*******************************************************************

Starting HTPC Manager on port 8085.

Start your browser and go to http://localhost:8085/htpc

*******************************************************************

2019-02-11 00:11:31 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:31] ENGINE Listening for SIGHUP.

2019-02-11 00:11:31 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:31] ENGINE Listening for SIGTERM.

2019-02-11 00:11:31 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:31] ENGINE Listening for SIGUSR1.

2019-02-11 00:11:31 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:31] ENGINE Bus STARTING

2019-02-11 00:11:36 :: cherrypy.error :: ERROR :: [11/Feb/2019:00:11:36] ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x7f4466f80910>>

Traceback (most recent call last):

  File "/opt/HTPCManager/libs/cherrypy/process/wspbus.py", line 205, in publish

    output.append(listener(*args, **kwargs))

  File "/opt/HTPCManager/libs/cherrypy/_cpserver.py", line 168, in start

    ServerAdapter.start(self)

  File "/opt/HTPCManager/libs/cherrypy/process/servers.py", line 170, in start

    wait_for_free_port(*self.bind_addr)

  File "/opt/HTPCManager/libs/cherrypy/process/servers.py", line 439, in wait_for_free_port

    raise IOError("Port %r not free on %r" % (port, host))

IOError: Port 8085 not free on 'server'


2019-02-11 00:11:36 :: cherrypy.error :: ERROR :: [11/Feb/2019:00:11:36] ENGINE Shutting down due to error in start listener:

Traceback (most recent call last):

  File "/opt/HTPCManager/libs/cherrypy/process/wspbus.py", line 243, in start

    self.publish('start')

  File "/opt/HTPCManager/libs/cherrypy/process/wspbus.py", line 223, in publish

    raise exc

ChannelFailures: IOError("Port 8085 not free on 'server'",)


2019-02-11 00:11:36 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:36] ENGINE Bus STOPPING

2019-02-11 00:11:36 :: apscheduler.scheduler :: INFO :: Scheduler has been shut down

2019-02-11 00:11:36 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:36] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('server', 8085)) already shut down

2019-02-11 00:11:36 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:36] ENGINE Bus STOPPED

2019-02-11 00:11:36 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:36] ENGINE Bus EXITING

2019-02-11 00:11:36 :: cherrypy.error :: INFO :: [11/Feb/2019:00:11:36] ENGINE Bus EXITED


But if the port is used, I tried to start it on 8096 it gives me no errors

/opt/HTPCManager/Htpc.py --port 8086

However if I then browse to server:8086/htpc it redirects me here:
http://127.0.0.1:8086/htpc/auth/login

Any thoughts where to look?
    No results for this poll

Comments

  • edited February 11
    Ok I found this: 
    What may be happening is that your process had a TCP port open when it crashed or otherwise exited without explicitly closing it. Normally the OS cleans up these sorts of things, but only when the process record goes away. While the process may not appear to be running any more, there is at least one thing that can keep a record of it around, in order to prevent reuse of its PID. This is the existence of a child process that is not detached from the parent.

    I killed the PID, then ran htpc.py again and it's up. Yet still not working :(

    About the csrf token error I found this:
    https://bitbucket.org/tildeslash/monit/issues/535/invalid-csrf-token

    I'm reinstalling Openflixr, I think I broke it with a cold reboot
  • Ok, just an update: got it working now. Awesome stuff, I learned a lot. The only thing I don't get is how to connect Ombi in HPTC manager
  • I can help with Ombi if this is still an issue?
Sign In or Register to comment.