Running the latest version of sonarcube 7.1.2 and getting the following error.:
Command executed: sudo ./sonar.sh
Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2018.07.01 18:36:05 INFO app[][o.s.a.AppFileSystem] Cleaning or
creating temp directory /Users/aneeshgoel/Downloads/sonarqube-7.2.1/temp
2018.07.01 18:36:05 INFO app[][o.s.a.es.EsSettings] Elasticsearch
listening on /127.0.0.1:9001
2018.07.01 18:36:05 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch
process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from
[/Users/aneeshgoel/Downloads/sonarqube-7.2.1/elasticsearch]:
/Users/aneeshgoel/Downloads/sonarqube-
7.2.1/elasticsearch/bin/elasticsearch -
Epath.conf=/Users/aneeshgoel/Downloads/sonarqube-7.2.1/temp/conf/es
2018.07.01 18:36:05 INFO app[][o.s.a.SchedulerImpl] Waiting for
Elasticsearch to be up and running
2018.07.01 18:36:10 INFO app[][o.e.p.PluginsService] no modules loaded
2018.07.01 18:36:10 INFO app[][o.e.p.PluginsService] loaded plugin
[org.elasticsearch.transport.Netty4Plugin]
2018.07.01 18:36:16 WARN app[][o.s.a.p.AbstractProcessMonitor] Process
exited with exit value [es]: 1
2018.07.01 18:36:16 INFO app[][o.s.a.SchedulerImpl] Process [es] is
stopped
2018.07.01 18:36:16 INFO app[][o.s.a.SchedulerImpl] SonarQube is
stopped
<-- Wrapper Stopped
Then I tried with non sudo user. Command ./sonar.sh
Error got is :
--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2018.07.01 18:18:16 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/aneeshgoel/Downloads/sonarqube-7.2.1/temp
WrapperSimpleApp: Encountered an error running main: java.nio.file.AccessDeniedException: /Users/aneeshgoel/Downloads/sonarqube-7.2.1/temp/conf/es/elasticsearch.yml
java.nio.file.AccessDeniedException: /Users/aneeshgoel/Downloads/sonarqube-7.2.1/temp/conf/es/elasticsearch.yml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at org.sonar.process.FileUtils2$DeleteRecursivelyFileVisitor.visitFile(FileUtils2.java:170)
I have tried giving write access also to the directory , but still no luck. Please can someone help in debugging the issue.
SonarQube installation guide, unfortunately, doesn’t say a thing about configuring user for the analysis server. People that are installing it can later forget about it, leaving SonarQube running with root rights for a while.
It is, however pretty simple and straightforward. Prepare sonar system user and change installation directory rights:
You have to run the sonar in the context of sonar user. To create a user called sonar, follow these steps:
groupadd sonar useradd -c "Sonar System User" -d /opt/sonarqube -g
sonar -s /bin/bash sonar chown -R sonar:sonar /opt/sonarqube
Then edit the file present here:
/opt/sonarqube/bin/sonar.sh
Find the line which reads RUN_AS_USER=sonar which will be commented, and then change as sonar and try to run the app now.
Related
I am getting this error on starting NiFi.
2021-07-27 11:48:16,955 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read pid file
and
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
I have tried
using cmd window in Administrator mode
Changed to http settings instead of https
changed ports
set PATH JAVA_HOME and JRE_HOME
tries running on windows server and work desktop
when I run "run-nifi.bat"
i get:
2021-07-27 15:22:00,668 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2021-07-27 15:22:00,668 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0
2021-07-27 15:22:00,669 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\jdk1.8.0_301\bin\java.exe -classpath C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\conf;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\javax.servlet-api-3.1.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\jcl-over-slf4j-1.7.30.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\jetty-schemas-3.1.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\jul-to-slf4j-1.7.30.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\log4j-over-slf4j-1.7.30.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\logback-classic-1.2.3.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\logback-core-1.2.3.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-api-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-framework-api-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-nar-utils-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-properties-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-property-utils-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-runtime-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-server-api-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-stateless-api-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\nifi-stateless-bootstrap-1.14.0.jar;C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\lib\slf4j-api-1.7.30.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dcurator-log-only-first-connection-issue-as-error-level=true -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dzookeeper.admin.enableServer=false -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=49291 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\bin\..\\logs org.apache.nifi.NiFi
2021-07-27 15:22:00,898 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read pid file C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2021-07-27 15:22:00,900 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read status file C:\NiFi\NIFI-1~1.0-B\NIFI-1~1.0\bin\..\run\nifi.status; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2021-07-27 15:22:00,902 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 12948
And then it closes.
any ideas what to try next.
I'm trying to setup SonarQube 7.8 version. Once i start sonar.sh file it is running but after that sonar stops.
root#automation:/opt/sonarqube-7.8/bin/linux-x86-64# ./sonar.sh start
Starting SonarQube...
Started SonarQube.
root#automation:/opt/sonarqube-7.8/bin/linux-x86-64# ./sonar.sh status
SonarQube is not running.
I checked the logs and this is what i get:
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2019.10.15 21:01:37 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-7.8/temp
2019.10.15 21:01:37 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.10.15 21:01:37 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-7.8/elasticsearch]: /opt/sonarqube-7.8/elasticsearch/bin/elasticsearch
2019.10.15 21:01:37 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.10.15 21:01:38 INFO app[][o.e.p.PluginsService] no modules loaded
2019.10.15 21:01:38 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019.10.15 21:01:41 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2019.10.15 21:01:41 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019.10.15 21:01:41 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
es.log file is here :
2019.10.15 21:01:41 ERROR es[][o.e.b.Bootstrap] Exception
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.8.0.jar:6.8.0]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.8.0.jar:6.8.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.8.0.jar:6.8.0]
I'm not sure why SonarQube stops. Could you help me with that please?
SOLVED:
First, don't run sonarqube as the root user
Create user
command: useradd username (put username as sonaradmin(if you don't want to change any command)
Create a password command: passwd username
goto /opt/ directory
3.1) Rename sonarqube.x.x.x to sonarqube command:sudo mv sonarqube.x.x.x sonarqube(X.X.X you should change directory name)
Change permissions command:chmod 775 -R sonarqube(folder name may change Sonarqube )
Add Created user to sonaradmin group command: chown -R sonaradmin:sonaradmin sonarqube
goto : cd /opt/sonarqube/bin/linux-x86-64/
Command: su sonaradmin
Enter password
command:./sonar.sh start
Command:./sonar.sh status
Now goto browser check http://localhost:9000/sonar
Hoping this helps.... I have gone through the same issue,solved
ok, i found the solution. All i had to do is to change #RUN_AS_USER= in /opt/sonarqube-7.8/bin/linux-x86-64/sonar.sh line 48 to RUN_AS_USER=sonar
Your solution for me doesn't works, cause console show me this messagge (after edit to sonar.sh file)
groups: "sonar": no such user
chown: utente non valido: "sonar:sonar"
su: user sonar does not exist
if baya prakash reddy's answer doesn't work, so you can look at the documentation https://docs.sonarqube.org/latest/requirements/requirements/ where it says that you must ensure that:
vm.max_map_count is greater than or equal to 524288
yo can set it like this:
sysctl -w vm.max_map_count=524288
Ensure your sonarQube server has at least 4GB of RAM. I had this issue after installing SonarQube with 1GB of RAM. Running SonarQube as sonar did not resolve the issue. Once I installed on RHL with 4GB RAM, issue was resolved
I'm running the hivemq mqtt broker community edition and wanted to add the prometheus extension for monitoring.
Both come precompiled from the hivemq marketplace and the github project page.
I download both components as a zip file, unzip them and copy them into a java 11 docker container using this dockerfile:
FROM alpine:3.10 AS TOOLCHAIN
ADD https://github.com/hivemq/hivemq-community-edition/releases/download/2019.1/hivemq-ce-2019.1.zip /opt/
ADD https://www.hivemq.com/releases/extensions/hivemq-prometheus-extension-4.0.1.zip /opt/
WORKDIR /opt
RUN unzip hivemq-ce-* -d ./
RUN unzip hivemq-prometheus-extension* -d ./
RUN rm -rf hivemq-ce-*.zip
RUN rm -rf hivemq-prometheus-extension*.zip
RUN mv ./hivemq-ce-* ./hivemq
FROM openjdk:11-jdk-slim
COPY --from=TOOLCHAIN /opt/hivemq /opt/hivemq
COPY --from=TOOLCHAIN /opt/hivemq-prometheus-extension /opt/hivemq/extensions/hivemq-prometheus-extension
WORKDIR /opt/hivemq/
CMD ["chmod","755","./bin/run.sh"]
CMD ["./bin/run.sh"]
I think I got the steps from the how to's right, but when I start the container with docker build -t hive-test .; docker run -p 1883:1883 -p 9399:9399 -t hive-test I get an error.
2019-07-24 13:19:57,125 INFO - Starting HiveMQ Community Edition Server
2019-07-24 13:19:57,127 INFO - HiveMQ version: 2019.1
2019-07-24 13:19:57,127 INFO - HiveMQ home directory: /opt/hivemq
2019-07-24 13:19:57,162 INFO - Log Configuration was overridden by /opt/hivemq/conf/logback.xml
2019-07-24 13:19:57,356 INFO - This HiveMQ ID is mwDbQ
2019-07-24 13:20:14,353 INFO - Created user preferences directory.
2019-07-24 13:20:14,873 INFO - Starting HiveMQ extension system.
2019-07-24 13:20:14,925 INFO - Starting TCP listener on address 0.0.0.0 and port 1883
2019-07-24 13:20:14,998 INFO - Started TCP Listener on address 0.0.0.0 and on port 1883
2019-07-24 13:20:14,999 INFO - Started HiveMQ in 17877ms
2019-07-24 13:20:15,040 ERROR - Extension with id "hivemq-prometheus-extension" cannot be started because of an uncaught exception thrown by the extension. Extension will be disabled.
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at org.eclipse.jetty.server.handler.ContextHandler.<clinit>(ContextHandler.java:114)
at com.hivemq.extensions.prometheus.export.PrometheusServer.start(PrometheusServer.java:64)
at com.hivemq.extensions.prometheus.PrometheusMainClass.extensionStart(PrometheusMainClass.java:65)
at com.hivemq.extensions.HiveMQExtensionImpl.start(HiveMQExtensionImpl.java:133)
at com.hivemq.extensions.HiveMQPlugins.pluginStart(HiveMQPlugins.java:209)
at com.hivemq.extensions.loader.PluginLifecycleHandlerImpl.lambda$startPlugin$0(PluginLifecycleHandlerImpl.java:82)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at com.hivemq.extensions.classloader.IsolatedPluginClassloader.loadClass(IsolatedPluginClassloader.java:123)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 9 common frames omitted
I also downloaded the broker and extension source code and tried to compile it by myself with maven/gradle and java 11. But that had the exact same result.
The broker runs without any errors.
Does anyone know what went wrong here?
Actually no dependency from the hivemq broker community edition contains ServletContextListener. I downloaded the source code from github and modified the build.gradle file.
Add the last line of the following snippet to the build.gradle file:
/* javax */
[group: 'javax.activation', name: 'activation', version: '1.1.1'],
[group: 'javax.validation', name: 'validation-api', version: '1.1.0.Final'],
[group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'],
[group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'],
After compiling the broker unzip the result and add the precompiled extension to the extension directory.
The error is gone and the extension seems to be working.
I am new to Apache OFBiz. I have downloaded and installing the OFBiz by instructions. I have loaded the data successfully.
But when am running OFBiz using gradlew it stopped at birt-container. I have added the console information here.
Build process stopped at 91% with the message of "Started container birt-container" for 5 hours and I have stopped the process. Still no idea why it is stopping here.
2017-05-04 11:01:42,143 |main |CatalinaContainer |I| Connector HTTP/1.1 # 8443 - secure [org.apache.coyote.http11.Http11NioProtocol] started.
2017-05-04 11:01:42,143 |main |CatalinaContainer |I| Started Apache Tomcat/8.0.37
2017-05-04 11:01:42,143 |main |ContainerLoader |I| Started container catalina-container
2017-05-04 11:01:42,143 |main |ContainerLoader |I| Starting container birt-container
2017-05-04 11:01:42,143 |main |BirtContainer |I| Start BIRT container
2017-05-04 11:01:42,152 |main |BirtContainer |I| Startup BIRT platform
2017-05-04 11:01:43,034 |main |BirtContainer |I| Create factory object
2017-05-04 11:01:43,052 |main |BirtContainer |I| Create report engine
2017-05-04 11:01:43,130 |main |BirtContainer |I| BIRT supported formats: xlsx, postscript, docx, pptx, pdf, ppt, xls_spudsoft, doc, html,
odp, xls, odt, ods
2017-05-04 11:01:43,130 |main |ContainerLoader |I| Started container birt-container
> Building 91% > :ofbiz
The Gradle percentage is bit misleading here, it does not reach 100% as long as OFBiz is running. I think you just assumed after building the service will be up. Not like that. Once the Service is up it will be in 91%. But the Service has been started. You can access the E-Commerce and other services. Once you are running service get the following URL (ex).
localhost:8443/ap/control/main
You will be redirected to admin login page. Give user as "admin" and password as "ofbiz". Do the changes and test your data as you want in Accounting, Manufacturing, HR , etc..
Note: After completed your process stop the process using "stopofbiz" shell script file under tools folder. After stop the service you can able to see the build will be reach 100% in service console.
This is a duplicate to Installing OfBiz in debug mode hangs
I think OFBiz does not hang and that you should be able to access and work with it without problems. The Gradle percentage is bit misleading here, it does not reach 100% as long as OFBiz is running.
See also https://lists.apache.org/thread.html/26543a82adf1f8d9a8bec47975e8d87f750c2de2f2da7e242b04a72e#%3Cuser.ofbiz.apache.org%3E
Prepare OFBiz:
Clean all:
gradlew cleanAll loadDefault testIntegration
Note: Depending on your Internet connection speed it might take a long time for this step to complete if you are using OFBiz for the first time as it needs to download all dependencies. So please be patient!
MS Windows: gradlew cleanAll loadDefault
Unix-like OS: ./gradlew cleanAll loadDefault
Start OFBiz:
MS Windows: gradlew ofbiz
Unix-like OS: ./gradlew ofbiz
Reference: After download http://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-16.11.02.zip , unzip, look for
apache-ofbiz-16.11.02/tools/documentation/README.md.html
I'm having an issue running the Selenium standalone server -- it just hangs partway through loading. I've tried several different versions of the standalone server but the same issue arises. From the command line I run...
java -jar selenium-server-standalone-2.25.0.jar
And get back...
Oct 16, 2012 8:29:34 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
20:29:40.190 INFO - Java: Apple Inc. 20.10-b01-428
20:29:40.193 INFO - OS: Mac OS X 10.7.4 x86_64
20:29:40.202 INFO - v2.25.0, with Core v2.25.0. Built from revision 17137
20:29:40.322 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
20:29:40.324 INFO - Version Jetty/5.1.x
20:29:40.324 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
20:29:40.326 INFO - Started HttpContext[/selenium-server,/selenium-server]
20:29:40.326 INFO - Started HttpContext[/,/]
20:29:40.376 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#1f8b81e3
20:29:40.377 INFO - Started HttpContext[/wd,/wd]
20:29:40.382 INFO - Started SocketListener on 0.0.0.0:4444
20:29:40.383 INFO - Started org.openqa.jetty.jetty.Server#4ee1d5ea
If the comment does not help, try changing start command to
java -jar lib/selenium-server-standalone-2.25.0.jar -role hub
(It is command for starting Selenium Grid, so it might be wrong for you, but I dont know what are you trying to achieve)
And as mentioned above, after the command is run
DO NOT CLOSE COMMAND LINE
Open browser and load http://127.0.0.1:4444/
You should see something like this:
You are using grid 2.25.0
Find help on the official selenium wiki : more help here
default monitoring page : console