Jenkins War Deployment on Tomcat - jenkins

While Deploying my war on Tomcat server, I am getting these issues.
I/O exception (java.net.SocketException) caught when processing
request: Software caused connection abort: socket write error [INFO]
Retrying request
Failed to getClass for
org.apache.tomcat.maven.plugin.tomcat7.deploy.DeployMojo

Related

Nebula Graph fails on CentOS 6.5

Nebula Graph fails on CentOS 6.5, the error message is as follows:
# storage log
Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
# meta log
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0415 22:32:38.944437 15532 AsyncServerSocket.cpp:762] failed to set SO_REUSEPORT on async server socket Protocol not available
E0415 22:32:38.945001 15510 ThriftServer.cpp:440] Got an exception while setting up the server: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.945057 15510 RaftexService.cpp:90] Setup the Raftex Service failed, error: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.949586 15463 NebulaStore.cpp:47] Start the raft service failed
E0415 22:32:38.949597 15463 MetaDaemon.cpp:88] Nebula store init failed
E0415 22:32:38.949796 15463 MetaDaemon.cpp:215] Init kv failed!
Nebula service status is as follows:
[root#redhat6 scripts]# ./nebula.service status all
[WARN] The maximum files allowed to open might be too few: 1024
[INFO] nebula-metad: Exited
[INFO] nebula-graphd: Exited
[INFO] nebula-storaged: Running as 15547, Listening on 44500
Reason for error: CentOS 6.5 system kernel version is 2.6.32, which is less than 3.9. However, SO_REUSEPORT only supports Linux 3.9 and above.
Upgrading the system to CentOS 7.5 can solve the problem by itself.

TTN Integration in Thingsboard PE over MQTTS

Platform Integration of Thingsboard PE to a private Hosted TTN Server with MQTTS fails.
We have a TB PE hosted on AWS and I am trying to use the Platform Integration over MQTTS (port:8883) to our hosted private TTN Server.
Error
java.lang.RuntimeException: Failed to connect to MQTT broker at <mycompany>.thethings.industries:8883.
at org.thingsboard.server.service.integration.mqtt.AbstractMqttIntegration.initClient(AbstractMqttIntegration.java:182)
at org.thingsboard.server.service.integration.mqtt.basic.BasicMqttIntegration.init(BasicMqttIntegration.java:71)
at org.thingsboard.server.service.integration.DefaultPlatformIntegrationService.initIntegration(DefaultPlatformIntegrationService.java:599)
at org.thingsboard.server.service.integration.DefaultPlatformIntegrationService.getOrCreateThingsboardPlatformIntegration(DefaultPlatformIntegrationService.java:579)
at org.thingsboard.server.service.integration.DefaultPlatformIntegrationService.lambda$createIntegration$0(DefaultPlatformIntegrationService.java:245)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Log File Error:
2019-09-01 00:02:11,722 [nioEventLoopGroup-4-2] WARN i.n.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.
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

Elasticbeanstalk Deployment Fails

I am trying to deploy a docker based environment that is using 1-1 application load balancer in AWS elasticbeanstalk. I am getting the below error message. It seemed to deploy very well before but for unknown reasons the new deploys fail.
2019-01-31 18:52:23 INFO Environment update is starting.
2019-01-31 18:53:03 INFO Deploying new version to instance(s).
2019-01-31 18:53:12 INFO Successfully pulled node:10.15.0
2019-01-31 18:57:34 INFO Successfully built aws_beanstalk/staging-app
2019-01-31 18:57:42 ERROR Failed to start nginx, abort deployment
2019-01-31 18:57:44 ERROR [Instance: i-0d4b3811324b90c27] Command failed on instance. Return code: 1 Output: nginx: [emerg] no host in upstream ":8080" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Failed to start nginx, abort deployment.
Hook /opt/elasticbeanstalk/hooks/appdeploy/enact/01flip.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2019-01-31 18:57:45 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-01-31 18:57:45 ERROR Unsuccessful command execution on instance id(s) 'i-0d4b3811324b90c27'. Aborting the operation.
2019-01-31 18:57:45 ERROR Failed to deploy application.
This issue was caused of an Uncaught error in my Node js application. Issue is not with Beanstalk.

How to configure JMX exporter to monitor spring boot application in Prometheus

Monitoring Spring boot application(TestMonitoring) using JMX exporter and Prometheus. Prometheus and spring boot application Pods are up and running in kubernetes cluster.
Now the pain is to get JMX exporter running and the application should expose metrics via JMX.
In TestMonitoring application , the application.properties file has the following setting:
endpoints.jmx.enabled=true
spring.jmx.enabled=true
Now how to install the JMX exporter as an agent:
i have download the jar and executed:
java -javaagent:./jmx_prometheus_javaagent-0.9.jar=1234:config.yml
In the config.yml -> the following hostPort:xx.x.x.x:30001 (target port of myspring boot application which is available as a service)
The following exception is thrown:
Sep 22, 2017 4:12:31 PM
io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector collect
SEVERE: JMX scrape failed: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [R oot exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:370)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:106)
at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:401)
at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:99)
at io.prometheus.jmx.shaded.io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50)
at io.prometheus.jmx.shaded.io.prometheus.client.Collector.register(Collector.java:128)
at io.prometheus.jmx.shaded.io.prometheus.client.Collector.register(Collector.java:121)
at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:38)
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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:142)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:204)
at javax.naming.InitialContext.lookup(InitialContext.java:415)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1928)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1895)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
What could be the reason of the such exception,Just not able to figure it? any suggestions will be very helpful
Try https://github.com/fabric8io/agent-bond
It works fine.
Use it like this:
-javaagent:/opt/agent-bond/agent-bond.jar=/etc/config/agent-bond.properties

Flume agent throws java.net.ConnectException: Connection refused

I have been using flume for a while now, I have got agent and collector running on same machine.
Configuration
agent: exec("/usr/bin/tail -n +0 -F /path/to/file") | agentE2ESink("hostname", 35855)
collector: collectorSource(35855) | collector(10000) { collectorSink("/hdfs/path/to/sink","name") }
Facing issues in the agent node:
2012-06-04 19:13:33,625 [naive file wal consumer-27] INFO debug.InsistentOpenDecorator: open attempt 0 failed, backoff (1000ms): Failed to open thrift event sink to hostname:35855 : java.net.ConnectException: Connection refused
2012-06-04 19:13:34,625 [logicalNode hostname-19] ERROR connector.DirectDriver: Expected ACTIVE but timed out in state OPENING
2012-06-04 19:13:34,632 [naive file wal consumer-27] INFO debug.InsistentOpenDecorator: open attempt 1 failed, backoff (2000ms): Failed to open thrift event sink to hostname:35855 : java.net.ConnectException: Connection refused
2012-06-04 19:13:36,635 [naive file wal consumer-27] INFO debug.InsistentOpenDecorator: open attempt 2 failed, backoff (4000ms): Failed to open thrift event sink to hostname:35855 : java.net.ConnectException: Connection refused
and then empty ACKs will be sent continuously
2012-06-04 19:19:56,960 [Roll-TriggerThread-0] INFO endtoend.AckListener$Empty: Empty Ack Listener began 20120604-191956958+0530.881565921235084.00000026
2012-06-04 19:20:07,043 [Roll-TriggerThread-0] INFO hdfs.SeqfileEventSink: closed /tmp/flume-user1/agent/hostname/writing/20120604-191956958+0530.881565921235084.00000026
I dont understand why the connection is refused. Are there any system level changes that needs to be done ?
Note: the collector is listening to the port but agent is unable to send data through the 35855 port.
Can anyone help me with this problem.
Thanks
If you are running both the agent and the collector on the same box, you should be using localhost as the address.
agentE2ESink("localhost", 35855)

Resources