Adding cluster: “Error creating cluster: Call to /cluster-configs timed out.” - opscenter

(Continuing the discussion with the same title on the datastax forum). I was able to reproduce the issue where opscenter is unable to connect to a 2.0.1 cluster, using "Use existing cluster", failing with the message "Error creating cluster: Call to /cluster-configs timed out.". It is related to having "rpc_server_type: hsha" in cassandra.yaml.
I reproduced it as follows:
(1) Installed ubuntu 12.04 (x86-64 architecture) in qemu. Updated it to the latest version of all packages. Configured it with a static ip address (192.168.77.3). Qemu networking was set up so that the host machine and the qemu virtual machine can communicate.
(2) Downloaded Sun jre-7u45-linux-x64.tar.gz and installed it. Installed libjna-java. This all done as per the datastax installing on Debian/ubuntu docs.
(3) Installed datastax cassandra 2.0.1 using the Debian package, as described in the datastax docs.
(4) Made the following changes to cassandra.yaml:
seeds: "192.168.77.3"
listen_address: 192.168.77.3
rpc_address: 192.168.77.3
rpc_server_type: hsha
NB: To see the failure, it is essential to use hsha.
(5) Stopped the cassandra instance (Debian automatically starts it when installed). Note that the init script doesn't work for stopping cassandra (this is a new problem with cassandra 2.0), so I had to kill the process by hand. This is a trap: you may think you restarted cassandra and that it has taken your configuration changes into account, only it hasn't because you are still running the old instance.
(6) Cleared out instance data: sudo rm -fr /var/lib/cassandra/*
(7) Started a new cassandra instance. Checked that nodetool could connect to it from both the virtual machine (i.e. running locally) and from the host machine.
(8) Tried to add the cluster from opscenter-free running on the host (i.e. not running on the virtual machine). opscenter version 3.2.2, ubuntu 13.10. As no cluster had been added yet, I got the "Welcome to Datastax opscenter" dialog, with "Create New Cluster" or "Use Existing cluster". Chose "Use Existing Cluster". Added the ip address (192.168.77.3) of the qemu virtual machine instance. Clicked "Save cluster". This failed with "Error creating cluster: Call to /cluster-configs timed out".
The opscenter log:
2013-10-28 11:59:04+0100 [] INFO: Log opened.
2013-10-28 11:59:04+0100 [] INFO: twistd 10.2.0 (/usr/bin/python2.7 2.7.5) starting up.
2013-10-28 11:59:04+0100 [] INFO: reactor class: twisted.internet.selectreactor.SelectReactor.
2013-10-28 11:59:04+0100 [] INFO: set uid/gid 0/0
2013-10-28 11:59:04+0100 [] INFO: Logging level set to 'info'
2013-10-28 11:59:04+0100 [] INFO: OpsCenter version: 3.2.2
2013-10-28 11:59:04+0100 [] INFO: Compatible agent version: 3.2.2
2013-10-28 11:59:04+0100 [] INFO: No clusters are configured yet, checking to see if a config migration is needed
2013-10-28 11:59:04+0100 [] INFO: Main config does not appear to include a cluster configuration, skipping migration
2013-10-28 11:59:04+0100 [] INFO: No clusters are configured
2013-10-28 11:59:04+0100 [] INFO: HTTP BASIC authentication disabled
2013-10-28 11:59:04+0100 [] INFO: Starting webserver with ssl disabled.
2013-10-28 11:59:04+0100 [] INFO: SSL agent communication enabled
2013-10-28 11:59:04+0100 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 8888
2013-10-28 11:59:04+0100 [] INFO: Starting factory <opscenterd.WebServer.OpsCenterdWebServer instance at 0x2f2a6c8>
2013-10-28 11:59:04+0100 [] INFO: morbid.morbid.StompFactory starting on 61619
2013-10-28 11:59:04+0100 [] INFO: Starting factory <morbid.morbid.StompFactory instance at 0x3062320>
2013-10-28 11:59:04+0100 [] INFO: Configuring agent communication with ssl support enabled.
2013-10-28 11:59:04+0100 [] INFO: morbid.morbid.StompFactory starting on 61620
2013-10-28 11:59:04+0100 [] INFO: OS Version: Linux version 3.11.0-12-generic (buildd#allspice) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013
2013-10-28 11:59:04+0100 [] INFO: CPU Info: ['2401.000', '1200.000', '1200.000', '2401.000', '1200.000', '1200.000', '1200.000', '2401.000']
2013-10-28 11:59:04+0100 [] INFO: Mem Info: 15979MB
2013-10-28 11:59:04+0100 [] INFO: Package Manager: Unknown
2013-10-28 12:03:02+0100 [] INFO: Starting factory <opscenterd.ThriftService.NoReconnectCassandraClientFactory instance at 0x31cd7e8>
2013-10-28 12:03:02+0100 [] INFO: Adding new cluster 'Test_Cluster': {u'jmx': {u'username': u'', u'password': u'', u'port': u'7199'}, 'kerberos_client_principals': {}, 'kerberos': {}, u'agents': {}, 'kerberos_hostnames': {}, 'kerberos_services': {}, u'cassandra': {u'username': u'', u'seed_hosts': u'192.168.77.3', u'api_port': u'9160', u'password': u''}}
2013-10-28 12:03:02+0100 [] INFO: Starting new cluster services for Test_Cluster
2013-10-28 12:03:02+0100 [Test_Cluster] INFO: Starting services for cluster Test_Cluster
2013-10-28 12:03:02+0100 [] INFO: Metric caching enabled with 50 points and 1000 metrics cached
2013-10-28 12:03:02+0100 [] INFO: Starting PushService
2013-10-28 12:03:02+0100 [Test_Cluster] INFO: Starting CassandraCluster service
2013-10-28 12:03:02+0100 [Test_Cluster] INFO: agent_config items: {'cassandra_log_location': '/var/log/cassandra/system.log', 'thrift_port': 9160, 'thrift_ssl_truststore': None, 'rollups300_ttl': 2419200, 'rollups86400_ttl': -1, 'jmx_port': 7199, 'metrics_ignored_solr_cores': '', 'api_port': '61621', 'metrics_enabled': 1, 'thrift_ssl_truststore_type': 'JKS', 'kerberos_use_ticket_cache': True, 'kerberos_renew_tgt': True, 'rollups60_ttl': 604800, 'cassandra_install_location': '', 'rollups7200_ttl': 31536000, 'kerberos_debug': False, 'storage_keyspace': 'OpsCenter', 'ec2_metadata_api_host': '169.254.169.254', 'provisioning': 0, 'kerberos_use_keytab': True, 'metrics_ignored_column_families': '', 'thrift_ssl_truststore_password': None, 'metrics_ignored_keyspaces': 'system, system_traces, system_auth, dse_auth, OpsCenter'}
2013-10-28 12:03:02+0100 [] INFO: Stopping factory <opscenterd.ThriftService.NoReconnectCassandraClientFactory instance at 0x31cd7e8>

This is due to a bug in Cassandra unfortunately:
https://issues.apache.org/jira/browse/CASSANDRA-6373
The workaround at the moment is to use the sync thrift server. If a workaround is implemented in OpsCenter, I will update my response.

Related

How to fix this Selenium Error: bind() failed: Cannot assign requested address (99)

I've installed the latest version of selenium via Docker:
docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:latest
and then ran this in my python console:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote("http://127.0.0.1:4444/wd/hub", DesiredCapabilities.CHROME)
and finally checked the docker logs:
2019-04-24 19:09:26,880 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2019-04-24 19:09:26,881 INFO supervisord started with pid 8
2019-04-24 19:09:27,865 INFO spawned: 'xvfb' with pid 11
2019-04-24 19:09:27,867 INFO spawned: 'selenium-standalone' with pid 12
19:09:28.038 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
2019-04-24 19:09:28,039 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-04-24 19:09:28,039 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
19:09:28.093 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2019-04-24 19:09:28.126:INFO::main: Logging initialized #247ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:09:28.289 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
19:09:28.349 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
19:09:43.631 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "chrome",
"version": ""
}
19:09:43.633 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729#{#29}) on port 22103
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1556132983.659][SEVERE]: bind() failed: Cannot assign requested address (99)
19:09:44.266 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS
19:09:44.490 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session cedc7067c0133f6492ff65dda5c7dd88 (org.openqa.selenium.chrome.ChromeDriverService)
In particular, I'm unsure of how to fix this error:
[1556132983.659][SEVERE]: bind() failed: Cannot assign requested address (99)
I'm running this on my macbook pro using Mojave with the latest version of docker, python, and selenium. I also tried using other ports aside from 4444, same result. Thanks!
We have seen that entry in the logs for a long time, however, there is no evidence it affects your tests. The message comes directly from ChromeDriver/Chrome. It is safe to ignore it.

'Unable to create new session.' error using selenium-server-standalone-3.9.1.jar with ChromeDriver and Chrome

For the past few days, I was running tests using Selenium WebDriver with no issues. However, even though I didn't change anything in the code or my system, the last few times I tried to create a new browser session, I always get the following error:
Link
This happens regardless of whether I try to create a session through code, or manually through the browser.
This is the result of running the Selenium server and three tests:
$ java -jar selenium-server-standalone-3.9.1.jar
05:54:58.659 INFO - Selenium build info: version: '3.9.1', revision: '63f7b50'
05:54:58.660 INFO - Launching a standalone Selenium Server on port 4444
2019-04-18 05:54:58.754:INFO::main: Logging initialized #269ms to org.seleniumhq.jetty9.util.log.StdErrLog
2019-04-18 05:54:58.821:INFO:osjs.Server:main: jetty-9.4.7.v20170914, build timestamp: 2017-11-21T22:27:37+01:00, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
2019-04-18 05:54:58.840:WARN:osjs.SecurityHandler:main: ServletContext#o.s.j.s.ServletContextHandler#65d6b83b{/,null,STARTING} has uncovered http methods for path: /
2019-04-18 05:54:58.843:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#65d6b83b{/,null,AVAILABLE}
2019-04-18 05:54:58.859:INFO:osjs.AbstractConnector:main: Started ServerConnector#1de74ecb{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2019-04-18 05:54:58.859:INFO:osjs.Server:main: Started #374ms
05:54:58.859 INFO - Selenium Server is up and running on port 4444
2019-04-18 05:55:04.002:INFO:osjshC.ROOT:qtp527446182-17: org.openqa.selenium.remote.server.WebDriverServlet-57175e74: Initialising WebDriverServlet
05:55:04.110 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status#4d5a702a
05:55:04.114 INFO - /status: Executing GET on /status (handler: Status)
05:55:04.178 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.GetAllSessions#3026be33
05:55:04.178 INFO - /sessions: Executing GET on /sessions (handler: GetAllSessions)
05:55:09.248 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#48e79260
05:55:09.249 INFO - /session: Executing POST on /session (handler: BeginSession)
05:55:09.333 INFO - Capabilities are: Capabilities {browserName: chrome}
05:55:09.334 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 27011
Only local connections are allowed.
05:55:09.788 INFO - Detected dialect: OSS
06:01:50.907 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#79d0ad1d
06:01:50.907 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#1ff85274
06:01:50.907 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#2d87d7a2
06:01:50.908 INFO - /session: Executing POST on /session (handler: BeginSession)
06:01:50.908 INFO - /session: Executing POST on /session (handler: BeginSession)
06:01:50.908 INFO - /session: Executing POST on /session (handler: BeginSession)
06:01:50.912 INFO - Capabilities are: Capabilities {browserName: chrome}
06:01:50.912 INFO - Capabilities are: Capabilities {browserName: chrome}
06:01:50.912 INFO - Capabilities are: Capabilities {browserName: chrome}
06:01:50.912 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
06:01:50.912 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
06:01:50.912 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 29789
Only local connections are allowed.
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 32366
Only local connections are allowed.
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 15121
Only local connections are allowed.
06:01:51.271 INFO - Detected dialect: OSS
06:01:51.335 INFO - Detected dialect: OSS
06:01:51.449 INFO - Detected dialect: OSS
I've tried downgrading, reinstalling everything, but nothing seems to work.
What I'm using:
Ubuntu 18.04
Selenium Java Server 3.9.1
Chrome 73
Chrome Driver 74
Also, oddly enough, my colleague who similarly is working on Selenium with me, is now running into the exact same issue on their own system.
This error message...
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 15121
Only local connections are allowed.
06:01:51.271 INFO - Detected dialect: OSS
...implies that your ChromeDriver version is chromedriver=2.41
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.41
Release Notes of chromedriver=2.41 clearly mentions the following :
Supports Chrome v67-69
Presumably you are using the latest GAed chrome=73.0
Release Notes of ChromeDriver v2.46 clearly mentions the following :
Supports Chrome v71-73
So there is a clear mismatch between ChromeDriver v2.41 and the Chrome Browser v73.0
Solution
Upgrade ChromeDriver to current ChromeDriver v2.46 level.
Keep Chrome version between Chrome v71-73 levels. (as per ChromeDriver v2.46 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Execute your #Test.

After sonarqube upgrade 5.2 -> 5.6, WebServer is not operational any more

I'm using WindowsServer2008 and MySql 5.6.31. I wanted to upgrade
SonarQube from version 5.2 to 5.6. After starting SonarQube the
log-file shows the below lines. Everything should be finde, except the WebServer doesn't become operational:
INFO ce[o.s.c.a.WebServerWatcherImpl] Waiting for Web Server to be operational...
INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
When I try to reach the WebServer in the browser, I get the message from ApacheTomcat:
HTTP Status 404 - /sessions/new
type Status report
message /sessions/new
description The requested resource is not available.
Apache Tomcat/8.0.30
Does anyone know why the WebServer doesn't become operational?
Wrapper Manager: JVM #1 Running a 64-bit JVM. Wrapper Manager:
Registering shutdown hook Wrapper Manager: Using wrapper Load native
library. One or more attempts may fail if platform specific libraries
do not exist. Loading native library failed:
wrapper-windows-x86-64.dll Cause: java.lang.UnsatisfiedLinkError: no
wrapper-windows-x86-64 in java.library.path Loaded native library:
wrapper.dll Calling native initialization method. Initializing
WrapperManager native library. Java Executable:
C:\ProgramData\Oracle\Java\javapath\java.exe Windows version: 6.1.7601
Java Version : 1.8.0_91-b15 Java HotSpot(TM) 64-Bit Server VM Java
VM Vendor : Oracle Corporation
Control event monitor thread started. Startup runner thread started.
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp#38af3868,
args[]) called by thread: main Communications runner thread started.
Open socket to wrapper...Wrapper-Connection Opened Socket from 31000
to 32000 Send a packet KEY : fnnZL60VqJstVqYQ
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31000])
Received a packet LOW_LOG_LEVEL : 1 Wrapper Manager: LowLogLevel from
Wrapper is 1 Received a packet PING_TIMEOUT : 200 PingTimeout from
Wrapper is 200000 Received a packet PROPERTIES : (Property Values)
Received a packet START : start calling WrapperListener.start()
Waiting for WrapperListener.start runner thread to complete.
WrapperListener.start runner thread started. WrapperSimpleApp:
start(args) Will wait up to 2 seconds for the main method to complete.
WrapperSimpleApp: invoking main method
2016.07.28 13:48:38 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\SonarQube\sonarqube-5.6\temp
2016.07.28 13:48:38 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:\SonarQube\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:\SonarQube\sonarqube-5.6\temp\sq-process6103713257744114100properties
Send a packet START_PENDING : 5000 Send a packet START_PENDING : 5000
WrapperSimpleApp: start(args) end. Main Completed=false,
exitCode=null WrapperListener.start runner thread stopped. returned
from WrapperListener.start() Send a packet STARTED : Startup runner
thread stopped. Received a packet PING : ping Send a packet PING : ok
2016.07.28 13:48:41 INFO es[o.s.p.ProcessEntryPoint] Starting es
2016.07.28 13:48:41 INFO es[o.s.s.EsSettings] Elasticsearch listening on 127.0.0.1:9001
2016.07.28 13:48:42 INFO es[o.elasticsearch.node] [sonar-1469706518062] version[1.7.5], pid[3788],
build[00f95f4/2016-02-02T09:55:30Z]
2016.07.28 13:48:42 INFO es[o.elasticsearch.node] [sonar-1469706518062] initializing ...
2016.07.28 13:48:42 INFO es[o.e.plugins] [sonar-1469706518062] loaded [], sites []
2016.07.28 13:48:43 INFO es[o.elasticsearch.env] [sonar-1469706518062] using [1] data paths, mounts [[Data (D:)]], net
usable_space [29.5gb], net total_space [249.9gb], types [NTFS]
Received a packet PING : ping Send a packet PING : ok
2016.07.28 13:48:46 WARN es[o.e.bootstrap] JNA not found. native methods will be disabled.
2016.07.28 13:48:47 INFO es[o.elasticsearch.node] [sonar-1469706518062] initialized
2016.07.28 13:48:47 INFO es[o.elasticsearch.node] [sonar-1469706518062] starting ...
2016.07.28 13:48:47 INFO es[o.e.transport] [sonar-1469706518062] bound_address {inet[/127.0.0.1:9001]}, publish_address
{inet[/127.0.0.1:9001]}
2016.07.28 13:48:47 INFO es[o.e.discovery] [sonar-1469706518062] sonarqube/NDLYofdsQU6dCANZLN0p9w Received a packet PING : ping Send a
packet PING : ok
2016.07.28 13:48:50 INFO es[o.e.cluster.service] [sonar-1469706518062] new_master
[sonar-1469706518062][NDLYofdsQU6dCANZLN0p9w][DEERLA7LRUD10A][inet[/127.0.0.1:9001]]{rack_id=sonar-1469706518062},
reason: zen-disco-join (elected_as_master)
2016.07.28 13:48:50 INFO es[o.elasticsearch.node] [sonar-1469706518062] started
2016.07.28 13:48:50 INFO es[o.e.gateway] [sonar-1469706518062] recovered [0] indices into cluster_state
2016.07.28 13:48:51 INFO app[o.s.p.m.Monitor] Process[es] is up
2016.07.28 13:48:51 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_91\bin\java
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=D:\SonarQube\sonarqube-5.6\temp -javaagent:C:\Program Files\Java\jre1.8.0_91\lib\management-agent.jar -cp
./lib/common/;./lib/server/;D:\SonarQube\sonarqube-5.6\lib\jdbc\mysql\mysql-connector-java-5.1.35.jar
org.sonar.server.app.WebServer
D:\SonarQube\sonarqube-5.6\temp\sq-process200048299209178132properties
Received a packet PING : ping Send a packet PING : ok
2016.07.28 13:48:55 TRACE web[o.s.p.Lifecycle] tryToMoveTo from INIT to STARTING => true
2016.07.28 13:48:55 INFO web[o.s.p.ProcessEntryPoint] Starting web
2016.07.28 13:48:56 INFO web[o.s.s.a.TomcatContexts] Webapp directory: D:\SonarQube\sonarqube-5.6\web
2016.07.28 13:48:56 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-xxx.xxx.x.xxx-xxxx"]
2016.07.28 13:48:56 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read Received a packet PING : ping
Send a packet PING : ok
2016.07.28 13:48:57 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-xxx.xxx.x.xxx-xxxx"]
2016.07.28 13:48:57 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
2016.07.28 13:48:57 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2016.07.28 13:48:57 TRACE web[o.s.p.Lifecycle] tryToMoveTo from STARTING to STARTED => true
2016.07.28 13:48:58 INFO app[o.s.p.m.Monitor] Process[web] is up
2016.07.28 13:48:58 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[ce]: C:\Program Files\Java\jre1.8.0_91\bin\java
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=D:\SonarQube\sonarqube-5.6\temp -javaagent:C:\Program Files\Java\jre1.8.0_91\lib\management-agent.jar -cp
./lib/common/;./lib/server/;./lib/ce/*;D:\SonarQube\sonarqube-5.6\lib\jdbc\mysql\mysql-connector-java-5.1.35.jar
org.sonar.ce.app.CeServer
D:\SonarQube\sonarqube-5.6\temp\sq-process346661778793077863properties
2016.07.28 13:48:59 TRACE ce[o.s.p.Lifecycle] tryToMoveTo from INIT to STARTING => true
2016.07.28 13:48:59 INFO ce[o.s.p.ProcessEntryPoint] Starting ce
2016.07.28 13:48:59 INFO ce[o.s.c.a.WebServerWatcherImpl] Waiting for Web Server to be operational...
2016.07.28 13:49:00 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer... Received a packet PING : ping Send a packet
PING : ok
2016.07.28 13:49:02 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer... Received a packet PING : ping Send a packet
PING : ok
There should be a line on the log like this
2017.01.08 23:12:11 WARN web[o.s.s.p.DatabaseServerCompatibility] Database must be upgraded. Please backup database and browse /setup
The server is waiting the user to go to the /setup page to upgrade the DB before continue.
As per below log line
WARN web[o.s.s.p.DatabaseServerCompatibility] Database must be upgraded. Please backup database and browse /setup
Go to http://<sonar-host>:9000/<context path>/setup
and click on Migrate button.
After successful migration, your server will ready to use.

Sonarqube not Importing issues reported by OCLint

I am doing Objective-C code analysis by using sonarqube. The configuration is as below:
SonarQube 5.4
Objective-C (Community) 5.0.0
xcode 6
xctool
OCLint 0.10.2
The OCLint doing the analysis and puting it in to the sonar-reports/oclint.xml. But nothing is coming-up on sonar dashboard.
Following is the log:
Running run-sonar.sh...
Xcode workspace file is:
Xcode project file is: demo.xcodeproj
Xcode application scheme is: demo
Xcode test scheme is:
Excluded paths from coverage are:
-n Extracting Xcode project information
+ xctool -project demo.xcodeproj -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO -scheme demo clean
[Info] Loading settings for scheme 'demo' ... (3057 ms)
=== CLEAN ===
xcodebuild clean demo
demo / demo (Debug)
✓ Check dependencies (363 ms)
✓ Remove demo.app (73 ms)
✓ Remove demo.app.dSYM (73 ms)
✓ Remove demo.build (132 ms)
0 errored, 0 warning (526 ms)
demo / demoTests (Debug)
✓ Check dependencies (0 ms)
✓ Remove demoTests.xctest (1 ms)
✓ Remove demoTests.xctest.dSYM (1 ms)
✓ Remove demoTests.build (3 ms)
0 errored, 0 warning (5 ms)
xcodebuild build clean
demo / demo (Debug)
✓ Check dependencies (119 ms)
✓ Create product structure (0 ms)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/bin/mkdir -p /Users/vikas/Library/Developer/Xcode/DerivedData/demo-bjvmeyunxomqaoezclqtsosfosgc/Build/Products/Debug-iphonesimulator/demo.app
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Remove demo.app.dSYM (0 ms)
✓ Remove demo.build (0 ms)
✓ Remove demo.app (1 ms)
0 errored, 0 warning (124 ms)
demo / demoTests (Debug)
✓ Check dependencies (0 ms)
✓ Create product structure (0 ms)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/bin/mkdir -p /Users/vikas/Library/Developer/Xcode/DerivedData/demo-bjvmeyunxomqaoezclqtsosfosgc/Build/Products/Debug-iphonesimulator/demoTests.xctest
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Remove demoTests.xctest (0 ms)
✓ Remove demoTests.xctest.dSYM (0 ms)
✓ Remove demoTests.build (0 ms)
0 errored, 0 warning (3 ms)
** CLEAN SUCCEEDED ** (2229 ms)
+ returnValue=0
+ set +x
+ xctool -project demo.xcodeproj -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO -scheme demo -reporter json-compilation-database:compile_commands.json build
+ returnValue=0
+ set +x
Skipping tests as no test scheme has been provided!
-n Running OCLint...
-n Path included in oclint analysis is: --include .*/demo/demo/..
+ oclint-json-compilation-database --include ../demo/demo/.. -- -max-priority-1 10000 -max-priority-2 10000 -max-priority-3 10000 -report-type pmd -o sonar-reports/oclint.xml
+ returnValue=0
+ set +x
-n Running SonarQube using SonarQube Runner
+ sonar-runner -X
INFO: Scanner configuration file: /usr/local/Cellar/sonar-runner/2.5/libexec/conf/sonar-runner.properties
INFO: Project configuration file: /Users/vikas/Documents/projects/demo/sonar-project.properties
INFO: SonarQube Scanner 2.5
INFO: Java 1.8.0_25 Oracle Corporation (64-bit)
INFO: Mac OS X 10.10.2 x86_64
INFO: Error stacktraces are turned on.
DEBUG: cache: /Users/vikas/.sonar/ws_cache/http%3A%2F%2Flocalhost%3A9000/global
INFO: User cache: /Users/vikas/.sonar/cache
DEBUG: Extract sonar-runner-batch in temp...
DEBUG: Get bootstrap index...
DEBUG: Download: http://localhost:9000/batch_bootstrap/index
DEBUG: Get bootstrap completed
DEBUG: Create isolated classloader...
DEBUG: Start temp cleaning...
DEBUG: Temp cleaning done
DEBUG: Execution getVersion
DEBUG: Execution start
DEBUG: Publish global mode
DEBUG: cache: /Users/vikas/.sonar/ws_cache/http%3A%2F%2Flocalhost%3A9000/global
INFO: Load global repositories
DEBUG: GET 200 http://localhost:9000/batch/global | time=121ms
INFO: Load global repositories (done) | time=532ms
INFO: User cache: /Users/vikas/.sonar/cache
INFO: Load plugins index
DEBUG: GET 200 http://localhost:9000/deploy/plugins/index.txt | time=6ms
INFO: Load plugins index (done) | time=7ms
DEBUG: Load plugins
DEBUG: Load plugins (done) | time=325ms
DEBUG: API compatibility mode is enabled on plugin C# [csharp] (built with API lower than 5.2)
DEBUG: API compatibility mode is enabled on plugin Java [java] (built with API lower than 5.2)
DEBUG: API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
DEBUG: API compatibility mode is enabled on plugin Objective-C (Community) [objectivec] (built with API lower than 5.2)
DEBUG: API compatibility mode is enabled on plugin SVN [scmsvn] (built with API lower than 5.2)
DEBUG: API compatibility mode is enabled on plugin JavaScript [javascript] (built with API lower than 5.2)
DEBUG: Plugins:
DEBUG: * C# 4.4 (csharp)
DEBUG: * Java 3.10 (java)
DEBUG: * Git 1.0 (scmgit)
DEBUG: * Objective-C (Community) 0.5.0-SNAPSHOT (objectivec)
DEBUG: * SVN 1.2 (scmsvn)
DEBUG: * JavaScript 2.10 (javascript)
INFO: Default locale: "en_US", source code encoding: "UTF-8"
DEBUG: Work directory: /Users/vikas/Documents/projects/demo/.sonar
DEBUG: Execution getVersion
DEBUG: Execution execute
INFO: Process project properties
DEBUG: Process project properties (done) | time=3ms
DEBUG: cache: /Users/vikas/.sonar/ws_cache/http%3A%2F%2Flocalhost%3A9000/5.4/projects/OCD1
INFO: Load project repositories
DEBUG: GET 404 http://localhost:9000/batch/project.protobuf?key=OCD1 | time=56ms
DEBUG: Project repository not available - continuing without it
INFO: Load project repositories (done) | time=87ms
INFO: Apply project exclusions
DEBUG: Available languages:
DEBUG: * C# => "cs"
DEBUG: * Java => "java"
DEBUG: * Objective-C (Community) => "objectivec"
DEBUG: * JavaScript => "js"
INFO: Load quality profiles
DEBUG: GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?defaults=true | time=83ms
INFO: Load quality profiles (done) | time=294ms
INFO: Load active rules
DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=cs-sonar-way-37148&p=1&ps=500 | time=43ms
DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-sonar-way-46287&p=1&ps=500 | time=36ms
DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=js-sonar-way-89672&p=1&ps=500 | time=39ms
DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=objectivec-oclint-09271&p=1&ps=500 | time=48ms
INFO: Load active rules (done) | time=758ms
INFO: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
INFO: Publish mode
DEBUG: Start recursive analysis of project modules
INFO: ------------- Scan OCDemo
INFO: Language is forced to objectivec
INFO: Load server rules
DEBUG: GET 200 http://localhost:9000/api/rules/list.protobuf | time=361ms
INFO: Load server rules (done) | time=474ms
DEBUG: Initializers :
INFO: Base dir: /Users/vikas/Documents/projects/demo
INFO: Working dir: /Users/vikas/Documents/projects/demo/.sonar
INFO: Source paths: .
INFO: Source encoding: UTF-8, default locale: en_US
INFO: Index files
DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
DEBUG: Declared extensions of language Objective-C (Community) were converted to sonar.lang.patterns.objectivec : **/*.h,**/*.m
DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js
DEBUG: Language of file 'demo/AppDelegate.h' is detected to be 'objectivec'
DEBUG: Language of file 'demo/AppDelegate.m' is detected to be 'objectivec'
DEBUG: Language of file 'demo/main.m' is detected to be 'objectivec'
DEBUG: Language of file 'demo/ViewController.m' is detected to be 'objectivec'
DEBUG: Language of file 'demo/ViewController.h' is detected to be 'objectivec'
DEBUG: Language of file 'demoTests/demoTests.m' is detected to be 'objectivec'
INFO: 6 files indexed
INFO: Quality profile for objectivec: OCLint
INFO: JaCoCoSensor: JaCoCo report not found : /Users/vikas/Documents/projects/demo/target/jacoco.exec
INFO: JaCoCoItSensor: JaCoCo IT report not found: /Users/vikas/Documents/projects/demo/target/jacoco-it.exec
DEBUG: Code colorizer, supported languages: cs,objectivec
DEBUG: Sensors : Lines Sensor (wrapped) -> QProfileSensor -> Objective-C Squid Sensor -> SCM Sensor (wrapped) -> Code Colorizer Sensor (wrapped) -> CPD Sensor (wrapped)
INFO: Sensor Lines Sensor (wrapped)
INFO: Sensor Lines Sensor (wrapped) (done) | time=121ms
INFO: Sensor QProfileSensor
INFO: Sensor QProfileSensor (done) | time=5ms
INFO: Sensor Objective-C Squid Sensor
DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
DEBUG: Metric lines is an internal metric computed by SonarQube. Provided value is ignored.
INFO: Sensor Objective-C Squid Sensor (done) | time=256ms
INFO: Sensor SCM Sensor (wrapped)
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
INFO: Sensor SCM Sensor (wrapped) (done) | time=0ms
INFO: Sensor Code Colorizer Sensor (wrapped)
INFO: Sensor Code Colorizer Sensor (wrapped) (done) | time=232ms
INFO: Sensor CPD Sensor (wrapped)
INFO: DefaultCpdIndexer is used for objectivec
DEBUG: Populating index from [moduleKey=OCD1, relative=demo/AppDelegate.h, basedir=/Users/vikas/Documents/projects/demo]
DEBUG: Populating index from [moduleKey=OCD1, relative=demo/AppDelegate.m, basedir=/Users/vikas/Documents/projects/demo]
DEBUG: Populating index from [moduleKey=OCD1, relative=demo/ViewController.h, basedir=/Users/vikas/Documents/projects/demo]
DEBUG: Populating index from [moduleKey=OCD1, relative=demo/ViewController.m, basedir=/Users/vikas/Documents/projects/demo]
DEBUG: Populating index from [moduleKey=OCD1, relative=demo/main.m, basedir=/Users/vikas/Documents/projects/demo]
DEBUG: Populating index from [moduleKey=OCD1, relative=demoTests/demoTests.m, basedir=/Users/vikas/Documents/projects/demo]
INFO: Sensor CPD Sensor (wrapped) (done) | time=29ms
DEBUG: Detection of duplications for OCD1:demo/ViewController.m
DEBUG: Detection of duplications for OCD1:demo/AppDelegate.m
DEBUG: Detection of duplications for OCD1:demoTests/demoTests.m
INFO: Analysis report generated in 70ms, dir size=11 KB
INFO: Analysis reports compressed in 54ms, zip size=10 KB
DEBUG: Upload report
DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=OCD1&projectName=OCDemo | time=416ms
INFO: Analysis report uploaded in 436ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/OCD1
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AVR6giSDVdsGRifC8N_i
DEBUG: Report metadata written to /Users/vikas/Documents/projects/demo/.sonar/report-task.txt
DEBUG: Post-jobs :
INFO: Analysis report generated in /Users/vikas/Documents/projects/demo/.sonar/batch-report
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 14.414s
INFO: Final Memory: 41M/134M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
+ returnValue=0
+ set +x
I got the solution.This issues because of older version of OCLint. I download the latest one from git fork. Along with this I Set the Parent of Profile Oclit-> Objective-C and it start working.

Install Apache from Puppetlabs on Vagrant

I'm new to this and I think I'm just missing one thing to grasp what the problem really is.
I understand that I can create my own puppet modules that will install certain packpages to a vagrant instance. There are also some ready-made ones, like this apache. I've run
vagrant ssh and installed it using puppet module install puppetlabs/apache. It now resides under /etc/puppet/modules/apache. But, the apache is not installed.
So, how do I install apache?
In my Vagrantfile I have
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "init.pp"
puppet.options="--verbose --debug"
end
Plus, in the main vagrant directory, under puppet/modules/apache/manifests/init.pp:
class apache2::install {
package { 'apache2':
ensure => present,
}
}
and yet, after vagrant provision or vagrant reload no apache is being installed, or what I guess, the installation process doesn't even start.
Log from after the vagrant provision, whose messages look totally cryptic to me.
[default] Running provisioner: puppet...
Running Puppet with init.pp...
debug: Creating default schedules
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction 70208664910260
debug: Loaded state in 0.00 seconds
debug: Loaded state in 0.00 seconds
info: Applying configuration version '1389652562'
debug: /Schedule[daily]: Skipping device resources because running on a host
debug: /Schedule[monthly]: Skipping device resources because running on a host
debug: /Schedule[hourly]: Skipping device resources because running on a host
debug: /Schedule[never]: Skipping device resources because running on a host
debug: /Schedule[weekly]: Skipping device resources because running on a host
debug: /Schedule[puppet]: Skipping device resources because running on a host
debug: Finishing transaction 70208665347780
debug: Storing state
debug: Stored state in 0.00 seconds
notice: Finished catalog run in 0.05 seconds
debug: Finishing transaction 70208665012580
debug: Received report to process from localhost.localdomain
debug: Processing report from localhost.localdomain with processor Puppet::Reports::Store
You've told Vagrant that it should look for manifests in puppet/manifests (relative to your Vagrant directory), and that it should configure the machine based on whatever is in init.pp, which it will look for in puppet/manifests (as per your instructions). That is, Vagrant will install whatever is in puppet/manifests/init.pp. It will not look at puppet/modules/apache/manifests/init.pp (at least, not at first).
Put something like the following in puppet/manifests/init.pp and it should install properly.
class {'apache':}
In addition to the apache module, make sure you have all dependancies (the stdlib and concat modules from Puppetlabs in this case) installed in your puppet/modules directory, too.
I went with a solution I don't fully like, as it overwrites any settings not provisioned by puppet. But hey, it gets the job done smoothly.
My Vagrantfile:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "base"
#config.vm.box_url = "http://domain.com/path/to/above.box"
config.vm.network :forwarded_port, guest: 80, host: 5656, auto_correct: true
config.vm.provision :shell do |shell|
shell.inline = "mkdir -p /etc/puppet/modules;
puppet module install puppetlabs-concat --force --modulepath '/vagrant/puppet/modules'
puppet module install puppetlabs-stdlib --force --modulepath '/vagrant/puppet/modules'
puppet module install puppetlabs-apache --force --modulepath '/vagrant/puppet/modules'"
end
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "init.pp"
puppet.options="--verbose --debug"
end
end
Note: the script may actually also work without --force --modulepath '/vagrant/puppet/modules
My puppet/manifests/init.pp
node default {
class { 'apache': }
}
Thanks to https://stackoverflow.com/a/21105703/2066118 for pointing me into the right direction.
I'm not sure about Vagrant, but in puppet you need to mention what needed to install in a node on '/etc/puppet/manifests/site.pp' file.
So it will be like this.
node 'hosts.fqdn' {
include apache2
}
For more information : http://docs.puppetlabs.com/puppet/2.7/reference/lang_node_definitions.html