alexdlaird / pyngrok

A Python wrapper for ngrok
https://pyngrok.readthedocs.io
MIT License
421 stars 59 forks source link

Error on Kali Linux Running with sudo #41

Closed sTiKyt closed 4 years ago

sTiKyt commented 4 years ago

Describe the Bug When trying to run ngrok we get error. Steps to Reproduce

Get kali Linux Run sudo ngrok

alexdlaird commented 4 years ago

Please first enable logging and put the full output here, including the command / script run.

github-actions[bot] commented 4 years ago

This issue is stale because it has remained open with no further activity on it. Comment with additional context or the issue will be closed automatically. Thank you for your contribution!

sTiKyt commented 4 years ago

Ok, will get my guys to enable logging and will send you full

alexdlaird commented 4 years ago

Are these two issues the same, or how are they distinct if not?

https://github.com/alexdlaird/pyngrok/issues/42

alexdlaird commented 4 years ago

Having installed Kali Linux and done the following:

sudo apt-get update && sudo apt-get install python-pip python3-pip
python3 -m pip install pyngrok
ngrok http 80

Everything works fine. A tunnel is opened and I am able to connect to it externally.

Note that Kali Linux appears to install pip bins in the user's home directory, which is not on the PATH by default (it tells you this after you install anything from pip). You may have to do export PATH=$PATH:/home/kali/.local/bin, for example, before any Python binaries are available on your path.

alexdlaird commented 4 years ago

To close the loop on this, similar to the issue found here, the issue is running ngrok as sudo. This is not always an issue (I have no issues with it on OS X or even my instance of Kali Linux), but depending on your system's setup, if no config file is given, ngrok (not pyngrok) cannot determine where it should safely store the config file. To get around this, just tell it a location you trust, per the documentation:

sudo ngrok http -config=/opt/ngrok/conf/ngrok.yml 8000

Generally, however, the real answer here is that you shouldn't need to be running ngrok as sudo.

arun-pandi commented 4 years ago

when i try to pip3 install -r requirements.txt .they have below error is occured please solve this WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting pyngrok WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyngrok/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyngrok/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyngrok/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyngrok/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pyngrok/
Could not fetch URL https://pypi.org/simple/pyngrok/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyngrok/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement pyngrok (from versions: none) ERROR: No matching distribution found for pyngrok WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

github-actions[bot] commented 4 years ago

This is a bug tracker and not a support forum.

While we'd love to be able to support every person on their projects, that would simply be infeasible. Luckily, that's what the helpful developer community over at Stack Overflow is for! Please create a question there with the \"pyngrok\" tag if what you're looking for is a programming question or you need help with an integration. You can refer to pyngrok's own documentation to help you write the best possible question.