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

KeyError #49

Closed
matdrapeau opened this issue May 10, 2012 · 16 comments
Closed

KeyError #49

matdrapeau opened this issue May 10, 2012 · 16 comments

Comments

@matdrapeau
Copy link

Hi,
I am trying to start localtunnel but I get this error:

$ lt --broker 127.0.0.1:6543 --name mattest 8080
Traceback (most recent call last):
File "/usr/local/bin/lt", line 9, in
load_entry_point('localtunnel==0.4.0', 'console_scripts', 'lt')()
File "/usr/local/lib/python2.7/dist-packages/localtunnel/client.py", line 31, in main
client.serve_forever()
File "/usr/local/lib/python2.7/dist-packages/ginkgo/core.py", line 166, in serve_forever
self.start()
File "/usr/local/lib/python2.7/dist-packages/ginkgo/core.py", line 109, in start
ready = not self.do_start()
File "/usr/local/lib/python2.7/dist-packages/localtunnel/client.py", line 42, in do_start
self.ws.connect()
File "/usr/local/lib/python2.7/dist-packages/ws4py-0.2.1-py2.7.egg/ws4py/client/init.py", line 66, in connect
self.process_response_line(response_line)
File "/usr/local/lib/python2.7/dist-packages/ws4py-0.2.1-py2.7.egg/ws4py/client/init.py", line 110, in process_response_line
raise HandshakeError("Invalid response status: %s %s" % (code, status))
ws4py.exc.HandshakeError: Invalid response status: 302 Found
Exception KeyError: KeyError(15627536,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored

Any reason why?

Thanks,
Mat

@progrium
Copy link
Owner

What server are you running locally (on 6543)? It seems to be redirecting instead of the usual localtunnel server response...

@matdrapeau
Copy link
Author

I am using pyramid...
I am not doing any redirection on the "home" page.
Tho, does it mean that doing 302 redirection won't work on other requests?

@progrium
Copy link
Owner

You're pointing to your own instance of a localtunnel server with "--broker 127.0.0.1:6543" ... that shouldn't be the server you want to make public, that should be localtunnel. Are you sure you're running it on that port?

@matdrapeau
Copy link
Author

I did also tried with this command:

$ lt --name mattest 6543
I get same error... or a 404 error using a different port than my pyramid server

@progrium
Copy link
Owner

Are you running the localtunnel server?

@matdrapeau
Copy link
Author

Do you have detailed doc than your readme file?

@progrium
Copy link
Owner

No, master is actively being developed. The old version that uses a Ruby client is still running. Here is the readme for that: https://github.com/progrium/localtunnel/tree/b70a330070909a96424850da7bf0c2a7974c6bce/

@matdrapeau
Copy link
Author

Can you write down the steps then in order to make the dev version working please?
There is no -k option in the dev version.

@progrium
Copy link
Owner

The steps are in the readme currently. Others have been able to get it worked from that. If you can tell me what you're having problems with I can update the readme.

There is no -k in the dev version because you don't need keys any more.

@matdrapeau
Copy link
Author

Still.. even not with pyramid and using SimpltHTTPServer:

$ python -m SimpleHTTPServer 1234
Serving HTTP on 0.0.0.0 port 1234 ...

$ lt --name mattdev 1234
Traceback (most recent call last):
File "/usr/local/bin/lt", line 8, in
load_entry_point('localtunnel==0.4.0', 'console_scripts', 'lt')()
File "/usr/local/lib/python2.7/dist-packages/localtunnel/client.py", line 31, in main
client.serve_forever()
File "/usr/local/lib/python2.7/dist-packages/ginkgo/core.py", line 166, in serve_forever
self.start()
File "/usr/local/lib/python2.7/dist-packages/ginkgo/core.py", line 109, in start
ready = not self.do_start()
File "/usr/local/lib/python2.7/dist-packages/localtunnel/client.py", line 42, in do_start
self.ws.connect()
File "/usr/local/lib/python2.7/dist-packages/ws4py/client/init.py", line 66, in connect
self.process_response_line(response_line)
File "/usr/local/lib/python2.7/dist-packages/ws4py/client/init.py", line 110, in process_response_line
raise HandshakeError("Invalid response status: %s %s" % (code, status))
ws4py.exc.HandshakeError: Invalid response status: 302 Found
Exception KeyError: KeyError(14577144,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored

Problem is not the server because I get similar error just trying to display the help:

$ lt --help
usage: lt [-h] [--name name] [--broker address] port

Open a public HTTP tunnel to a local server

positional arguments:
port local port of server to tunnel to

optional arguments:
-h, --help show this help message and exit
--name name name of the tunnel (default: randomly generate)
--broker address tunnel broker hostname (default: localtunnel.com)
Exception KeyError: KeyError(13532664,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored

@progrium
Copy link
Owner

Yeah, I'm not sure what the KeyError is, but it's likely the result of not being able to connect to a localtunnel broker because you're still not running one:

ginkgo config/default.conf.py

But keep in mind for it to work, you'll need those host records the readme mentions. Things are obviously still rough with this version.

@hbmartin
Copy link

hbmartin commented Jun 5, 2012

I am having this issue as well. The ginkgo command you list above doesn't make sense to me :-/

@hbmartin
Copy link

hbmartin commented Jun 5, 2012

In particular, there is no such file as config/default.conf.py

@progrium
Copy link
Owner

progrium commented Jun 5, 2012

I'm sorry, you're choosing to use a work in progress. Please use the original localtunnel client described at localtunnel.com (and details here: https://github.com/progrium/localtunnel/tree/v1) until I can release v2.

@hbmartin
Copy link

hbmartin commented Jun 5, 2012

Thanks for all of your work :)

@progrium
Copy link
Owner

progrium commented Dec 1, 2012

There's a new version you can try. See the latest README. :)

@progrium progrium closed this as completed Dec 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants