javax.mail.MessagingException: Could not connect to SMTP host: usdc2spam2.slingmedia.com, port: 9000; nested exception is: java.net.ConnectException: Connection refused: connect


Samebug tips

To restart the Selenium Webdriver mock browser in a testcase, first use driver.close() and then reinstantiate the driver.


,
via Stack Overflow by LittlePanda

spring-data-redis requires redis 2.6+ to work properly.


7 months ago
Expert tip

Solutions on the web

Solution icon of stackoverflow
Could not connect to SMTP host: usdc2spam2.slingmedia.com, port: 9000; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of coderanch
via Coderanch by Eduardo Ponce de Leon, 11 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of coderanch
via Coderanch by Hasif Subair, 11 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of googlegroups
via Google Groups by Stan Orlov, 3 weeks ago
Could not connect to SMTP host: mail.msvu.ca, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of googlegroups
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of oraclecommunity
via Oracle Community by 843830, 3 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of oraclecommunity
via Oracle Community by 843834, 1 year ago
Could not connect to SMTP host: 161.85.104.5, port: 25 nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of oraclecommunity
via Oracle Community by 843830, 3 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of stackoverflow
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of stackoverflow
Could not connect to SMTP host: localhost, port: 3333; nested exception is: java.net.ConnectException: Connection refused: connect

Stack trace

javax.mail.MessagingException: Could not connect to SMTP host: usdc2spam2.slingmedia.com, port: 9000;
  nested exception is:
    java.net.ConnectException: Connection refused: connect
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
	at javax.mail.Service.connect(Service.java:317)
	at javax.mail.Service.connect(Service.java:176)
	at javax.mail.Service.connect(Service.java:125)
	at javax.mail.Transport.send0(Transport.java:194)
	at javax.mail.Transport.send(Transport.java:124)
	at samples.SendMail.sendMail(SendMail.java:46)
	at samples.SendMail.main(SendMail.java:55)
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(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 com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

2 times, 1 week ago
Once, 2 weeks ago
Once, 2 weeks ago
Once, 1 month ago
2604 times, 1 month ago
508 more bugmates