-
Notifications
You must be signed in to change notification settings - Fork 11
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
Confused and unable to get this to work #5
Comments
Hi, thanks for the report. Error reporting is a little bit scant at the moment. A couple thoughts:
What I've seen today is that sometimes Sheepsafe is triggered a little too early, before the network connection is made, to successfully start ssh. If that's the case, ssh exits and Sheepsafe doesn't start a new one. Maybe you're seeing that? |
Nick,
Here is an example from my logs, in case there is anything interesting in there: I, [2010-10-27T19:34:38.003188 #659] INFO -- : Sheepsafe starting Hope this is helpful! |
Can you try the following to get v0.2.1:
I think the way sheepsafe gets triggered from watching /Library/Preferences/SystemConfiguration is a little wonky. It usually gets triggered multiple times and something might not quite be right. If things don't get better after 0.2.1, can you post your ~/.sheepsafe.yml here too? (Feel free to filter names, MAC addresses or other sensitive info in it.) |
I'm seeing similar issues. The network detection actually works fine, the growl messages show up, and the network location is changed appropriately. But it looks like the daemon code inside bring_socks_proxy is never triggered. At least the ssh command is not run and I don't see the "Starting ssh..." line in the sheepsafe log. I'll try to do some more debugging tomorrow. |
Ok, let me know what you find. I've been thinking I need to convert the ssh daemon into a full-fledged Ruby script that retries the ssh connection a number of times, and logs when things go wrong. |
I did a whole bunch of debugging, but unfortunately didn't get very far. Contrary to what I thought at first, the daemon code itself is actually triggered fine. But it's the exec call that doesn't seem to work. When I try replacing exec with system, it returns false, so somehow the ssh command seems to fail (yet, it works fine when I run it manually). When I replace exec or system with backticks to capture the output, I get nothing. Out of curiosity, have you considered using Net::SSH rather than shelling out to the ssh command? |
I am seeing similar problems - once I have it running I can connect to irc and jabber, but Firefox throws the proxy error. Additionally, I noticed a bug in the program related to the LaunchAgents folder. I fixed it but from your cloned branch... so.. uh |
Can you guys try again with 0.2.2? I added code to keep trying to restart ssh. |
@digitalhobbit: I haven't thought of using Net::SSH. What would the benefits of that be? |
@nicksieger I was using 0.2.2 when the problem occurred. I wonder if Net::SSH would help keep the connection alive. btw you'll want to add something like |
@nicksieger Sorry for the late response! I finally had a chance to try your updated version. It works a little better but I still run into some issues. sheepsafe now properly starts the ssh connection. However, it doesn't stop it when I switch back to a trusted network. So after switching back and forth, I end up with two concurrent ssh connections. One thing I noticed when watching "ps|grep ssh" right after switching networks is that the ssh command is always run twice, i.e. the pid changes. The first process is active for a few seconds, and then gets replaced with another one. Perhaps the daemon is somehow still holding on to the original pid and therefore unable to properly kill the process? Unfortunately I'm not sure how the Daemons lib, fork, and trap interfere with local variables. Perhaps just write the pid to a file? Actually, shouldn't Daemons.run_proc already take care of that? I definitely don't see any pid files in my home dir... |
Bump. For any of you still reading, try 0.2.6. |
First, Nick, thanks for building this tool and for your rapid iteration. Love that 0.20 is already out with usability improvements.
I'll admit that I'm a bit out of my comfort zone here, but I can't seem to get this to work on my machine. No doubt I'm doing something naive, but perhaps we can help improve the docs if so.
Installed gem, ran the CLI installer - everything seems set up with the new "untrusted" connection, firefox switched to using the proxy immediately, etc. However, I'm getting "The proxy server is refusing connections" from firefox whenever I'm connecting using the "untrusted" location.
The text was updated successfully, but these errors were encountered: