We are currently running SonarQube 5.2 and are performing a test upgrade to SonarQube 5.6, we have had this issue with Sonar 5.4 as well, but never upgraded in production.
When we use the same service account on the same server in the same root directory, the service is unable to start. It claims it is unable to get a node lock, always on the same file and directory, node 49, which is the last one of the nodes. The file and folder are successfully created.
The service account has full permissions on the D:\Sonar folder and all folders below.
I have tested and confirmed that the service does start up when i make it a local administrator, but this is not desired, so i am looking for the required permissions to start up the service. The service also starts if i configure it as local system, but we dont want this either.
What more permissions should i give to the SonarQube Service Account in order to start up ?
Any advise is welcome.
Nico
2016.06.10 14:42:32 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\Sonar\sonarqube-5.6\temp
2016.06.10 14:42:32 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_91\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=D:\Sonar\sonarqube-5.6\temp -javaagent:C:\Program Files\Java\jre1.8.0_91\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer D:\Sonar\sonarqube-5.6\temp\sq-process3739686975987017449properties
2016.06.10 14:42:34 INFO es[o.s.p.ProcessEntryPoint] Starting es
2016.06.10 14:42:34 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9006
2016.06.10 14:42:34 INFO es[o.elasticsearch.node] [sonar-1465562551839] version[1.7.5], pid[29336], build[00f95f4/2016-02-02T09:55:30Z]
2016.06.10 14:42:34 INFO es[o.elasticsearch.node] [sonar-1465562551839] initializing ...
2016.06.10 14:42:34 INFO es[o.e.plugins] [sonar-1465562551839] loaded [], sites []
2016.06.10 14:42:35 WARN es[o.s.p.ProcessEntryPoint] Fail to start es
org.elasticsearch.ElasticsearchIllegalStateException: Failed to obtain node lock, is the following location writable?: [D:\Sonar\sonarqube-5.6\data\es\sonarqube]
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:164) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.node.internal.InternalNode.<init>(InternalNode.java:165) ~[elasticsearch-1.7.5.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:45) [sonar-search-5.6.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:102) ~[sonar-process-5.6.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:81) [sonar-search-5.6.jar:na]
Caused by: java.io.IOException: failed to obtain lock on D:\Sonar\sonarqube-5.6\data\es\sonarqube\nodes\49
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:151) ~[elasticsearch-1.7.5.jar:na]
... 4 common frames omitted
Caused by: java.nio.file.AccessDeniedException: D:\Sonar\sonarqube-5.6\data\es\sonarqube\nodes\49
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsFileStore.create(Unknown Source) ~[na:1.8.0_91]
at sun.nio.fs.WindowsFileSystemProvider.getFileStore(Unknown Source) ~[na:1.8.0_91]
at java.nio.file.Files.getFileStore(Unknown Source) ~[na:1.8.0_91]
at org.elasticsearch.env.NodeEnvironment.getFileStore(NodeEnvironment.java:262) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.env.NodeEnvironment.access$000(NodeEnvironment.java:62) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.env.NodeEnvironment$NodePath.<init>(NodeEnvironment.java:75) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:140) ~[elasticsearch-1.7.5.jar:na]
... 4 common frames omitted
<-- Wrapper Stopped
In order to run with service account you need below permissions:
• Logon as a service via GPO
• Local Admin permission on server
Also make sure you have permissions for the service account on the Database in order to make it work properly.
Also posted on Site
Related
We have Created a High availability hadoop cluster with default file system as azure blob storage instead of hdfs by following the link https://hadoop.apache.org/docs/stable/hadoop-azure/index.html
Hivethrift service where started successfully but spark thift service where not started.
I can able to connect the spark-shell and connect with blob by referening the jar file hadoop-azure.jar but cannot start the thrift service.
Command used to start spark thrift server:
spark-submit --class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 --master yarn
Following are the error details.
17/04/26 10:19:32 INFO metastore: Connected to metastore.
Exception in thread "main" java.lang.IllegalArgumentException: Error while insta
ntiating 'org.apache.spark.sql.hive.HiveSessionState':
at org.apache.spark.sql.SparkSession$.org$apache$spark$sql$SparkSession$
$reflect(SparkSession.scala:981)
at org.apache.spark.sql.SparkSession.sessionState$lzycompute(SparkSessio
n.scala:110)
at org.apache.spark.sql.SparkSession.sessionState(SparkSession.scala:109
)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$getOrCreate$5.appl
y(SparkSession.scala:878)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$getOrCreate$5.appl
y(SparkSession.scala:878)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.sca
la:99)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.sca
la:99)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala
:230)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:99)
at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.sc
ala:878)
at org.apache.spark.sql.hive.thriftserver.SparkSQLEnv$.init(SparkSQLEnv.
scala:47)
at org.apache.spark.sql.hive.thriftserver.HiveThriftServer2$.main(HiveTh
riftServer2.scala:81)
at org.apache.spark.sql.hive.thriftserver.HiveThriftServer2.main(HiveThr
iftServer2.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSub
mit$$runMain(SparkSubmit.scala:738)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:18
7)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.spark.sql.SparkSession$.org$apache$spark$sql$SparkSession$
$reflect(SparkSession.scala:978)
... 22 more
Caused by: java.lang.IllegalArgumentException: Error while instantiating 'org.ap
ache.spark.sql.hive.HiveExternalCatalog':
at org.apache.spark.sql.internal.SharedState$.org$apache$spark$sql$inter
nal$SharedState$$reflect(SharedState.scala:169)
at org.apache.spark.sql.internal.SharedState.<init>(SharedState.scala:86
)
at org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkS
ession.scala:101)
at org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkS
ession.scala:101)
at scala.Option.getOrElse(Option.scala:121)
at org.apache.spark.sql.SparkSession.sharedState$lzycompute(SparkSession
.scala:101)
at org.apache.spark.sql.SparkSession.sharedState(SparkSession.scala:100)
at org.apache.spark.sql.internal.SessionState.<init>(SessionState.scala:
157)
at org.apache.spark.sql.hive.HiveSessionState.<init>(HiveSessionState.sc
ala:32)
... 27 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.spark.sql.internal.SharedState$.org$apache$spark$sql$inter
nal$SharedState$$reflect(SharedState.scala:166)
... 35 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(Is
olatedClientLoader.scala:264)
at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.s
cala:366)
at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.s
cala:270)
at org.apache.spark.sql.hive.HiveExternalCatalog.<init>(HiveExternalCata
log.scala:65)
... 40 more
Caused by: java.lang.RuntimeException: org.apache.hadoop.fs.azure.AzureException
: java.util.NoSuchElementException: An error occurred while enumerating the resu
lt, check the original exception for details.
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.jav
a:522)
at org.apache.spark.sql.hive.client.HiveClientImpl.<init>(HiveClientImpl
.scala:192)
... 48 more
Caused by: org.apache.hadoop.fs.azure.AzureException: java.util.NoSuchElementExc
eption: An error occurred while enumerating the result, check the original excep
tion for details.
at org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.retrieveMetadat
a(AzureNativeFileSystemStore.java:1930)
at org.apache.hadoop.fs.azure.NativeAzureFileSystem.getFileStatus(Native
AzureFileSystem.java:1592)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1424)
at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(Sess
ionState.java:596)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(Sess
ionState.java:554)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.jav
a:508)
... 49 more
Caused by: java.util.NoSuchElementException: An error occurred while enumerating
the result, check the original exception for details.
at com.microsoft.azure.storage.core.LazySegmentedIterator.hasNext(LazySe
gmentedIterator.java:113)
at org.apache.hadoop.fs.azure.StorageInterfaceImpl$WrappingIterator.hasN
ext(StorageInterfaceImpl.java:128)
at org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.retrieveMetadat
a(AzureNativeFileSystemStore.java:1909)
... 54 more
Caused by: com.microsoft.azure.storage.StorageException: The server encountered
an unknown failure: OK
at com.microsoft.azure.storage.StorageException.translateException(Stora
geException.java:178)
at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(Exe
cutionEngine.java:273)
at com.microsoft.azure.storage.core.LazySegmentedIterator.hasNext(LazySe
gmentedIterator.java:109)
... 56 more
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAware
ParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConf
iguration
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Sou
rce)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Sour
ce)
at com.microsoft.azure.storage.core.Utility.getSAXParser(Utility.java:54
6)
at com.microsoft.azure.storage.blob.BlobListHandler.getBlobList(BlobList
Handler.java:72)
at com.microsoft.azure.storage.blob.CloudBlobContainer$6.postProcessResp
onse(CloudBlobContainer.java:1253)
at com.microsoft.azure.storage.blob.CloudBlobContainer$6.postProcessResp
onse(CloudBlobContainer.java:1217)
at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(Exe
cutionEngine.java:148)
... 57 more
17/04/26 10:19:33 INFO SparkContext: Invoking stop() from shutdown hook
17/04/26 10:19:33 INFO SparkUI: Stopped Spark web UI at http://10.0.0.4:4040
17/04/26 10:19:33 INFO YarnClientSchedulerBackend: Interrupting monitor thread
17/04/26 10:19:33 INFO YarnClientSchedulerBackend: Shutting down all executors
17/04/26 10:19:33 INFO YarnSchedulerBackend$YarnDriverEndpoint: Asking each exec
utor to shut down
17/04/26 10:19:33 INFO SchedulerExtensionServices: Stopping SchedulerExtensionSe
rvices
(serviceOption=None,
services=List(),
started=false)
17/04/26 10:19:33 INFO YarnClientSchedulerBackend: Stopped
17/04/26 10:19:33 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEnd
point stopped!
17/04/26 10:19:33 INFO MemoryStore: MemoryStore cleared
17/04/26 10:19:33 INFO BlockManager: BlockManager stopped
17/04/26 10:19:33 INFO BlockManagerMaster: BlockManagerMaster stopped
17/04/26 10:19:33 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint:
OutputCommitCoordinator stopped!
17/04/26 10:19:33 INFO SparkContext: Successfully stopped SparkContext
17/04/26 10:19:33 INFO ShutdownHookManager: Shutdown hook called
17/04/26 10:19:33 INFO ShutdownHookManager: Deleting directory C:\Users\labuser\
AppData\Local\Temp\2\spark-11c406ec-2c53-4042-b336-9d1164c3c6f9
17/04/26 10:19:33 INFO MetricsSystemImpl: Stopping azure-file-system metrics sys
tem...
17/04/26 10:19:33 INFO MetricsSystemImpl: azure-file-system metrics system stopp
ed.
17/04/26 10:19:33 INFO MetricsSystemImpl: azure-file-system metrics system shutd
own complete.
Please help me to resolve this issue. any help would be greatly appreciated.
Last week SonarQube loaded in, worked nice and dandy. Now it throws this warning in sonar.log:
2017.03.16 11:58:47 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.03.16 11:58:47 INFO es[o.elasticsearch.node] [sonar-1489661925446] initialized
2017.03.16 11:58:47 INFO es[o.elasticsearch.node] [sonar-1489661925446] starting ...
Did not start of course. What could have changed while I was away?
Edit:
I did not provide the logs after trying to stop Sonar
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2017.03.16 16:54:43 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /proj/tn/tools/sonar/temp
2017.03.16 16:54:43 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/proj/tn/tools/sonar/temp -javaagent:/afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /proj/tn/tools/sonar/temp/sq-process8365491608077217541properties
2017.03.16 16:54:43 INFO es[o.s.p.ProcessEntryPoint] Starting es
2017.03.16 16:54:43 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9001
2017.03.16 16:54:43 INFO es[o.elasticsearch.node] [sonar-1489679683034] version[1.7.5], pid[438787], build[00f95f4/2016-02-02T09:55:30Z]
2017.03.16 16:54:43 INFO es[o.elasticsearch.node] [sonar-1489679683034] initializing ...
2017.03.16 16:54:43 INFO es[o.e.plugins] [sonar-1489679683034] loaded [], sites []
2017.03.16 16:54:43 INFO es[o.elasticsearch.env] [sonar-1489679683034] using [1] data paths, mounts [[/proj/tn (seroisproj02002.mo.sw.ericsson.se:/uproj020036/tn)]], net usable_space [330.8gb], net total_space [4.4tb], types [nfs]
2017.03.16 16:54:44 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] initialized
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] starting ...
2017.03.16 16:54:45 WARN es[o.s.p.ProcessEntryPoint] Fail to start es
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.5.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.6.2.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:102) ~[sonar-process-5.6.2.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:81) [sonar-search-5.6.2.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.5.jar:na]
... 8 common frames omitted
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_102]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_102]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_102]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_102]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_102]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.5.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.5.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] stopping ...
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] stopped
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] closing ...
2017.03.16 16:54:45 INFO es[o.elasticsearch.node] [sonar-1489679683034] closed
Server OS: Linux
Problem solved, bit ashamed, but as the log said the port 9001 was used by someone else on the server (probably my own previous process) so elasticsearch could not bind.
Simply changed it to 9002.
Iam trying run StartSonar.bat from command line in order to start sonar serve but its giving me below exception. It seems to related to memory issue or Java version issue but iam unable to find the root cause. Appreciate any help on this.
Sonarqube version is - 5.4
sonar-scanner version - 2.6.1
log file below.
--> 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.
2017.01.12 18:30:42 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\502698332\Downloads\Code Review\sonarqube-5.4\sonarqube-5.4\temp
2017.01.12 18:30:42 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Program Files\Java\jre1.8.0_112\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Users\502698332\Downloads\Code Review\sonarqube-5.4\sonarqube-5.4\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\502698~1\AppData\Local\Temp\sq-process506451527421407979properties
2017.01.12 18:30:43 INFO es[o.s.p.ProcessEntryPoint] Starting search
2017.01.12 18:30:43 INFO es[o.s.s.SearchSettings] Elasticsearch listening on 127.0.0.1:9001
2017.01.12 18:30:43 INFO es[o.elasticsearch.node] [sonar-1484226042365] version[1.7.2], pid[12896], build[e43676b/2015-09-14T09:49:53Z]
2017.01.12 18:30:43 INFO es[o.elasticsearch.node] [sonar-1484226042365] initializing ...
2017.01.12 18:30:43 INFO es[o.e.plugins] [sonar-1484226042365] loaded [], sites []
2017.01.12 18:30:43 INFO es[o.elasticsearch.env] [sonar-1484226042365] using [1] data paths, mounts [[Windows7 (C:)]], net usable_space [379.4gb], net total_space [465.7gb], types [NTFS]
2017.01.12 18:30:44 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] initialized
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] starting ...
2017.01.12 18:30:44 WARN es[o.s.p.ProcessEntryPoint] Fail to start search
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.2.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:45) [sonar-search-5.4.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81) ~[sonar-process-5.4.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:79) [sonar-search-5.4.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.2.jar:na]
... 8 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_112]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_112]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_112]
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.8.0_112]
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.8.0_112]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.2.jar:na]
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_112]
at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_112]
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] stopping ...
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] stopped
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] closing ...
2017.01.12 18:30:44 INFO es[o.elasticsearch.node] [sonar-1484226042365] closed
<-- Wrapper Stopped
Error is pretty explicit:
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
...
Caused by: java.net.BindException: Address already in use: bind
Port 9001 is not free for SonarQube to use. Maybe another SonarQube instance already using it, maybe some other/zombie process. See this StackOverflow question for guidance on how to identify the process using a specific port on Windows.
Solution from their on:
deal with the process already listening on port 9001
tell your SonarQube server to listen on different ports: sonar.web.port and sonar.search.port in sonar.properties
Sometimes, unable to stop currently running application with port (9001). That might be running any system related operations.
Instead of disabling existing app, need to change port of SonarQube from 9001 to other.
For example,
In sonar.properties
Change this line "#sonar.search.port=9001" to "sonar.search.port=9002"
(Which works for me)
while running the StartSonar.bat from command line I am getting the following error contineously.sonarqube log file is showing the below messages.
Any help is always appreciated!
--> 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.
2015.06.13 15:04:41 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: C:\Program Files\Java\jdk1.8.0_45\jre\bin\java - Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=D:\sonarqube-5.1\sonarqube-5.1\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Users\rkutchar\AppData\Local\Temp\sq-process3411693551115002418properties
2015.06.13 15:04:42 INFO es[o.s.p.ProcessEntryPoint] Starting search
2015.06.13 15:04:42 INFO es[o.s.s.SearchServer] Starting Elasticsearch[sonarqube] on port 9001
2015.06.13 15:04:42 INFO es[o.elasticsearch.node] [sonar-1434188081817] version[1.4.4], pid[7068], build[c88f77f/2015-02-19T13:05:36Z]
2015.06.13 15:04:42 INFO es[o.elasticsearch.node] [sonar-1434188081817] initializing ...
2015.06.13 15:04:42 INFO es[o.e.plugins] [sonar-1434188081817] loaded [], sites []
2015.06.13 15:04:43 INFO es[o.elasticsearch.node] [sonar-1434188081817] initialized
2015.06.13 15:04:43 INFO es[o.elasticsearch.node] [sonar-1434188081817] starting ...
2015.06.13 15:04:44 INFO es[o.e.transport] [sonar-1434188081817] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/10.76.17.174:9001]}
2015.06.13 15:04:44 INFO es[o.e.discovery] [sonar-1434188081817] sonarqube/Y7PopLbZQ8Gqvlg6o70C3g
2015.06.13 15:04:47 INFO es[o.e.cluster.service] [sonar-1434188081817] new_master [sonar-1434188081817][Y7PopLbZQ8Gqvlg6o70C3g][DIN35003079][inet[/10.76.17.174:9001]]{rack_id=sonar-1434188081817}, reason: zen-disco-join (elected_as_master)
2015.06.13 15:04:47 INFO es[o.elasticsearch.node] [sonar-1434188081817] started
2015.06.13 15:04:47 INFO es[o.e.gateway] [sonar-1434188081817] recovered [6] indices into cluster_state
2015.06.13 15:04:48 INFO app[o.s.p.m.Monitor] Process[search] is up
2015.06.13 15:04:48 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jdk1.8.0_45\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=D:\sonarqube-5.1\sonarqube-5.1\temp -cp ./lib/common/*;./lib/server/*;D:\sonarqube-5.1\sonarqube-5.1\lib\jdbc\mysql\mysql-connector-java-5.1.34.jar org.sonar.server.app.WebServer C:\Users\rkutchar\AppData\Local\Temp\sq-process4890757865030388998properties
2015.06.13 15:04:49 INFO web[o.s.p.ProcessEntryPoint] Starting web
2015.06.13 15:04:49 INFO web[o.s.s.app.Webapp] Webapp directory: D:\sonarqube-5.1\sonarqube-5.1\web
2015.06.13 15:04:49 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.06.13 15:04:49 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2015.06.13 15:04:50 INFO web[o.e.plugins] [sonar-1434188081817] loaded [], sites []
2015.06.13 15:04:50 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.1 / 4aa9af3a6a4362b61db365fba32eb0a55d411e7a
2015.06.13 15:04:50 INFO web[o.s.c.p.Database] Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2015.06.13 15:04:50 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:117) ~[sonar-core-5.1.jar:na]
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:73) ~[sonar-core-5.1.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) ~[picocontainer-2.14.3.jar:na]
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91) ~[sonar-plugin-api-5.1.jar:na]
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:96) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.Platform.init(Platform.java:72) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-5.1.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [tomcat-embed-core-8.0.18.jar:8.0.18]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'sonar'#'localhost' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:115) ~[sonar-core-5.1.jar:na]
... 27 common frames omitted
Caused by: java.sql.SQLException: Access denied for user 'sonar'#'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2234) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:790) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[mysql-connector-java-5.1.34.jar:5.1.34]
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]
... 30 common frames omitted
2015.06.13 15:04:51 INFO web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b15 [Windows 7-amd64]
2015.06.13 15:04:51 INFO web[jruby.rack] using a shared (threadsafe!) runtime
EDIT:
apply plugin: "sonar-runner"
sonarRunner {
sonarProperties {
// can be also set on command line like - Dsonar.analysis.mode=incremental
property "sonar.host.url","http://localhost:9000"
property "sonar.jdbc.url","jdbc:mysql://sonar.someserver.int:3306/sonar"
property "sonar.jdbc.driverClassName","com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "****"
property "sonar.jdbc.password", "****"
//I added these properties to my gradle.build
property "sonar.projectKey","com.example.rkutchar.myapplication"
property "sonar.projectName","MyApplication"
property "sonar.projectVersion","V1.0"
property "sonar.language","java"
property "sonar.sources","src/main/java"
property "sonar.binaries","build"
}
}
subprojects {
sonarRunner {
sonarProperties {
properties["sonar.sources"] += "src/main/java"
}
}
}
sonarRunner {
toolVersion = '2.4'
}
PROJECT.PROPERTIES FILE
# Required metadata
sonar.projectKey=MyApplication
sonar.projectName=My Application
sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required)
sonar.sources=src/main/java
# Language
sonar.language=java
# Encoding of the source files
sonar.sourceEncoding=UTF-8
conf/sonar-properties
#Configure here general information about the environment, such as SonarQube DB details for example
#No information about specific project should appear here
#----- Default SonarQube server
#sonar.host.url=http://localhost:9000
#----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#----- MySQl
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?
useUnicode=true&characterEncoding=utf8
#----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:#localhost/XE
#----- Microsoft SQLServer
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor
#----- Global database settings
#sonar.jdbc.username=sonar
#sonar.jdbc.password=sonar
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
#----- Security (when 'sonar.forceAuthentication' is set to 'true')
#sonar.login=admin
#sonar.password=admin
It seems that the permissions are not correct on your database. You have to execute the following statement on your MySQL database:
GRANT ALL PRIVILEGES ON `sonar`.* TO 'sonar'#'localhost';
As I explained, you should do step by step. First start server then analyze your android project. No need to spend your time on analyzer as long as server is not correctly started.
Mostly you placed the jdbc driver in the right folder. So it cant be realted to JDBC driver absence. Double check this.
I think you might have gotton the sonar.JDBC url property wrong. What DB is it?
Regards,
Karthik Prabhu
I'm using a relatively clean installation of CentOS 6.3 minimal with the Bigtop 0.5.0 repo and Sun Java 1.6. I add the Bigtop repo as per the instructions here.
I have installed Hadoop common and Oozie using yum. I configured oozie by running sudo service oozie init, then set up the HDFS paths using the commands in the init-hdfs.sh file in Bigtop 0.6.0.
I can run Java and streaming map reduce jobs without any problems. I can also run the Oozie streaming example that comes bundled with Bigtop. Unfortunately, when I try to run the map-reduce example, I get a java.lang.ClassNotFoundException
I can see from the HDFS audit logs that the oozie-examples-3.3.0.jar file gets inspected, but never opened. These are the only four entries for the jar file in the audit log for the time the workflow is running:
2013-03-12 14:42:07,394 INFO FSNamesystem.audit: allowed=true ugi=user (auth:SIMPLE) via oozie (auth:SIMPLE) ip=/192.168.56.12 cmd=getfileinfo src=/user/user/examples/apps/map-reduce/lib/oozie-examples-3.3.0.jar dst=null perm=null
2013-03-12 14:42:07,399 INFO FSNamesystem.audit: allowed=true ugi=user (auth:SIMPLE) via oozie (auth:SIMPLE) ip=/192.168.56.12 cmd=getfileinfo src=/user/user/examples/apps/map-reduce/lib/oozie-examples-3.3.0.jar dst=null perm=null
<snip>
2013-03-12 14:42:07,547 INFO FSNamesystem.audit: allowed=true ugi=user (auth:SIMPLE) via oozie (auth:SIMPLE) ip=/192.168.56.12 cmd=getfileinfo src=/user/user/examples/apps/map-reduce/lib/oozie-examples-3.3.0.jar dst=null perm=null
2013-03-12 14:42:07,550 INFO FSNamesystem.audit: allowed=true ugi=user (auth:SIMPLE) via oozie (auth:SIMPLE) ip=/192.168.56.12 cmd=getfileinfo src=/user/user/examples/apps/map-reduce/lib/oozie-examples-3.3.0.jar dst=null perm=null
The container logs I get from the webconsole on port 8088 show the following exception, but offer no further clues:
2013-03-12 15:10:18,681 FATAL [IPC Server handler 2 on 57310] org.apache.hadoop.mapred.TaskAttemptListenerImpl: Task: attempt_1363061307536_0002_m_000000_0 - exited : java.lang.RuntimeException: Error in configuring object
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:72)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:396)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:335)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1367)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:152)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:103)
... 9 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.oozie.example.SampleMapper not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1611)
at org.apache.hadoop.mapred.JobConf.getMapperClass(JobConf.java:979)
at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38)
... 14 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.oozie.example.SampleMapper not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1579)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1603)
... 16 more
Caused by: java.lang.ClassNotFoundException: Class org.apache.oozie.example.SampleMapper not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1485)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1577)
... 17 more
I managed to grab the job.xml file out of the temp directory while the failing stage of the workflow was running, and I can see that the jar file gets added to the classpath property:
<property><name>mapreduce.job.classpath.files</name><value>/user/user/user-oozi/0000001-130312141058075-oozie-oozi-W/mr-node--map-reduce/map-reduce-launcher.jar,/user/user/examples/apps/map-reduce/lib/oozie-examples-3.3.0.jar</value><source>programatically</source></property>
... but the class is still apparently not found. I've set all debugging up to DEBUG for all components and can find no more clues.
Have I simply misconfigured something, or is this actually a bug? I don't really know what to do next.