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.
Related
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
As i had created a jar from my project, i had started running it from linux terminal using the command
java -jar snapShot.jar
By running this my project works fine and gives console output as
INFO 2018-06-26 13:34:25 [main] -Registering beans for JMX exposure
on startup
INFO 2018-06-26 13:34:25 [main] -Tomcat started on port(s): 8080
(http)
INFO 2018-06-26 13:34:25 [main] -Started DomainApplication in 12.143
seconds (JVM running for 12.662)
I have another Tomcat in my local system. Apache Tomcat Version 8.5.29 .
But while running the jar file in terminal i found another tomcat service is running. Actually which gets started?
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.
I installed a cloudera cluster with a vagrant box.
I get an error when I launch the following example:
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar grep input output23 'dfs[a-z.]+'
I went to check the log in /var/log/hadoop-yarn.
There several log file, in yarn-yarn-nodemanager-cdh-master.log, there is the following stackstrace:
2015-06-17 11:42:42,398 INFO SecurityLogger.org.apache.hadoop.ipc.Server: Auth successful for appattempt_1434535025160_0001_000001 (auth:SIMPLE)
2015-06-17 11:42:42,597 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl: Start request for container_1434535025160_0001_01_
000001 by user vagrant
2015-06-17 11:42:42,762 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl: Creating a new application reference for app appli
cation_1434535025160_0001
2015-06-17 11:42:42,776 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application: Application application_1434535025160_0001 tran
sitioned from NEW to INITING
2015-06-17 11:42:42,778 INFO org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger: USER=vagrant IP=10.10.50.5 OPERATION=Start Container Request
TARGET=ContainerManageImpl RESULT=SUCCESS APPID=application_1434535025160_0001 CONTAINERID=container_1434535025160_0001_01_000001
2015-06-17 11:42:43,997 FATAL org.apache.hadoop.yarn.event.AsyncDispatcher: Error in dispatcher thread
java.lang.IllegalArgumentException: Wrong FS: hdfs://var/log/hadoop-yarn, expected: hdfs://cdh-master:8020
at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:645)
at org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:193)
at org.apache.hadoop.hdfs.DistributedFileSystem.access$000(DistributedFileSystem.java:105)
at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1128)
at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1124)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1124)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService.verifyAndCreateRemoteLogDir(LogAggregationService.java:192)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService.initApp(LogAggregationService.java:319)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService.handle(LogAggregationService.java:443)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService.handle(LogAggregationService.java:67)
at org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:173)
at org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:106)
at java.lang.Thread.run(Thread.java:744)
2015-06-17 11:42:44,000 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application: Adding container_1434535025160_0001_01_000001 t
o application application_1434535025160_0001
2015-06-17 11:42:44,001 INFO org.apache.hadoop.yarn.event.AsyncDispatcher: Exiting, bbye..
2015-06-17 11:42:44,034 INFO org.mortbay.log: Stopped HttpServer2$SelectChannelConnectorWithSafeStartup#0.0.0.0:8042
2015-06-17 11:42:44,035 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl: Applications still running : [application_14345350
I've seen this error
java.lang.IllegalArgumentException: Wrong FS:
hdfs://var/log/hadoop-yarn, expected: hdfs://cdh-master:8020
in the following post: Failed to start Jobtracker and Tasktracker in CDH pseudo cluster, but this did not helped me much.
Does anyone has an idea?
Thx
Change the property yarn.nodemanager.remote-app-log-dir in yarn-site.xml config file either to:
<property>
<name>yarn.nodemanager.remote-app-log-dir</name>
<value>hdfs://cdh-master:8020/var/log/hadoop-yarn/apps</value>
</property>
or
<property>
<name>yarn.nodemanager.remote-app-log-dir</name>
<value>/var/log/hadoop-yarn/apps</value>
</property>
The second option will use the default filesystem that should be set to HDFS anyway.
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