简体   繁体   English

Google App Engine Java,无法访问localhost!

[英]Google App Engine Java, cannot access localhost!

I am starting to develop my first GAE app and just installed the eclipse plugin. 我开始开发我的第一个GAE应用程序并刚刚安装了eclipse插件。

The problem is that I cannot even run the sample apps already included with the plugin. 问题是我甚至无法运行插件中已包含的示例应用程序。

After compiling, the log reads that the server is running but when I point my browser to that address it fails to connect. 编译后,日志会读取服务器正在运行但是当我将浏览器指向该地址时,它无法连接。

I have verified that the problem is not with localhost, as I can connect to it if I run tomcat, or other servers. 我已经验证问题不在于localhost,因为如果我运行tomcat或其他服务器,我可以连接到它。

The problem is specific to eclipse and GAE. 问题是eclipse和GAE特有的。

Any ideas? 有任何想法吗?

maybe something is blocking the port your server should run on. 也许有些东西阻塞了你的服务器应该运行的端口。

eg skype wants to run on port 80 in default settings 例如,skype想要在默认设置中在端口80上运行

on windows try "netstat -a -n" 在Windows上尝试“netstat -a -n”

Is this a cross-domain security issue? 这是跨域安全问题吗? Perhaps the browser is pointing to the web page at port 80 and the page you get back tries to do a cross domain access to the GAE services on port 8080? 也许浏览器指向端口80处的网页,并且您获取的页面尝试在端口8080上对GAE服务进行跨域访问? That will cause a failure. 那会导致失败。 Or do you have the app on 8080 also serving out the web page? 或者你有8080的应用程序也提供网页?

The best way to figure out the problem is to install a debugger add-on in your browser. 找出问题的最佳方法是在浏览器中安装调试器插件。 I suggest Firebug for Firefox or Web Developer for Chrome. 我建议使用Firebug for Firefox或Web Developer for Chrome。 Or just look on the javascript console for your browser. 或者只是在浏览器的javascript控制台上查看。

I have now confirmed this is a know issue with the newest Java update for mac. 我现在已经确认这是最新的mac Java更新的一个已知问题。

The browser cannot connect to localhost because there is no one listening there, the issue causes the server to crash just after it has started running. 浏览器无法连接到localhost,因为没有人在那里监听,该问题导致服务器在开始运行后崩溃。

You can read more about the issue here . 您可以在此处详细了解该问题。

For now, the solution is to revert back to the last version of Java for mac (.22). 目前,解决方案是恢复到最新版本的Java for Mac(.22)。

Hopefully Google and Apple will look into it. 希望Google和Apple能够深入研究它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM