简体   繁体   中英

Tomee Server :java.net.ConnectException: Connection refused: connect

I am trying to deploy my webservice on tomee server.

When I use maven goal as "tomme:run" to start the server, it gives the following error:

  [INFO] Running 'run'. Configured TomEE in plugin is localhost:8080 (plugin shutdown port is 8005)
    EError opening zip file or JAR rror occurred during initialization of VM
    agent library failed to init: instrument
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    manifest missing : C:\Documents
    [INFO] Total time: 30.844s
    [INFO] Finished at: Thu Nov 01 17:36:15 IST 2012

[INFO] Final Memory: 10M/26M
[INFO] ------------------------------------------------------------------------
java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:525)
    at java.net.Socket.connect(Socket.java:475)
    at java.net.Socket.<init>(Socket.java:372)
    at java.net.Socket.<init>(Socket.java:186)
    at org.apache.openejb.config.RemoteServer.stop(RemoteServer.java:366)
    at org.apache.openejb.maven.plugin.AbstractTomEEMojo$2.run(AbstractTomEEMojo.java:568)

But if I use startup.bat file to start the server , everything works fine.

Does anybody has any idea for this issue?

This seems a bit old but just in case if it helps.

It seems that when you are using the tomee plugin failed to start the server at the first place, and that is the reason for the connection refused issue. Because it tries to connect to the shutdown port to shutdown the server but obviously it is not available as the server never started.

So you should focus on "Error opening zip file or JAR rror occurred during initialization of VM agent library failed to init: instrument". By any chance, the artifact in your local maven repo can be corrupt ?

Best Regards, Nandana

Not precisely the same situation, but I encountered this error:

"Error occurred during initialization of VM agent library failed to init: instrument Error opening zip file or JAR manifest missing : C:apache-tomee-plus-1.5.2/lib/openejb-javaagent.jar

when I tried to fire up TomEE as "./catalina.sh start" in a Cygwin terminal on my Windows box. Same result whether I tried a new complete TomEE or an already-existing Tomcat with the TomEE war. Works fine when I use the batch file in a Windows terminal as "catalina start". I don't really care enough to chase the issue further, but it appears that Tommy likes you to use a native shell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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