java.net.UnknownHostException: appengine.google.com - google-app-engine

Got this error. Any idea how to get rid of it?
Yesterday it was working fine but today I got these errors. I saw a known issue with this - link. But I didn't find any solution yet..
Oct 16, 2012 4:01:59 PM com.google.appengine.tools.info.RemoteVersionFactory getVersion
INFO: Unable to access https://appengine.google.com/api/updatecheck?runtime=java&release=1.7.1&timestamp=1345058163&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:366)
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:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
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:289)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:249)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:225)
Oct 16, 2012 4:01:59 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Oct 16, 2012 4:02:00 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\WorkSpace\GAE\GST\war\WEB-INF/appengine-web.xml
Oct 16, 2012 4:02:00 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\WorkSpace\GAE\GST\war\WEB-INF/web.xml
Oct 16, 2012 4:02:02 PM com.google.appengine.tools.development.DevAppServerImpl start

If you are using Java 8 in your app engine application, you will need to include
<url-stream-handler> urlfetch </ url-stream-handler>
in appengine-web.xml.
appengine-web.xml Reference

I am assuming that you are seeing this in your Eclipse IDE when you are trying to run the Eclipse Project as a Web Application.
The GAE plugin simply checks if there is an updated AppEngine SDK available for download. If there is a newer one than the one you are currently using then it lets you know that. The error is because at that instance, there was probably a network error and it got not connect through. It is harmless as far as running your application is concerned.
But if your application is dependent on accessing some external network services, then chances are that they might fail also if the network issue persists in your development environment.

got it working.. : cmd->goto your home directory >mkdir .appcfg_no_nag this will stop checking for the update and yourweb app willrun locally atleast..

This error is related to internet connection. I changed to other connection, it works

You should add in appengine-web.xml:
<url-stream-handler> urlfetch </ url-stream-handler>
And also start using java.net.URLConnection,
Apache HttpClient is not gonna work for example.
https://cloud.google.com/appengine/docs/standard/java/issue-requests#java_8_runtime_vs_java_7_behavior

Related

Google App Engine Tutorial Hello World Example won't run

I am having difficulty getting to the starting line on my machine.
1) Windows 7 32bit all service packs installed
2) Installed JDK 1.7.0_21
3) Checked PATH that only one copy of JDK\bin is in path and that it is correct.
4) Installed Eclipse Juno Java bundle. eclipse-java-juno-SR2-win32.zip
5) Install Google App Engine SDK per the tutorial using:
https://dl.google.com/eclipse/plugin/4.2
Selected:
- Google Plugin for Eclipse
- GWT
- SDK
Did NOT select:
- Developer Tools (Android)
- Google App for Android
- NDK Plugins
6) Following the tutorial, pull down the Google Icon and select "New Web Application Project"
- Name it Guestbook as shown
- Uncheck GWT
- Check Google App Engine
- Finish
7) Following the tutorial, Run as Web Application
At this point, the console shows several successful steps and then crashes and burns with jetty unable to establish a loop back connection. The full console output is attached below. I have searched all over the web and have not been able to find anything. I checked PATH and JDK. I checked the Windows firewall rule for Eclipse, it looks OK. I looked at the Classpath tab but could not see anything obviously wrong (although I don't know what it is supposed to look like)
Full Console Output
Jun 15, 2013 2:56:51 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed E:\User Data\Dave\Documents\Google App Engine Scratch\Guestbook\war\WEB-INF/appengine-web.xml
Jun 15, 2013 2:56:51 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed E:\User Data\Dave\Documents\Google App Engine Scratch\Guestbook\war\WEB-INF/web.xml
Jun 15, 2013 2:56:51 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'E:\Eclipse Google App Engine\eclipse\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.8.1\appengine-java-sdk-1.8.1\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'E:\User Data\Dave\Documents\Google App Engine Scratch\Guestbook\war\WEB-INF\appengine-web.xml'
Jun 15, 2013 2:56:51 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 15, 2013 7:56:52 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Jun 15, 2013 7:56:54 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed org.mortbay.jetty.nio.SelectChannelConnector$1#15321fc: java.io.IOException: Unable to establish loopback connection
Jun 15, 2013 7:56:54 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed SelectChannelConnector#127.0.0.1:8888: java.io.IOException: Unable to establish loopback connection
Jun 15, 2013 7:56:54 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed Server#150305e: java.io.IOException: Unable to establish loopback connection
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source)
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(Unknown Source)
at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source)
at java.nio.channels.Pipe.open(Unknown Source)
at sun.nio.ch.WindowsSelectorImpl.<init>(Unknown Source)
at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source)
at java.nio.channels.Selector.open(Unknown Source)
at org.mortbay.io.nio.SelectorManager$SelectSet.<init>(SelectorManager.java:312)
at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:223)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:314)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:249)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:307)
at com.google.appengine.tools.development.AutomaticServerInstanceHolder.startUp(AutomaticServerInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractServer.startup(AbstractServer.java:80)
at com.google.appengine.tools.development.Servers.startup(Servers.java:82)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:237)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:339)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:274)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:250)
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Unknown Source)
at sun.nio.ch.Net.connect(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at java.nio.channels.SocketChannel.open(Unknown Source)
... 26 more
PROBLEM SOLVED!
I was able to absolutely nail the cause of this problem and fix it.
What I did was removed the JRE and JDK from "C:\Program Files\Java\" (which is where Oracle's installer puts them by default) and reinstalled them in "C:\Java\Java7\" Apparently something in Eclipse and/or the Google Android development kit is still sensitive to spaces in the pathname to the JDK. This is an ancient general problem with Eclipse reported around 2005.
I did NOT need to drop down to Java 6
I did NOT need to edit Eclipse.ini and add a -VM line
I did NOT need to manually add the path to the jdk to PATH
Hope this helps the next person because this is an incredibly frustrating problem when you encounter it.
Thanks!
David Hetherington
Problem: Trying to run the 'Hello World' app using google eclipse plugin (eclipse - Kepler).
Solution: Adding to David's answer. If you have multiple jre's installed make sure the jre you are pointing to does not have a space in the absolute path. To change the jre you are pointing to go to eclipse - window->preferences->server->runtime environments->google app engine->edit. Now check the jre version you are pointing to. In my case I had jdk 1.7 installed in Program Files/Java and jre6 and jre7 installed in the same location. I moved jdk 1.7 to Program_files but was still getting the loopback error. Followed the above steps and pointed the jre version to the one in jdk1.7/jre in Program_files/java as earlier it was pointing to C:/Program Files/java/jre7
Hope this helps someone.
Are you sure you don't have anything else running with the same PORT number as the web-application? Default webapplication PORT is 8888

Google app engine sdk is using JRE Not JDK

I am not using eclipse, using GAE SDK to upload my project, problem is when i am trying to upload it is using jre not jdk thats the reason i am getting below error, please help how can i force app engine sdk to use JDK instead of jre
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\j1013366\Desktop\social.login.2013\appengine-java-sdk-1.8.0\appengine-j
ava-sdk-1.8.0\bin>appcfg.cmd update apps/SocialLoginProject
Reading application configuration data...
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.AppEngineWebXmlReade
r readAppEngineWebXml
INFO: Successfully processed apps/SocialLoginProject\WEB-INF/appengine-web.xml
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.AbstractConfigXmlRea
der readConfigXml
INFO: Successfully processed apps/SocialLoginProject\WEB-INF/web.xml
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.IndexesXmlReader rea
dConfigXml
INFO: Successfully processed apps\SocialLoginProject\WEB-INF\appengine-generated
\datastore-indexes-auto.xml
Beginning interaction for server default...
0% Created staging directory at: 'C:\Users\j1013366\AppData\Local\Temp\appcfg152
7926604447976257.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
Error Details:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:238)
at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:214)
at org.apache.jasper.JspC.processFile(JspC.java:1181)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:
40)
Caused by: java.lang.NullPointerException
at com.google.appengine.tools.development.LocalJspC$LocalCompiler.<clini
t>(LocalJspC.java:53)
... 7 more
com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp
files.
Unable to update app: Failed to compile jsp files.
Please see the logs [C:\Users\j1013366\AppData\Local\Temp\appcfg5225288314554557
20.log] for further information.
C:\Users\j1013366\Desktop\social.login.2013\appengine-java-sdk-1.8.0\appengine-j
ava-sdk-1.8.0\bin>
Personally I have intentionally set it up to use the JRE from within the SDK by modifying appcfg.cmd to
"%JAVA_HOME%\bin\java" -Djava.home="%JAVA_HOME%\jre" -Xmx1100m -cp "%~dp0\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg %*
and setting JAVA_HOME to point to the JDK.
I am guessing you could modify -Djava.home="%JAVA_HOME%\jre" to point to wherever you like.

NumberFormatException throw out from BufferUtil.java when run in GAE1.7.3+

I'm using richface 4.3.0.M2 and it's throwing the exception below when I run with GAE 1.7.3 and GAE 1.7.4. However, it works fine with GAE 1.7.2.
Any help or workarounds available?
INFO: request=com.google.appengine.tools.development.ResponseRewriterFilter$RequestWrapper#14e834c, response=com.google.appengine.tools.development.ResponseRewriterFilter$ResponseWrapper#18e2fc5, chain=Faces Servlet
14/12/2012 2:01:35 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /javax.faces.resource/application.css.jsf
java.lang.NumberFormatException: Wed, 05 Dec 2012 23:22:19 GMT
at org.mortbay.io.BufferUtil.toLong(BufferUtil.java:106)
at org.mortbay.jetty.HttpFields$Field.getLongValue(HttpFields.java:1479)
at org.mortbay.jetty.HttpFields.getLongField(HttpFields.java:720)
at org.mortbay.jetty.Request.getIntHeader(Request.java:728)
at javax.servlet.http.HttpServletRequestWrapper.getIntHeader(HttpServletRequestWrapper.java:106)
at
I found out that it's a pending problem with google app engine. The issue page can be found here. They offer a workaround which does fix this problem, though it has not yet been fixed formally.
Similar question made here.

Google App Engine Local instance never loads but no error shown

I'm using Eclipse to develop and test a new GWT application. Everything appears to work, however when I click the URL to launch it, it leaves the browser in a "loading" status and never actually displays the application. There is no indication of an error in the console.
I've tried accessing the admin url and get the same thing -- just hangs forever with a "loading status" despite the fact that the last line console output reads:
"INFO: The admin console is running at [URL removed so I can post...]"
Full output is below. Any idea what might be wrong or where I could look to figure out how to fix this?
My console output is this:
Dec 19, 2011 4:20:47 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Dec 19, 2011 4:20:48 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Documents and Settings\dhamilton\My Documents\Test1\war\WEB-INF/appengine-web.xml
Dec 19, 2011 4:20:48 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Documents and Settings\dhamilton\My Documents\Test1\war\WEB-INF/web.xml
Dec 19, 2011 10:20:53 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
Dec 19, 2011 10:20:53 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:8888/_ah/admin

App Engine doesn't find WEB-INF in WAR created by sbt

I'm trying to make a Lift app that I can run on App Engine and am managing the project with sbt. I have web.xml and appengine-web.xml in src/main/webapp/WEB-INF and package the project with sbt project. According to a previous SO quesiton, that should be all I need. However, I get this:
$ dev_appserver.sh target/scala_2.8.1/
2011-02-06 13:37:45.763 java[20355:903] [Java CocoaComponent compatibility mode]: Enabled
2011-02-06 13:37:45.765 java[20355:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Feb 6, 2011 12:37:47 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
com.google.apphosting.utils.config.AppEngineConfigException: Supplied application has to contain WEB-INF directory.
at com.google.appengine.tools.development.JettyContainerService.determineAppRoot(JettyContainerService.java:319)
at com.google.appengine.tools.development.JettyContainerService.initContext(JettyContainerService.java:145)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:146)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
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)
Any ideas why? Thanks.
Sorry, I just figured out the problem after submitting the question. The following invocation of the dev server works: dev_appserver.sh target/scala_2.8.1/webapp

Resources