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

Automatic IP address detection messed up by VPN #1

Closed
n8henrie opened this issue Jan 29, 2016 · 0 comments
Closed

Automatic IP address detection messed up by VPN #1

n8henrie opened this issue Jan 29, 2016 · 0 comments

Comments

@n8henrie
Copy link
Owner

@candrews67 emailed me to note that Fauxmo wasn't working. He uses a VPN address and found that it would work sometimes depending on the status of the VPN. Here's his traceback:

Traceback (most recent call last):
  File "fauxmo/venv/bin/fauxmo", line 9, in <module>
    load_entry_point('fauxmo==0.1.7', 'console_scripts', 'fauxmo')()
  File "fauxmo/fauxmo/cli.py", line 37, in cli
    main(config_path=args.config, verbosity=verbosity)
  File "fauxmo/fauxmo/fauxmo.py", line 166, in main
    action_handler=action_handler)
  File "fauxmo/fauxmo/fauxmo.py", line 53, in __init__
    ip_address=self.ip_address)
  File "fauxmo/fauxmo/upnp.py", line 75, in __init__
    self.socket.bind((self.ip_address, self.port))
OSError: [Errno 49] Can't assign requested address

With some tinkering, I think we figured out that it's a problem with the get_local_ip function in upnp.py, and it works with a manually specified IP address. In cases like this, it would be nice if there was a way to override the automatic IP detection.

n8henrie added a commit that referenced this issue Jan 29, 2016
Fix for #1
Now users can manually specify an IP address in config.json if they are
encountering an issue with the automatic detection. If the address is
set to "auto" (or if this part of the config is absent) it will continue
to function as before, hopefully not affecting existing users.

Also added some extra debugging calls related to ip_address stuff and
removed the unused `DEBUG` key from the config.
@ronny130286 ronny130286 mentioned this issue Dec 29, 2017
@fredwangwang fredwangwang mentioned this issue Aug 21, 2018
2 tasks
@clach04 clach04 mentioned this issue Nov 20, 2021
2 tasks
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

1 participant