SonarQube docker container can't start, elasticsearch issue - docker

I'm trying to run official SonarQube Docker container locally. I'm using the command provided here:
https://hub.docker.com/_/sonarqube/
It exits about 1 minute after it was started. Logs are reporting Elasticsearch connectivity issue
2017.09.05 08:16:40 INFO web[][o.e.client.transport] [Edwin Jarvis] failed to connect to node [{#transport#-1}{127.0.0.1}{127.0.0.1:9001}], removed from nodes list
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9001] connect_timeout[30s]
.....
Caused by: java.net.ConnectException: Connection refused: /127.0.0.1:9001
.....
... 3 common frames omitted
2017.09.05 08:17:10 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2017.09.05 08:17:10 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

Turns out SonarQube container didn't have enough resources. I shut down other docker containers and it works for me now.

Related

i've tried to start logstash opensearch service following the steps in opensearch documentation however connection still failed

NB: i've already installed logstash with docker and it successfully started at endpoint {:port=>9600, :ssl_enabled=>false}.
this is what i get as an error:
The stdin plugin is now waiting for input:
[2022-08-22T08:39:59,117][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2022-08-22T08:40:03,491][WARN ][logstash.outputs.opensearch][main] Attempted to resurrect connection to dead OpenSearch instance, but got an error {:url=>"https://admin:xxxxxx#opensearch:9200/", :exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::HostUnreachableError, :message=>"OpenSearch Unreachable: [https://admin:xxxxxx#opensearch:9200/][Manticore::ResolutionFailure] opensearch"}

Want to upgrade my docker from 19.03.5 to latest where many countainers are running

I am new to docker and linux. I am running docker 19.03.5. I had sonarqube 7.9.2 installed but I had to upgrade the sonarqube. After the upgrade I hit this issue. Now as per my understaning I don't have any choice but to upgrade docker too. Docker has many contaniers running and I am afraid that this upgrade will effect others work- Any suggestion are welcome!
After a search I get that all the containers will restart after docker start but I still want to confirm if there is anything I should keep in mind?
Issue to resolve is:
After upgrade the sonarqube contanier close with error
Dropping Privileges
2022.05.02 12:18:50 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2022.05.02 12:18:50 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:36393]
2022.05.02 12:18:50 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
could not find java in ES_JAVA_HOME at /usr/lib/jvm/java-11-openjdk/bin/java
2022.05.02 12:18:50 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.05.02 12:18:50 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2022.05.02 12:18:50 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.05.02 12:18:50 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
[1]: https://github.com/SonarSource/docker-sonarqube/issues/493
[1]: https://github.com/SonarSource/docker-sonarqube/issues/493
and to solve this I have to upgrade Docker as mentioned here. I am open for any other way to solve the issue.

Flink 1.14.3 - [issue] failed to bind to /0.0.0.0:6123

We are using 1.14.3 version of flink and when we try to run Job manager, we are getting below exception.
I tried entering
akka.remote.netty.tcp.hostname = "127.0.0.1" in flink-conf.yml file and even updated IP with hostname. But didnt help.
[flink-akka.actor.default-dispatcher-5]
ERROR akka.remote.transport.netty.NettyTransport - failed to bind to /0.0.0.0:6123, shutting down Netty transport
ERROR org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Could not start cluster entrypoint StandaloneSessionClusterEntrypoint.
org.apache.flink.runtime.entrypoint.ClusterEntrypointException: Failed to initialize the cluster entrypoint StandaloneSessionClusterEntrypoint
Caused by: java.net.BindException: Could not start actor system on any port in port range 6123```
Can you check if you have an application already running on port 6123?

SonarQube docker keeps stopping

I am testing out SonarQube locally on my machine using docker, however the docker container keeps stopping, not sure why this is the case. Am using Mac and am not sure if the Java version affects SonarQube but am running Java version 11 on my machine.
These are the logs I am getting
2021.07.22 16:49:46 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021.07.22 16:49:46 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:39173]
2021.07.22 16:49:46 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021.07.22 16:49:47 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2021.07.22 16:49:47 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2021.07.22 16:49:47 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.07.22 16:49:47 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
This is the command I used to run the docker container
docker run --name sonarqube --restart always -p 9000:9000 -d sonarqube
What am I missing?
I updated the version of docker on my machine to the latest(Been skipping for almost a year) and it worked

Configure SonarQube on Jenkins

I have SonarQube and Jenkins dockerized(They're running on different containers); sonar is running on localhost:9000 and Jenkins is running on localhost:8080. I configured the Sonar credentials(with acces Token) on Jenkins, but i when run SonarScanner I'm getting the following error by SonarScaner on Jenkins:
ERROR: SonarQube server [http://localhost:9000] can not be reached
INFO: ----------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ----------------------------------------------------------------
INFO: Total time: 0.358s
INFO: Final Memory: 4M/119M
INFO: ----------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to execute SonarQube
ERROR: Caused by: Fail to get bootstrap index from server
ERROR: Caused by: Failed to connect to localhost/127.0.0.1:9000
ERROR: Caused by: Connection refused (Connection refused)
Docker:
How could i solve this, or make that both containers communicate between each others?
You can't use 127.0.0.1 as the IP address because that's the IP of the local container. You need to use the IP of the host.
I wrote an article on how to setup a Docker container of Jenkins and SonarQube to talk to each other that explains the setup.

Resources