In Jenkins, there's a plugin for sending notifications once the job runs for various triggers. This plugin depends upon setting mail server in Jenkins global configuration.
Editable Email Notification Plugin - Fails the whole build if the mail server is not reachable (port 25) or for some reason if the edit email notification post action fails (for various triggers we set in the job's config).
Now, if I have a build/deploy job which completed successfully (in doing main stuff) but failed during the sending email part (due to some mail server issue) then why it's marking the whole job as failed.
The email trigger action should not mark the build as FAILED (if email trigger part failed due to a mail server issue) and Jenkins should either queue the email up (for sending the email at a later point once mail server is back/up/online OR the post action should just not have any impact to the job's status). If email trigger fails, just echo - Email sending action failed as mail server had an issue due to this / that (detail message).
How can I get rid of this situation. I have a long running job and I don't want to re-run it (if I know that the mail server is back online) and even if I re-run the job, I'm not 100% sure that the mail server will be up/running or not.
Just trying to see if there's an option we can set in Edit Email Notification to not mark the build job as FAILED if email notification step fails (i.e. enhancement to this plugin) OR some other way I can get rid of this situation.
17:15:55 ERROR: Could not send email as a part of the post-build publishers.
17:15:55 javax.mail.MessagingException: Could not connect to SMTP host: my-mailhost.company.com, port: 25;
17:15:55 nested exception is:
17:15:55 java.net.ConnectException: Connection refused
17:15:55 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
17:15:55 at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
17:15:55 at javax.mail.Service.connect(Service.java:295)
17:15:55 at javax.mail.Service.connect(Service.java:176)
17:15:55 at javax.mail.Service.connect(Service.java:125)
17:15:55 at javax.mail.Transport.send0(Transport.java:194)
17:15:55 at javax.mail.Transport.send(Transport.java:124)
17:15:55 at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:306)
17:15:55 at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:281)
17:15:55 at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:233)
17:15:55 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
17:15:55 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772)
17:15:55 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:736)
17:15:55 at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
17:15:55 at hudson.model.Run.execute(Run.java:1778)
17:15:55 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
17:15:55 at hudson.model.ResourceController.execute(ResourceController.java:88)
17:15:55 at hudson.model.Executor.run(Executor.java:234)
17:15:55 Caused by: java.net.ConnectException: Connection refused
17:15:55 at java.net.PlainSocketImpl.socketConnect(Native Method)
17:15:55 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
17:15:55 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
17:15:55 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
17:15:55 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
17:15:55 at java.net.Socket.connect(Socket.java:519)
17:15:55 at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:286)
17:15:55 at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
17:15:55 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
17:15:55 ... 17 more
17:15:55 Finished: FAILURE
No options are found to get rid of your situlation in the email plugin, though i rechecked the plugin's config.
Maybe Parameterized Trigger Plugin could save your time in some other way as i know.
To Create two jobs: project-A(main) and project-B
To Configure Trigger parameterized build on other projects in main project-A so as to trigger project-B to run.
Project-B just send emails if main project-A runs stablely. So the result of the main project-A won't be effected by the offline mail server.
The parameters needed in the email could be transfered easily through the plugin.
I hope this could help you!
Related
I use StaticHandler in vertx-web to serve all static resource(css js mp4 files),
rootRouter.get("/static/*").handler(StaticHandler.create());
I use <video> tag to access the mp4 file in my page:
<video muted="muted" autoplay="autoplay" loop="loop" src="/static/img/factory.mp4"></video>
When I access the page which contained the mp4 file from Chrome, the server side will report a exception:
03:04:17.893 [vert.x-eventloop-thread-3] ERROR i.vertx.core.net.impl.ConnectionBase - Connection reset by peer
java.io.IOException: Connection reset by peer
at java.base/sun.nio.ch.FileChannelImpl.transferTo0(Native Method)
at java.base/sun.nio.ch.FileChannelImpl.transferToDirectlyInternal(FileChannelImpl.java:501)
at java.base/sun.nio.ch.FileChannelImpl.transferToDirectly(FileChannelImpl.java:566)
at java.base/sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:678)
at io.netty.channel.DefaultFileRegion.transferTo(DefaultFileRegion.java:130)
at io.netty.channel.socket.nio.NioSocketChannel.doWriteFileRegion(NioSocketChannel.java:362)
at io.netty.channel.nio.AbstractNioByteChannel.doWriteInternal(AbstractNioByteChannel.java:238)
at io.netty.channel.nio.AbstractNioByteChannel.doWrite0(AbstractNioByteChannel.java:212)
at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:400)
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:934)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.forceFlush(AbstractNioChannel.java:361)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:708)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
But when I use Firefox, there will be no problem.
And other static resources work normal, only the mp4 file will cause this exception.
Does anyone know what's going on? What should I do?
Connection reset by peer
is a response by the remote server (or firewall between them) stating that it will not proceed with completing this request.
So the other side has abruptly aborted the connection in midst of a transaction.
There are many possible reasons for this. It may well be a firewall denial, an SSL handshake failure, a VPN issue, slow internet, a proxy problem or even an HTTP failed request.
PS: this and this were helpful.
Updating the vert.x version in use could also print less of such messages as stated here.
First of all: I'm a newbie to OPCUA. :)
I'm trying to connect an Milo Client to our Server but don't really understand whats going wrong. The sample Client and Server work fine together, but when I try to connect the client sample with one of the public OPC-UA-Test-Servers I get those exceptions:
15:48:34.729 [ua-netty-event-loop-0] DEBUG
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler
- Sent Hello message on channel=[id: 0xc22800c2, L:/10.22.19.217:58947 - R:opcua.demo-this.com/52.233.134.134:51210]. 15:48:34.729 [ua-netty-event-loop-0] WARN io.netty.channel.DefaultChannelPipeline -
An exceptionCaught() event was fired, and it reached at the tail of
the pipeline. It usually means the last handler in the pipeline did
not handle the exception. java.io.IOException: An existing connection
was forcibly closed by the remote host at
sun.nio.ch.SocketDispatcher.read0(Native Method) at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) at
sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at
sun.nio.ch.IOUtil.read(IOUtil.java:192) at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at
io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:221)
at
io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:898)
at
io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371) at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745) 15:48:39.612
[ForkJoinPool.commonPool-worker-1] DEBUG
org.eclipse.milo.opcua.stack.client.ClientChannelManager - Channel
bootstrap failed: timed out waiting for acknowledge
org.eclipse.milo.opcua.stack.core.UaException: timed out waiting for
acknowledge at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler.lambda$startHelloTimeout$4(UaTcpClientAcknowledgeHandler.java:156)
at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler$$Lambda$27/469017260.run(Unknown
Source) at
io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581)
at
io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655)
at
io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367)
at java.lang.Thread.run(Thread.java:745) 15:48:39.613 [main] ERROR
org.eclipse.milo.examples.client.ClientExampleRunner - Error running
example: UaException: status=Bad_Timeout, message=timed out waiting
for acknowledge java.util.concurrent.ExecutionException: UaException:
status=Bad_Timeout, message=timed out waiting for acknowledge at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1887)
at
org.eclipse.milo.examples.client.ClientExampleRunner.createClient(ClientExampleRunner.java:56)
at
org.eclipse.milo.examples.client.ClientExampleRunner.run(ClientExampleRunner.java:103)
at
org.eclipse.milo.examples.client.BrowseExample.main(BrowseExample.java:40)
Caused by: org.eclipse.milo.opcua.stack.core.UaException: timed out
waiting for acknowledge at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler.lambda$startHelloTimeout$4(UaTcpClientAcknowledgeHandler.java:156)
at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler$$Lambda$27/469017260.run(Unknown
Source) at
io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581)
at
io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655)
at
io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367)
at java.lang.Thread.run(Thread.java:745) 15:48:42.842
[threadDeathWatcher-2-1] DEBUG io.netty.buffer.PoolThreadCache - Freed
2 thread-local buffer(s) from thread: ua-netty-event-loop-0
I took the sample-Code and removed the Certificate/Keypair and changed the URL to opc.tcp://opcua.demo-this.com:51210/UA/SampleServer since the public server doesn't need authorization:
SecurityPolicy securityPolicy = clientExample.getSecurityPolicy();
EndpointDescription[] endpoints = UaTcpStackClient.getEndpoints("opc.tcp://opcua.demo-this.com:51210/UA/SampleServer").get();
EndpointDescription endpoint = Arrays.stream(endpoints)
.filter(e -> e.getSecurityPolicyUri().equals(securityPolicy.getSecurityPolicyUri()))
.findFirst().orElseThrow(() -> new Exception("no desired endpoints returned"));
logger.info("Using endpoint: {} [{}]", endpoint.getEndpointUrl(), securityPolicy);
loader.load();
OpcUaClientConfig config = OpcUaClientConfig.builder()
.setApplicationName(LocalizedText.english("eclipse milo opc-ua client"))
.setApplicationUri("urn:eclipse:milo:examples:client")
//.setCertificate(loader.getClientCertificate())
//.setKeyPair(loader.getClientKeyPair())
.setEndpoint(endpoint)
.setIdentityProvider(clientExample.getIdentityProvider())
.setRequestTimeout(uint(5000))
.build();
return new OpcUaClient(config);
What am I missing?
Greetings and thanks in advance :)
Buried in that stack trace is the real problem: UaException: timed out waiting for acknowledge.
Maybe your firewall or network setup is blocking it, or maybe the server didn't send it back, but the problem is that the client never received the Acknowledge message in response to its Hello.
FWIW, I can run the ReadExample against that public server with no issue. In ReadExample I overrode getSecurityPolicy() and returned SecurityPolicy.None and in ClientExampleRunner just replaced the endpoint URL.
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Failed to send request
Detail:
<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at weblogic.webservice.binding.http11.Http11ClientBinding.send(Http11ClientBinding.java:438)
at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHandler.java:38)
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:144)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:235)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:146)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:449)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:435)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:306)
at com.cengage.ips.IPSInquiryWebServiceSoap_Stub.itemInquiry(IPSInquiryWebServiceSoap_Stub.java:64)
at main.java.com.cengage.ips.ServiceManager.getItemResponse(ServiceManager.java:57)
at main.java.com.cengage.ips.process.ResponseHandler.itemResponseHandler(ResponseHandler.java:49)
at main.java.com.cengage.ips.IPSIntegration.process(IPSIntegration.java:63)
at main.java.com.cengage.ips.IPSIntegration.run(IPSIntegration.java:37)
at main.java.com.cengage.ips.IPSIntegration.main(IPSIntegration.java:28)
</bea_fault:stacktrace></detail>; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: Failed to send request
at com.cengage.ips.IPSInquiryWebServiceSoap_Stub.itemInquiry(IPSInquiryWebServiceSoap_Stub.java:69)
at main.java.com.cengage.ips.ServiceManager.getItemResponse(ServiceManager.java:57)
at main.java.com.cengage.ips.process.ResponseHandler.itemResponseHandler(ResponseHandler.java:49)
at main.java.com.cengage.ips.IPSIntegration.process(IPSIntegration.java:63)
at main.java.com.cengage.ips.IPSIntegration.run(IPSIntegration.java:37)
at main.java.com.cengage.ips.IPSIntegration.main(IPSIntegration.java:28)
Caused by: javax.xml.rpc.soap.SOAPFaultException: Failed to send request
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:317)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:147)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:449)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:435)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:306)
at com.cengage.ips.IPSInquiryWebServiceSoap_Stub.itemInquiry(IPSInquiryWebServiceSoap_Stub.java:64)
... 5 more
Am trying to use one SOAP web service. I have tried executing this application in my local windows machine using some cmd script file. Its working fine. But when i try in Unix server with shell script am getting the above error. Can someone please suggest the solution?
I am trying to test the cloud mobles using perfectomobiles though test case in eclipse for that i added Perfecto mobile add-in to eclipse and while creating a project i given below details
Cloud : mobilecloud.perfectomobile.com, username and password
after created the project we didn't get any MobileCloud views those MobileCloud Recording and MobileCloud Dashboard tabs are empty. i didn't under stand where we need to add mobiles(i am thinking like we are unable to connect to perfectomobile.com)
Then, i tried to connect through code like below
MobileDriver driver = new MobileDriver("mobilecloud.perfectomobile.com","username","password");
try {
// write your code here
IMobileDevice device = driver.getDevice("3152168C4EAA1E2A5DE93CF7B89222720E3A62E0");
device.open();
IMobileWebDriver webDriver = device.getDOMDriver("google.com");
webDriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
webDriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
webDriver.findElement(By.xpath("(//input[#id=\"lst-ib\"])[1]")).sendKeys("Perfecto Mobile");
webDriver.findElement(By.xpath("(//button[#id=\"tsbb\"])[1]")).click();
}
But, I am getting exception like below
10:40:39.569 [main] ERROR c.p.selenium.util.EclipseConnector - Failed to connect to MobileCloud for Eclipse plugin on host: localhost and port: 3287. Possible reasons are: The code doesn't run in Eclipse or the user doesn't have ECLIPSE role or the MobileCloud recording view is not open. In these cases use the MobileDriver constructor that receives the host, user and password.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.7.0_55]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[na:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[na:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[na:1.7.0_55]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.7.0_55]
at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_55]
at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_55]
at java.net.Socket.<init>(Socket.java:425) ~[na:1.7.0_55]
at java.net.Socket.<init>(Socket.java:208) ~[na:1.7.0_55]
at com.perfectomobile.selenium.util.EclipseConnector.<init>(EclipseConnector.java:34) ~[pm-selenium-3.5.0.000.jar:na]
at com.perfectomobile.selenium.MobileDriver.initWithEclipseParams(MobileDriver.java:79) [pm-selenium-3.5.0.000.jar:na]
at com.perfectomobile.selenium.MobileDriver.<init>(MobileDriver.java:64) [pm-selenium-3.5.0.000.jar:na]
at com.perfectomobile.selenium.MobileDriver.<init>(MobileDriver.java:60) [pm-selenium-3.5.0.000.jar:na]
at MobileTest.main(MobileTest.java:42) [bin/:na]
Can any one help me
I believe your Perfecto mobile account doesn't have the Eclipse Role (or license) added to it (yes, they have something like this for Eclipse). Contact support to get it added. I faced the same issue earlier.
Iam trying out spark streaming examples with apache flume.
For installation, I have just unzipped spark-1.1.0-bin-hadoop1.tar.gz and apache-flume-1.4.0-bin.tar.gz for running spark streaming examples.Is this the correct way or else Is there any other way, then just let me know.
With the above mentioned steps.. I have tried executing the examples, it throws an bind exception. Can someone help me with this issue ?
My flume is running properly it is able to push the data on relevant port...
The error Iam facing is mentioned below..
14/11/07 23:19:23 ERROR scheduler.ReceiverTracker: Deregistered receiver for stream 0: Error starting receiver 0 - org.jboss.netty.channel.ChannelException:
Failed to bind to: /172.29.17.178:65001
at org.apache.avro.ipc.NettyServer.<init>(NettyServer.java:106)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:62)
at org.apache.spark.scheduler.Task.run(Task.scala:54)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:177)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:344)
at sun.nio.ch.Net.bind(Net.java:336)
Even after killing the specific port still facing with the similar issue..
Can someone help me to resolve this issue..
That port is already in use.
From your log:
"Caused by: java.net.BindException: Address already in use"
Use another one.