Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocketproxy.py searches in the wrong location for rebind.so in wrap mode #452

Closed
cvisl opened this issue Oct 8, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@cvisl
Copy link

cvisl commented Oct 8, 2020

When I run novnc through the websockify proxy like this:

/dir/to/websockify/run 5901 --wrap-mode=ignore -- vncserver :1

I get the following error (similar to #97, #115, #151 and #413):

Traceback (most recent call last):

  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/websockify/websockify/__main__.py", line 4, in <module>
    websockify.websocketproxy.websockify_init()
  File "websockify/websocketproxy.py", line 729, in websockify_init
    server = WebSocketProxy(**opts.__dict__)
  File "websockify/websocketproxy.py", line 310, in __init__
    raise Exception("rebind.so not found, perhaps you need to run make")
Exception: rebind.so not found, perhaps you need to run make

And did some digging around in the python files and found out that in websocketproxy.py between line 293 and 306 the paths it is searching for are:

websockify/websockify/../lib/rebind.so
websockify/websockify/../lib/websockify/rebind.so
websockify/websockify/rebind.so

While in my case while I use make rebind.so will end up in websockify/ instead of websockify/websockify/.

A workaround for me now is to move rebind.so to the websockify/websockify/ directory.

@CendioOssman
Copy link
Member

Looks like we forgot to update something during some cleanup.

@CendioOssman CendioOssman added the bug Something isn't working label Oct 14, 2020
@CendioOssman
Copy link
Member

The issue was that we added support for running websockify directly as a module, and that gave us the module itself as sys.argv[0]. I don't know how we can handle this when it is installed, but I've at least fixed it when running it out of the source tree in e80739b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants