rake server exits immediately without any errors reported
wezm opened this issue · comments
I installed jruby via rvm, then did gem install dubious, which went as planned. I created a new project and copied the InfoProperties controller from the examples and added a route for it. Running rake server
(without an Internet connection,
hence the update failure) outputs the following:
% rake 'server[127.0.0.1,8008]'
(in /Users/wmoore/Projects/my-app)
2011-04-20 07:41:36.231 java[12054:903] [Java CocoaComponent compatibility mode]: Enabled
2011-04-20 07:41:36.232 java[12054:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Apr 20, 2011 7:41:36 AM com.google.appengine.tools.info.RemoteVersionFactory getVersion
INFO: Unable to access https://appengine.google.com/api/updatecheck?runtime=java&release=1.4.2×tamp=1297450955&api_versions=['1.0']
java.net.UnknownHostException: appengine.google.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at java.net.URL.openStream(URL.java:1010)
at com.google.appengine.tools.info.RemoteVersionFactory.getVersion(RemoteVersionFactory.java:76)
at com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.java:99)
at com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java:174)
at com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck.java:142)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:150)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Apr 20, 2011 7:41:36 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Apr 20, 2011 7:41:36 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Users/wmoore/Projects/my-app/WEB-INF/appengine-web.xml
Apr 20, 2011 7:41:36 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Users/wmoore/Projects/my-app/WEB-INF/web.xml
Apr 19, 2011 9:41:36 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Apr 19, 2011 9:41:37 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector@127.0.0.1:8008
Apr 19, 2011 9:41:37 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8008/
A few seconds after that last line rake exists and I'm returned to my shell (zsh).
I'm running Mac OS X 10.6.7, Java from Apple (Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)), rvm info
:
% rvm info
jruby-1.6.0:
system:
uname: "Darwin Wes-MacBook-Pro.local 10.7.3 Darwin Kernel Version 10.7.3: Sun Mar 6 13:37:56 PST 2011; root:xnu-1504.14.2~1/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.2.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"
ruby:
interpreter: "jruby"
version: "1.6.0"
date: "2011-03-15"
platform: "darwin-x86_64-java"
patchlevel: "TM"
full_version: "jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java]"
homes:
gem: "/Users/wmoore/.rvm/gems/jruby-1.6.0"
ruby: "/Users/wmoore/.rvm/rubies/jruby-1.6.0"
binaries:
ruby: "/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin/ruby"
irb: "/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin/irb"
gem: "/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin/gem"
rake: "/Users/wmoore/.rvm/gems/jruby-1.6.0/bin/rake"
environment:
PATH: "/Users/wmoore/.rvm/gems/jruby-1.6.0/bin:/Users/wmoore/.rvm/gems/jruby-1.6.0@global/bin:/Users/wmoore/.rvm/rubies/jruby-1.6.0/bin:/Users/wmoore/.rvm/bin:/Users/wmoore/.nvm/v0.4.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin"
GEM_HOME: "/Users/wmoore/.rvm/gems/jruby-1.6.0"
GEM_PATH: "/Users/wmoore/.rvm/gems/jruby-1.6.0:/Users/wmoore/.rvm/gems/jruby-1.6.0@global"
MY_RUBY_HOME: "/Users/wmoore/.rvm/rubies/jruby-1.6.0"
IRBRC: "/Users/wmoore/.rvm/rubies/jruby-1.6.0/.irbrc"
RUBYOPT: ""
gemset: ""
Did you add a route to the app.yaml file?
Also, I's avoid using a jruby rvm. Dubious does not use jruby at runtime, so this seems to complicate things.
The Unable to access https://appengine...
error is a red herring--that happens whenever there is no net connection and doesn't affect the local server.
It may be that you are running into a java incompatibility issue. 1.6.0_24 was causing issues for people using the appengine-sdk a month ago--it might be related to that http://groups.google.com/group/appengine-jruby/browse_thread/thread/d9fdf54b629ad46f
I did some more testing last night and tried running the java command that rake server ends up launching. It turns out that java is segfaulting as described by @baroquebobcat above. So I guess I'll put the dubious experimentation on hold until Apple push out a new java update.
This week, I hope to push out a work-around for that.