我尝试在远程主机上启动应用程序并收到以下异常
message java.net.ConnectException: Connection refused: connect
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.net.ConnectException: Connection refused: connect
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.handleServiceException(AbstractApplicationServlet.java:1010)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:548)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.net.ConnectException: Connection refused: connect
java.net.DualStackPlainSocketImpl.connect0(Native Method)
java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
java.net.Socket.connect(Socket.java:579)
java.net.Socket.connect(Socket.java:528)
sun.net.NetworkClient.doConnect(NetworkClient.java:180)
sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
sun.net.www.http.HttpClient.New(HttpClient.java:290)
sun.net.www.http.HttpClient.New(HttpClient.java:306)
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:633)
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:799)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40)
scala.xml.XML$.loadXML(XML.scala:40)
scala.xml.factory.XMLLoader$class.load(XMLLoader.scala:54)
scala.xml.XML$.load(XML.scala:40)
com.exo.AppUser.<init>(AppUser.scala:17)
com.exo.OdaWebApplication.<init>(OdaWebApplication.scala:24)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.Class.newInstance(Class.java:374)
com.vaadin.terminal.gwt.server.ApplicationServlet.getNewApplication(ApplicationServlet.java:82)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.createApplication(AbstractApplicationServlet.java:984)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.findApplicationInstance(AbstractApplicationServlet.java:807)
com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:456)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
我试图找出原因并检查了一些问题,但它仍然无法正常工作我找到了一些关于它的信息,但它无助我检查了一些问题,例如:
- 服务不听 - catalina 记录了听
- 防火墙阻止请求 - 没有防火墙,没有防病毒
- 用户无法连接到服务器 - 它仅在 localhost 中运行
- 应用程序不工作 - 在 IDE 中正常工作
应用程序从 IDE 正确运行,并且在主机重新启动之前也是如此。
我不明白为什么会这样。