• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

MailConnectException: Couldn't connect to host, port: smtp.google.com, 587; timeout: -1

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i m sendin userActicvation mail this is showing....

com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.google.com, 587; timeout -1;
 nested exception is:
       java.net.ConnectException: Connection timed out: connect
       at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2209)
       at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
       at javax.mail.Service.connect(Service.java:388)
       at javax.mail.Service.connect(Service.java:246)
       at javax.mail.Service.connect(Service.java:195)
       at javax.mail.Transport.send0(Transport.java:254)
       at javax.mail.Transport.send(Transport.java:124)
       at utils.EmailSender.sendEmail(EmailSender.java:44)
       at controllers.RegisterServlet.doPost(RegisterServlet.java:51)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
       at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
       at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
       at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
       at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
       at java.base/java.net.DualStackPlainSocketImpl.connect0(Native Method)
       at java.base/java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
       at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
       at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
       at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
       at java.base/java.net.PlainSocketImpl.connect(Unknown Source)
       at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
       at java.base/java.net.Socket.connect(Unknown Source)
       at java.base/java.net.Socket.connect(Unknown Source)
       at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:359)
       at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
       at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2175)
       ... 32 more
 
Saloon Keeper
Posts: 7174
166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

You likely meant to use smtp.gmail.com rather than smtp.google.com.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic