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

Starting VPN by name and enhancing daemon output #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mostafahussein
Copy link

@mostafahussein mostafahussein commented Apr 10, 2016

I have modified the code a little instead of displaying the whole trace to the user like this:

Traceback (most recent call last):
  File "/bin/pritunl-client", line 9, in <module>
    load_entry_point('pritunl-client==1.0.894.98', 'console_scripts', 'pritunl-client')()
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/__main__.py", line 222, in client_shell
    cli()
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/click/core.py", line 663, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/click/core.py", line 643, in main
    rv = self.invoke(ctx)
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/click/core.py", line 990, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/click/core.py", line 836, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/click/core.py", line 463, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/__main__.py", line 60, in daemon_cmd
    shell_app.ShellApp()
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/shell_app.py", line 202, in __init__
    self.start_server()
  File "/usr/lib/pritunl-client/lib/python2.7/site-packages/pritunl_client/shell_app.py", line 231, in start_server
    Request,
  File "/usr/lib64/python2.7/SocketServer.py", line 420, in __init__
    self.server_bind()
  File "/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib64/python2.7/SocketServer.py", line 434, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib64/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

when running:

pritunl-client daemon

It will be as follows:

[2016-04-10 20:29:32,255][INFO] Address already in use. Make sure that port 9797 is available.

UPDATE:

I have added the ability to start vpn connection by name not just profile ID which should solve this #17


This change is Reviewable

@mostafahussein mostafahussein changed the title enhance the output in case of socket.error Starting VPN by name and enhancing daemon output Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants