Camunda Optimize cannot be started. Port already in used - spring

As I'm trying to exploit the Camunda Enterprise version, now I'm stuck at the Optimize server. I'm not able to start the Optimize server followed by instruction. Here is the log file
16:59:37.322 [main] DEBUG o.e.j.u.component.AbstractLifeCycle - starting ServerConnector#48974e45{HTTP/1.1,[http/1.1]}{0.0.0.0:8095}
16:59:37.325 [main] WARN o.e.j.u.component.AbstractLifeCycle - FAILED ServerConnector#48974e45{HTTP/1.1,[http/1.1]}{0.0.0.0:8095}: java.io.IOException: Failed to bind to /0.0.0.0:8095
java.io.IOException: Failed to bind to /0.0.0.0:8095
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:231)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.server.Server.doStart(Server.java:385)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.camunda.optimize.jetty.EmbeddedCamundaOptimize.startOptimize(EmbeddedCamundaOptimize.java:169)
at org.camunda.optimize.Main.main(Main.java:17)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:342)
... 8 common frames omitted
I know it is obvious but I tried to changing different port. It's still showing the same error, no matter which port I choose. Please help to take a look.

The port is already in use, the message is obvious. All you can do is to kill the process that is listening to this thread.
I use Windows, but you can search for Linux way to do, the principle is the same.
Windows:
Find a process that uses the port 8095 using netstat -aon | find "8095". The result looks like:
TCP 0.0.0.0:8003 0.0.0.0:0 LISTENING 23332
TCP [::]:8003 [::]:0 LISTENING 23332
Find in the Task Manager in the Details tab what runs under the PID (process ID) number 23332.
End such a task. It will be probably java.exe since there is a pending process listening to the port. Restart the IDE and everything should work well. If it is ex. a database or anything else, you have to use a different port than 8095 either at your side or the application that already uses it.
Linux: https://unix.stackexchange.com/questions/140482/kill-any-service-running-at-a-specific-port

Related

Connector[HTTP/1.1-8081] Error while running two projects in STS simultaneously

I am trying to run 2 Microservices projects using two instances of STS (sts-4.4.2.RELEASE). Once First project is up and running , I try to run the second project and get below error.
I have specified two different ports for these 2 projects via VM Agruments :
-Dserver.port=8055
-Dserver.port=8088
Looks like 8081 port is configured in Tomcat or any other configuration internally. Could you please help/suggest.
Error log :
{"mdc":{},"timestamp":"2020-05-16 11:20:07.317","level":"ERROR","logger":"org.apache.catalina.core.StandardService","message":"Failed to start connector [Connector[HTTP/1.1-8081]]","exception":"\r\norg.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8081]]\r\n\tat org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)\r\n\tat org.apache.catalina.core.StandardService.addConnector(StandardService.java:225)\r\n\tat org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:261)\r\n\tat org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:198)\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:311)\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:164)\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)\r\n\tat org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration$DifferentManagementContextConfiguration.afterSingletonsInstantiated(ManagementContextAutoConfiguration.java:151)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:548)\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)\r\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:307)\r\n\tat ***********)\r\nCaused by: org.apache.catalina.LifecycleException: Protocol handler start failed\r\n\tat org.apache.catalina.connector.Connector.startInternal(Connector.java:1020)\r\n\tat org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)\r\n\t... 16 common frames omitted\r\nCaused by: java.net.BindException: Address already in use: bind\r\n\tat sun.nio.ch.Net.bind0(Native Method)\r\n\tat sun.nio.ch.Net.bind(Unknown Source)\r\n\tat sun.nio.ch.Net.bind(Unknown Source)\r\n\tat sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)\r\n\tat sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)\r\n\tat org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:219)\r\n\tat org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1160)\r\n\tat org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591)\r\n\tat org.apache.catalina.connector.Connector.startInternal(Connector.java:1018)\r\n\t... 17 common frames omitted\r\n\r\n"}
{"mdc":{},"timestamp":"2020-05-16 11:20:07.417","level":"ERROR","logger":"org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter","message":"\r\n\r\n***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nThe Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured.\r\n\r\nAction:\r\n\r\nVerify the connector's configuration, identify and stop any process that's listening on port 8081, or configure this application to listen on another port.\r\n","exception":""}
Two possible reasons:
1. Tomcat is not honoring the -Dserver.port= argument. Do note that -D is a JVM startup argument that, in this case, sets the server.port system variable. If you append -Dserver.port to the end of the Tomcat startup command, it might be interpreted as a command line argument for the Tomcat process. Try moving it before the Tomcat class name so you're sure it's picked up as a command line argument for the JVM (java -Dserver.port=x tomcat.class.name)
2. There is another listener configured in Tomcat (for example, an AJP connector). Look for port 8081 in Tomcat's server.xml and either change it there or find the respective command line argument to set this to another port when starting up.

How install alluxio1.2 on openstack

I try to install alluxio1.2 on a VM centos on openstack with spark and hdfs but the installation doesn't works. Spark and hdfs are already install and work
ERROR logger.type (AlluxioMaster.java:main) - Uncaught exception while running Alluxio master, stopping it and exiting.
java.lang.RuntimeException: java.net.BindException: Address already in use
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at alluxio.web.UIWebServer.startWebServer(UIWebServer.java:164)
at alluxio.master.AlluxioMaster.startServingWebServer(AlluxioMaster.java:467)
at alluxio.master.AlluxioMaster.startServing(AlluxioMaster.java:452)
at alluxio.master.AlluxioMaster.startServing(AlluxioMaster.java:447)
at alluxio.master.AlluxioMaster.start(AlluxioMaster.java:389)
at alluxio.master.AlluxioMaster.main(AlluxioMaster.java:86)
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:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at alluxio.web.UIWebServer.startWebServer(UIWebServer.java:154)
... 5 more
Are there a special installation to install alluxio on one openstack machine ?
It looks like the Alluxio master's web UI cannot start because the address is already in use. This happens if the port is taken by another process. Alluxio web UI uses the port 19999 for the web UI by default. If you expect another process to be using that port, you can change the Alluxio master web UI port by changing the configuration parameter (http://www.alluxio.org/docs/master/en/Configuration-Settings.html#master-configuration), alluxio.master.web.port, to another port number.

AWS workers can't communicate due to Netty-Client hostname resolution

I'm actually working on topology taking data from kafka and persist them into elasticsearch. Ok first, I used the basic KafkaSpout from storm dependency to listen for data coming from a precise kafka topic and, I re-implemented the Elasticsearch bolt from the elasticsearch-hadoop project: https://github.com/elastic/elasticsearch-hadoop/blob/master/storm/src/main/java/org/elasticsearch/storm/EsBolt.java. The goal was to write on several indices in elasticsearch.
So, when I process the messages coming from kafka, I have some exceptions when the number of data grow up in the kafka queue. This is one part of the stack trace in the worker logs:
2016-04-13T22:24:44.641+0000 b.s.m.n.Client [ERROR] failed to send 580 messages to Netty-Client-ip-[internal-ip].ec2.internal/[internal-ip]:6700:
java.nio.channels.ClosedChannelException
2016-04-13T22:24:44.641+0000 b.s.m.n.Client [ERROR] failed to send 575 messages to Netty-Client-ip-[internal-ip].ec2.internal/[internal-ip]:6700:
java.nio.channels.ClosedChannelException
2016-04-13T22:25:05.970+0000 b.s.m.n.Client [WARN] Re-connection to ip-[internal-ip].ec2.internal/[internal-ip]:6701 was successful but 52890 messages
has been lost so far
2016-04-13T22:36:33.571+0000 b.s.m.n.StormClientHandler [INFO] Connection failed Netty-Client-ip-ip-[internal-ip].ec2.internal/[internal-ip]:6701
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_77]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[na:1.8.0_77]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_77]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_77]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_77]
at org.apache.storm.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64) [storm-core-0.9.6.jar:0.9.6]
at org.apache.storm.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [storm-core-0.9.6.jar:0.9.6]
at org.apache.storm.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) [storm-core-0.9.6.jar:0.9.6]
at org.apache.storm.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [storm-core-0.9.6.jar:0.9.6]
at org.apache.storm.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [storm-core-0.9.6.jar:0.9.6]
at org.apache.storm.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [storm-core-0.9.6.jar:0.9.6]
at org.apache.storm.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [storm-core-0.9.6.jar:0.9.6]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
I'm using a storm cluster of 3 nodes (1 nimbus+UI+Zookeeper and 2 supervisors). Storm version 0.9.6. Each of these machines have 4GB RAM and this is the content my storm.yml config file:
storm.zookeeper.servers:
- "nimbus-ip"
storm.local.dir: "/mnt/storm"
nimbus.seeds: ["nimbus-ip"]
storm.zookeeper.port: 2181
ui.port: 8080
nimbus.host: "nimbus-ip"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
storm.messaging.netty.max_wait_ms: 10000
Can anyone help me to know why workers can't communicate due to Netty-Client hostname resolution? I already saw one report of this issue in the 0.9.4 version of storm https://issues.apache.org/jira/browse/STORM-908. Is it possible that the 0.9.6 version does not fix this issue?
Many thanks!!
I got here from google looking for answers to a similar problem. In my case, the error was:
o.a.s.m.n.Client [ERROR] connection attempt 104 to Netty-Client-ip-XXX-XXX-XXX-XXX.ec2.internal/XXX.XXX.XXX.XXX:6703 failed: java.net.ConnectException: Connection refused: ip-XXX-XXX-XXX-XXX.ec2.internal/XXX.XXX.XXX.XXX:6703
This was appearing on a 2-node storm cluster (v1.0.1).
At first, I thought this was a networking issue with AWS (which is where I was deploying the nodes). I started to look at security group rules, /etc/hosts files etc etc, none of which helped.
After some searching I discovered this: https://issues.apache.org/jira/browse/STORM-1382 and figured that maybe the issue wasn't the network at all, but something on the other end wasn't running.
So, I ssh-d into a worker node and took a look at the supervisor log, which showed me something like this lots and lots:
o.a.s.d.supervisor [INFO] 30236e62-d2e1-4d5c-b75c-f54ef07653a4 still hasn't started
When I looked at the worker.log itself, I discovered there was a problem with the default java version. That was my problem, but other people's problems may be related to other reasons that a worker may fail.
Anyway, once I set the correct default java version it all kicked into life.

MongoDB, SparkJava using Maven Connection Error

Error Log :
Listening on 0.0.0.0:4567
2014-11-27 00:37:47,570 WARN - log - FAILED SocketConnector#0.0.0.0:4567: java.net.BindException: Address already in use: JVM_Bind
2014-11-27 00:37:47,572 WARN - log - FAILED org.eclipse.jetty.server.Server#5595a5a9: java.net.BindException: Address already in use: JVM_Bind
you didn't terminate spark properly and it's still running and bound to the default port 4567.
Just close the previous process and restart. If you can't find it or it's running in the background you can use NETSTAT to find the process and kill it.
on windows netstat -b to find the process

Cloudera Manager failed to start Activity Monitor

I downloaded CDH 4.5 quick start vm from here. Each service looks good except for below error was seen after I opened Activities tab to view mapreduce activities:
The Activity Monitor server (activitymonitor (localhost)) is unavailable or not responding to connections.
The problem remains after I tried to restart Activity Monitor service, then I found following error message in the log. Can anybody help take a look?
11:24:35.862 PM WARN org.mortbay.log
failed SelectChannelConnector#localhost.localdomain:9999: java.net.BindException: Address already in use
11:24:35.864 PM WARN org.mortbay.log
failed Server#59cc2f42: java.net.BindException: Address already in use
11:24:35.869 PM ERROR com.cloudera.cmon.firehose.Main
Failed to start Firehose
com.cloudera.enterprise.EnterpriseServiceException: java.net.BindException: Address already in use
at com.cloudera.cmon.firehose.AgentMessageService.startService(AgentMessageService.java:144)
at com.cloudera.enterprise.EnterpriseService.start(EnterpriseService.java:71)
at com.cloudera.enterprise.EnterpriseService.start(EnterpriseService.java:68)
at com.cloudera.cmon.firehose.Main.main(Main.java:371)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.cloudera.cmon.firehose.AgentMessageService.startService(AgentMessageService.java:142)
... 3 more
"java.net.BindException: Address already in use" clearly states that port 9999 is already occupied by some other service. You have to check the PID of the service and stop it:
lsof -P | grep LISTEN | grep 9999
use the PID to kill or if you know the service then stop gracefully

Resources