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

"can't connect to server" on Mac #824

Closed
scottdraves opened this issue Oct 29, 2014 · 9 comments
Closed

"can't connect to server" on Mac #824

scottdraves opened this issue Oct 29, 2014 · 9 comments
Labels

Comments

@scottdraves
Copy link
Contributor

For a small number of users (two reports so far), Beaker starts but their web browser cannot connect to it.

@actsasgeek
Copy link

I can confirm this on a MacBook 15" running OSX 10.10. It's an earlier Mac (probably 2010-ish). I'm not sure how to diagnose what is going on but I'd like to help if I can.

@scottdraves
Copy link
Contributor Author

got this stack trace from https://github.com/chohlasa at PyData conf:

11/23/14 3:43:47.152 PM Beaker[13413]: Exception in thread "main"
11/23/14 3:43:47.152 PM Beaker[13413]: java.net.UnknownHostException: MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known
11/23/14 3:43:47.153 PM Beaker[13413]: at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at com.twosigma.beaker.core.rest.PluginServiceLocatorRest.generateNginxConfig(PluginServiceLocatorRest.java:629)
at com.twosigma.beaker.core.rest.PluginServiceLocatorRest.startReverseProxy(PluginServiceLocatorRest.java:239)
at com.twosigma.beaker.core.rest.PluginServiceLocatorRest.start(PluginServiceLocatorRest.java:235)
at com.twosigma.beaker.core.Main.main(Main.java:163)
11/23/14 3:43:47.153 PM Beaker[13413]: Caused by: java.net.UnknownHostException: MacBook-Pro.local: nodename nor servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
... 4 more
11/23/14 3:43:47.154 PM Beaker[13413]:
shutting down beaker
11/23/14 3:43:47.154 PM Beaker[13413]: Exception in thread "Thread-3" java.lang.NullPointerException

@scottdraves
Copy link
Contributor Author

https://github.com/twosigma/beaker-notebook/blob/master/core/src/main/java/com/twosigma/beaker/core/rest/PluginServiceLocatorRest.java#L651

if this call to InetAddress.getLocalHost().getHostName() fails, we should use null instead of throwing an NPE. If the value is never used then it's not an error. Really, the hostname should be more like a setting, but we can get to that later.

@scottdraves
Copy link
Contributor Author

the above will not fix the public server option since it really needs the name. those users will have to do something like:
http://biomedicalontologies.com/2012/11/14/fixing-java-net-local-host-name-unknown-error-on-mac-os-x/

@scottdraves
Copy link
Contributor Author

Steve or anyone, I believe I have a fix for this, would you care to try it out?

@scottdraves
Copy link
Contributor Author

ildipo added a commit that referenced this issue Jan 9, 2015
Fix Issue #824 by not crashing when hostname cannot be identified
@sjmgarnier
Copy link

I wanted to try out beaker on my Macbook Pro OSX 10.10.1 and installed version 1.1.2. Nothing happens after I launch beaker. The app starts but it doesn't open a browser window. When clicking the reconnect link in the about menu, it opens up a browser window with the following error message: "This webpage is not available" (on Chrome).

I then downloaded beaker-fix-test2.dmg from the link above, same problem. I'm not sure my problem is related to this issue but I wanted to check before opening a new bug report.

@scottdraves
Copy link
Contributor Author

Thanks for the report. If you run the Console app, do you see any errors
from Beaker?

On Sun, Jan 11, 2015 at 5:41 PM, Simon Garnier notifications@github.com
wrote:

I wanted to try out beaker on my Macbook Pro OSX 10.10.1 and installed
version 1.1.2. Nothing happens after I launch beaker. The app starts but it
doesn't open a browser window. When clicking the reconnect link in the
about menu, it opens up a browser window with the following error message:
"This webpage is not available" (on Chrome).

I then downloaded beaker-fix-test2.dmg from the link above, same problem.
I'm not sure my problem is related to this issue but I wanted to check
before opening a new bug report.


Reply to this email directly or view it on GitHub
#824 (comment)
.

BeakerNotebook.com
ScottDraves.com http://www.ScottDraves.com
google.com/+ScottDraves

@sjmgarnier
Copy link

Ok. Just did it. The problem was the version of java my computer was running by default (1.6). I set java version to 1.8 and all is good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants