Discussion:
Connection refused: connect
Karen Goh
2018-09-21 08:54:34 UTC
Permalink
Hi,

I am repeatedly getting the following exceptions and am stuck here like forever.

Hope someone can tell me what's wrong with my tomcat server version: 8.5.24 with Eclipse


java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
at java.lang.Thread.run(Unknown Source)

Tks.
Subject: Error: Could not find or load main class set
Date: Saturday, September 15, 2018, 2:50 PM
Hi,
I am now getting the above error. 
There is no further error stacktrace from error log or
console etc.
So far, I have deleted the server and
created new instances but still getting the same error.
I have read the following solutions but
they are not helpful
http://www.java67.com/2016/09/3-ways-to-solve-eclipse-main-class-not-found-error-java.html
https://www.researchgate.net/post/How_to_solve_Error_Could_not_find_or_load_main_class
Please help.
Tks,
Karen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
André Warnier (tomcat)
2018-09-21 15:06:16 UTC
Permalink
Post by Karen Goh
Hi,
I am repeatedly getting the following exceptions and am stuck here like forever.
Hope someone can tell me what's wrong with my tomcat server version: 8.5.24 with Eclipse
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
at java.lang.Thread.run(Unknown Source)
Tks.
Did you configure an access log for your Tomcat ?
If yes, can you look into it for the an access that would happen at the same time as the
error you show above ?

I am curious, rather than definitive here.
But the word "connect" looks suspiciously like the HTTP CONNECT method (see :
https://en.wikipedia.org/wiki/HTTP_tunnel), and maybe someone is just trying to use your
Tomcat server as a proxy to something.
If so, then someone or something is trying to hack your server, and your server is
(correctly) rejecting that call.
Post by Karen Goh
Subject: Error: Could not find or load main class set
Date: Saturday, September 15, 2018, 2:50 PM
Hi,
I am now getting the above error.
There is no further error stacktrace from error log or
console etc.
So far, I have deleted the server and
created new instances but still getting the same error.
I have read the following solutions but
they are not helpful
http://www.java67.com/2016/09/3-ways-to-solve-eclipse-main-class-not-found-error-java.html
https://www.researchgate.net/post/How_to_solve_Error_Could_not_find_or_load_main_class
Please help.
Tks,
Karen
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
André Warnier (tomcat)
2018-09-21 19:45:27 UTC
Permalink
Hi.
Sorry, forget my answer below, I was probably talking nonsense here.
The stack trace that you show does not even mention any Tomcat class, so the "connect"
mentioned below probably has nothing to do with the HTTP CONNECT method.
It looks like something in Eclipse itself, but since I do not know Eclipse (either), I
don't have a clue.
Post by André Warnier (tomcat)
Post by Karen Goh
Hi,
I am repeatedly getting the following exceptions and am stuck here like forever.
Hope someone can tell me what's wrong with my tomcat server version: 8.5.24 with Eclipse
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
at java.lang.Thread.run(Unknown Source)
Tks.
Did you configure an access log for your Tomcat ?
If yes, can you look into it for the an access that would happen at the same time as the
error you show above ?
I am curious, rather than definitive here.
https://en.wikipedia.org/wiki/HTTP_tunnel), and maybe someone is just trying to use your
Tomcat server as a proxy to something.
If so, then someone or something is trying to hack your server, and your server is
(correctly) rejecting that call.
Post by Karen Goh
Subject: Error: Could not find or load main class set
Date: Saturday, September 15, 2018, 2:50 PM
Hi,
I am now getting the above error.
There is no further error stacktrace from error log or
console etc.
So far, I have deleted the server and
created new instances but still getting the same error.
I have read the following solutions but
they are not helpful
http://www.java67.com/2016/09/3-ways-to-solve-eclipse-main-class-not-found-error-java.html
https://www.researchgate.net/post/How_to_solve_Error_Could_not_find_or_load_main_class
Please help.
Tks,
Karen
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Igal Sapir
2018-09-21 22:51:59 UTC
Permalink
Post by André Warnier (tomcat)
Hi.
Sorry, forget my answer below, I was probably talking nonsense here.
The stack trace that you show does not even mention any Tomcat class,
so the "connect" mentioned below probably has nothing to do with the
HTTP CONNECT method.
It looks like something in Eclipse itself, but since I do not know
Eclipse (either), I don't have a clue.
Post by Karen Goh
Hi,
I am repeatedly getting the following exceptions and am stuck here like forever.
8.5.24 with Eclipse
java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown
Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at
org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
    at java.lang.Thread.run(Unknown Source)
It looks to me like Eclipse is trying to connect to Tomcat but fails. 
If the connection is made over the network then a firewall might be
playing a role here.  If it's all done locally then Tomcat is not
listening on the host:port to which Eclipse is trying to connect.

Can you connect to that host:port with a browser?  e.g.
http://localhost:8080/ ?

Igal


---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Luis Rodríguez Fernández
2018-09-26 11:59:02 UTC
Permalink
Hello Karen,

May I ask you what exactly you try to do:

- Deploy locally
- Deploy remotely
- Debug locally
- Debug remotely
- Other...

Eclipse version? Other plugins or tools (e.g. maven)?

Thanks,

Luis
Post by Karen Goh
Post by André Warnier (tomcat)
Hi.
Sorry, forget my answer below, I was probably talking nonsense here.
The stack trace that you show does not even mention any Tomcat class,
so the "connect" mentioned below probably has nothing to do with the
HTTP CONNECT method.
It looks like something in Eclipse itself, but since I do not know
Eclipse (either), I don't have a clue.
Post by Karen Goh
Hi,
I am repeatedly getting the following exceptions and am stuck here like forever.
8.5.24 with Eclipse
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
Post by André Warnier (tomcat)
Post by Karen Goh
at java.lang.Thread.run(Unknown Source)
It looks to me like Eclipse is trying to connect to Tomcat but fails.
If the connection is made over the network then a firewall might be
playing a role here. If it's all done locally then Tomcat is not
listening on the host:port to which Eclipse is trying to connect.
Can you connect to that host:port with a browser? e.g.
http://localhost:8080/ ?
Igal
---------------------------------------------------------------------
--
"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."

- Samuel Beckett
Guang Chao
2018-09-27 03:50:20 UTC
Permalink
Post by Karen Goh
Hi,
I am repeatedly getting the following exceptions and am stuck here like forever.
Hope someone can tell me what's wrong with my tomcat server version: 8.5.24 with Eclipse
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
at java.lang.Thread.run(Unknown Source)
Tks.
Can I assume that what you are trying to do are the following?

- You downloaded Tomcat 8 and extracted somewhere on hard drive
- You created a web project in Eclipse
- You created new Server Runtime by adding in preferences and specifying
the path of your Tomcat 8
- You run your web project using the runtime
Post by Karen Goh
Subject: Error: Could not find or load main class set
Date: Saturday, September 15, 2018, 2:50 PM
Hi,
I am now getting the above error.
There is no further error stacktrace from error log or
console etc.
So far, I have deleted the server and
created new instances but still getting the same error.
I have read the following solutions but
they are not helpful
http://www.java67.com/2016/09/3-ways-to-solve-eclipse-main-class-not-found-error-java.html
https://www.researchgate.net/post/How_to_solve_Error_Could_not_find_or_load_main_class
Please help.
Tks,
Karen
---------------------------------------------------------------------
--
Guang <http://javadevnotes.com/java-array-of-objects>
Loading...