-
Notifications
You must be signed in to change notification settings - Fork 9
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
Cannot connect to localhost via port 9050 #165
Comments
Hi @wiligl, If you can share your torrc config file(s), that might shed some light. Just make sure that there's nothing sensitive in them. I typically set |
Hi @wiligl, If you can share your torrc config file(s), that might shed some light. Just make sure that there's nothing sensitive in them. I typically set Cheers, Tom |
Hi @thomasleplus, thanks, the current compose.yaml is (removed "expose" line);
I use the default torrc but I have copied it as torrc.conf into the volume mapped to ./conf.d/ which is read automatically with the following additional lines:
The full torrc.conf is attached (added .txt to be able to upload file to Github). The current error (still) is:
Thanks for sharing your advice! Kr, Wilmar |
Dear @thomasleplus, i hope you had a great start into the new year! I just would like to let you know that i have not be able to resolve the above issue. Your advice will be still appreciated. Kr, Wilmar |
Hi @wiligl, Sorry I was mostly offline during the holidays but I am back. I will try to reproduce the issue with the torrc file that you provided and keep you posted. Thank you for your patience, Tom |
I apologize for the further delay but I am currently afflicted by docker/for-mac#7520 which prevents me from running docker on my Mac. I need to solve it first before I can look into this issue. |
@thomasleplus Thanks for the update, I understand you have other priorities, looking forward to your help, whenever convenient for you. |
My docker is fixed. I ran services:
relay:
image: leplusorg/tor:main
container_name: tor
restart: always
ports:
- "9050:9050"
networks:
- caddy-net
environment:
SKIP_TEMPLATE: 1
TOR_NICKNAME: tor4irc
CONTACT_EMAIL: [email protected]
volumes:
- /tor_conf/torrc.conf:/etc/tor/torrc
networks:
caddy-net:
driver: bridge The only difference with your compose file is that I wanted to test without the workaround that you found so I set But when I run it I get the following error:
That makes sense to me because you have 4 SOCKSPort directives which compete for port 9050 on the same container:
When I keep only one (
I am not sure how the container is starting for you with the 4 SOCKSPort directives. Do you not get the |
Dear @thomasleplus, thanks a ton! The Tor container runs without errors with your configuration. However, I got this warning:
Regarding your question, with my old compose.yaml and the torrc.conf with multiple SOCKSPort entries, I did not get any errors: see docker log at https://pastebin.mozilla.org/6baCNE04 Therefore, the error in the torrc.conf was not obvious to me. Please let me know if I can sometime return the favour, eg doing a testrun or something. Kr, Wilmar |
Hi @wiligl, I am glad that we could solve your issue. I don't understand what happened before to the error message. I hope that it's not somehow swallowed by the tor-wrapper.sh script. I don't see how that would be the case but I will keep thinking about it in case I can figure it out. Regarding the warning about using For your docker compose file, I recommend that you do this explicitly by using the following notation: ports:
- "127.0.0.1:9050:9050" Cheers, Tom |
This command:
curl --socks5 localhost:9050 --socks5-hostname localhost:9050 https://check.torproject.org/api/ip
gives this error:
curl: (7) Failed to connect to 192.168.0.24 port 9050 after 0 ms: Couldn't connect to server
The compose.yaml file I used is:
How do I fix this?
The text was updated successfully, but these errors were encountered: