Jenkins test email fails but build email is sent - email

I have configured my Jenkins Extended E-mail Notification as below
SMTP SERVER: smtp.gmail.com
Use SMTP Authentication: ticked
User Name: ***#gmail.com
Password: ***
USE SSL: ticked
PORT: 465
Charset: UTF-8
I have added my ***#outlook.com email as recipient. My build runs and sends the email shown under Console Output
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.608 s
[INFO] Finished at: 2019-05-03T11:32:20+01:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving C:\Users\qz\ECLIPSE\Workspace\CucumberReports\pom.xml to Cucumber_Selenium/Cucumber_Selenium/0.0.1-SNAPSHOT/Cucumber_Selenium-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving C:\Users\qz\ECLIPSE\Workspace\CucumberReports\target\Cucumber_Selenium-0.0.1-SNAPSHOT.jar to Cucumber_Selenium/Cucumber_Selenium/0.0.1-SNAPSHOT/Cucumber_Selenium-0.0.1-SNAPSHOT.jar
channel stopped
Email was triggered for: Always
Sending email for trigger: Always
Sending email to: ***#outlook.com
Finished: SUCCESS
But for some reason my test email gets refused. I'm wondering what the problem is as I don't receive the email too. Any suggestion would be appreciated
Failed to send out e-mail
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(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 com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:286)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
Caused: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
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)
Edit-1: adding snapshot

Related

Talend Error Exception in component tPOP_1 (test) javax.mail.MessagingException: Connection timed out: connect;

Please help me to find the solution for below error. i have tried using imap and pop3 setting, below are the configuration settings i have used
pop3:
Server name: outlook.office365.com
Port: 995
imap:
Server name: outlook.office365.com
Port: 993
Error im getting:
Exception in component tPOP_1 (test)
javax.mail.MessagingException: Connection timed out: connect;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at accor.test_0_1.test.tPOP_1Process(test.java:769)
at accor.test_0_1.test.runJobInTOS(test.java:4959)
at accor.test_0_1.test.main(test.java:4727)
Caused by: java.net.ConnectException: Connection timed out: 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)
[FATAL]: accor.test_0_1.test - tPOP_1 Connection timed out: connect
Attached is the tpop component settings i have used.
tpop component settings
configuration settings i have used
pop3:
Server name: outlook.office365.com
Port: 995
imap:
Server name: outlook.office365.com
Port: 993
Try to add this Java option in job jvm Parameters and try :
-Dmail.imap.auth.plain.disable=true
Link could help :
https://confluence.atlassian.com/jirakb/imap-setup-fails-with-authenticate-failed-error-in-logs-in-jira-server-185401609.html
Your component configuration is correct so if it doesn't work within these options that means that your organisation does bloc something
Microsoft disabled Basic Auth. You won't be able to connect, unless you use OAuth token.
Talend 8 / 7.3 R2022-09 release introduced Microsoft Exchange Auth to tPOP that automatically exchanges the credentials. Configuration for that can be found in the official help document: https://help.talend.com/r/en-US/8.0/pop/configuring-an-oauth2-application-for-pop-and-imap
There's also a long answer on Talend community with all the details: https://community.talend.com/s/question/0D55b00007LRyrWCAT/tpop-microsoft-basic-authentication-retirement?language=en_US
Git repository for the component: https://github.com/Talend/tdi-studio-se/tree/master/main/plugins/org.talend.designer.components.localprovider/components/tPOP

Ejabberd with Jitsi Videobridge ejabberd_service Failed external component handshake authentication

I want to use the Ejabberd with Jitsi Videobridge. When i configured the Ejabberd service and start the Jitsi Videobridge both side thrown the exception.
My ejabberd.yml
port: 5275
ip: "0.0.0.0"
module: ejabberd_service
access: all
shaper_rule: fast
ip: "127.0.0.1"
privilege_access:
roster: "both"
message: "outgoing"
presence: "roster"
delegations:
"urn:xmpp:mam:1":
filtering: ["node"]
"http://jabber.org/protocol/pubsub":
filtering: []
hosts:
"jitsi-videobridge.[mydomain]":
password: "587828"
start Jitsi Videobridge like below
HOST="127.0.0.1"
DOMAIN="mydomain"
PORT="5275"
SECRET="abcdef123"
JVB_HOME="/usr/src/ejabberd/jitsi-videobridge"
mvn compile exec:java -Dexec.args="--host=$HOST --domain=$DOMAIN --port=$PORT --secret=$SECRET" -Djava.library.path=$JVB_HOME/lib/native/linux-64 -Djava.util.logging.config.file=$JVB_HOME/lib/logging.properties -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.jitsi-videobridge
The ejabberd exception:
17-10-17 23:29:44.719 [info] <0.336.0>#ejabberd_listener:accept:302 (<0.521.0>) Accepted connection 127.0.0.1:39506 -> 127.0.0.1:5275
2017-10-17 23:29:44.721 [info] <0.522.0>#ejabberd_service:handle_auth_failure:173 (tcp|<0.521.0>) Failed external component handshake authentication for jitsi-videobridge.mydomain from 127.0.0.1: not authorized
2017-10-17 23:55:20.459 [info] <0.336.0>#ejabberd_listener:accept:302 (<0.549.0>) Accepted connection 127.0.0.1:51580 -> 127.0.0.1:5275
2017-10-17 23:55:20.474 [info] <0.550.0>#ejabberd_service:handle_auth_failure:173 (tcp|<0.549.0>) Failed external component handshake authentication for jitsi-videobridge.mydomain from 127.0.0.1: not authorized
2017-10-17 23:55:25.484 [info] <0.336.0>#ejabberd_listener:accept:302 (<0.551.0>) Accepted connection 127.0.0.1:51618 -> 127.0.0.1:5275
2017-10-17 23:55:25.487 [info] <0.552.0>#ejabberd_service:handle_auth_failure:173 (tcp|<0.551.0>) Failed external component handshake authentication for jitsi-videobridge.mydomain from 127.0.0.1: not authorized
Videobridge exception like :
SEVERE: not-authorized, host:127.0.0.1, port:5275
org.xmpp.component.ComponentException: not-authorized
at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:243)
at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:242)
at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:222)
at org.jitsi.meet.ComponentMain$3.call(ComponentMain.java:270)
at org.jitsi.meet.ComponentMain$3.call(ComponentMain.java:255)
at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Can anybody help?
Thank you!
orgin:
hosts:
"jitsi-videobridge.[mydomain]":
password: "587828"
the correct configure:
hosts:
"jitsi-videobridge.[mydomain]":
password: "587828"

Error while attempting to connect to an Oracle 12c database using eclipse

I am trying to connect to an oracle 12c database using the eclipse IDE but I get the error "Ping Failed!" every time I try to test the connection. I have tried to disable the windows firewall as some other similar post suggested it might be network related or the fire wall blocking it. I have the following settings:
SID: XE
Host: localhost
Port Number: 1521
UserName: myusername
Password: mypassword
connection URL: jdbc:oracle:thin:#localhost:1521:XE
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:328)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)
at org.eclipse.datatools.enablement.internal.oracle.JDBCOracleConnectionFactory.createConnection(JDBCOracleConnectionFactory.java:27)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 13 more
Caused by: java.net.UnknownHostException: server
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:120)
at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
... 18 more
Any ideas of what I am doing wrong?
Change your connection url to jdbc:oracle:thin:#server:1521:db. This will work.

Can't send email from AWS

my application is on aws EC2 it was sending email very well suddenly it started throwing exception
javax.mail.MessagingException'.
javax.mail.AuthenticationFailedException: 535 5.7.8 Error: authentication failed: authentication failure
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:826)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:761)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:685)
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 com.server.utils.EmailServicesImpl.sendMail(EmailServicesImpl.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.lang.Thread.run(Thread.java:745)
Here is my email settings
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.mydomain.in
mail.smtp.port = 587
i tried with port 25 also but the problem is still same.
According to your setting, you require StartTLS. The default port for that is 587 which is fine; changing it to 25 will most definitely break it.
And your error message states authentication failed, so I'd suspect that you are either not providing credentials or the wrong ones.

Play framework doesn't bind port in "Start" mode

If I run play run from my scala project root, it launches normally and I can test against it.
If I run play start, it does not bind to a port and there's no log output or any other indication that anything is wrong.
$ play run
[info] Loading project definition from /Users/Daenyth/myproject/project
[info] Set current project to myproject (in build file:/Users/Daenyth/myproject/)
--- (Running the application from SBT, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0%0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
$ play start
[info] Loading project definition from /Users/Daenyth/Localytics/myproject/project
[info] Set current project to profile-api (in build file:/Users/Daenyth/myproject/)
(Starting server. Type Ctrl+D to exit logs, the server will remain in background)
If I start the app by using the launcher generated by play dist or play stage it shows me the process ID but it does not bind the port.
I'm at a loss on how to proceed here - googling hasn't returned anything useful at all.
Edit:
After leaving it running for quite a long time (at least 10 minutes, I'm not sure), it finally put this output:
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0. Exception: java.net.ConnectException: Connection timed out.Message:Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Oops, cannot start the server.
Configuration error: Configuration error[Cannot connect to database [default]]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:92)
at play.api.Configuration.reportError(Configuration.scala:570)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:252)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:243)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at play.api.db.BoneCPPlugin.onStart(DB.scala:243)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:87)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:52)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:274)
at play.core.server.NettyServer.main(NettyServer.scala)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2332)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:363)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:245)
... 22 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)
... 40 more
The issue here was that the mysql server that I had configured was not reachable from my local machine, and I had a mistake in my EC2 security group that prevented my deployed instance from connecting. The defaults for timeout and max retry are very high, so I didn't see it at first because it doesn't print anything if you ^C it.
Changing my network security rules solved the problem.