eJabberd with Riak - ejabberd
I have configured a Riak cluster and all is well. I configured ejabberd.yml to talk to it but the last few lines I see in the logs are as below and I can't figure out how to debug it any further.
Anyone able to help?
Change ejabberd install user to root...
Missing ssl cert for your host. Generating snakeoil ssl cert for xmpp.alchemy.local...
Generating a 4096 bit RSA private key
..............................................++
..............................................++
writing new private key to '/tmp/selfsigned.key'
-----
Writing ssl cert and private key to '/opt/ejabberd/ssl/host.pem'...
Missing ssl cert for your xmpp domain. Generating snakeoil ssl cert for alchemy.local...
Generating a 4096 bit RSA private key
................................................++
........................++
writing new private key to '/tmp/selfsigned.key'
-----
Writing ssl cert and private key to '/opt/ejabberd/ssl/alchemy.local.pem'...
Generating ejabberd config file...
Generating ejabberdctl config file...
Starting ejabberd...
tail: cannot open ‘/var/log/ejabberd/crash.log’ for reading: No such file or directory
tail: cannot open ‘/var/log/ejabberd/error.log’ for reading: No such file or directory
tail: cannot open ‘/var/log/ejabberd/erlang.log’ for reading: No such file or directory
tail: ‘/var/log/ejabberd/crash.log’ has been replaced with a remote file. giving up on this name
tail: ‘/var/log/ejabberd/error.log’ has been replaced with a remote file. giving up on this name
09:57:16.424 [info] Application lager started on node ejabberd#xmpp
09:57:16.431 [info] Application crypto started on node ejabberd#xmpp
09:57:16.442 [info] Application sasl started on node ejabberd#xmpp
09:57:16.452 [info] Application asn1 started on node ejabberd#xmpp
09:57:16.452 [info] Application public_key started on node ejabberd#xmpp
09:57:16.466 [info] Application ssl started on node ejabberd#xmpp
09:57:16.474 [info] Application p1_yaml started on node ejabberd#xmpp
09:57:16.485 [info] Application p1_tls started on node ejabberd#xmpp
09:57:16.493 [info] Application p1_xml started on node ejabberd#xmpp
09:57:16.507 [info] Application p1_stringprep started on node ejabberd#xmpp
09:57:16.511 [info] Application p1_zlib started on node ejabberd#xmpp
09:57:16.519 [info] Application cache_tab started on node ejabberd#xmpp
09:57:16.677 [info] Application mnesia started on node ejabberd#xmpp
09:57:17.179 [info] Application inets started on node ejabberd#xmpp
09:57:17.558 [notice] Changed loglevel of //var/log/ejabberd/ejabberd.log to debug
09:57:17.567 [debug] Supervisor ejabberd_sup started ejabberd_hooks:start_link() at pid <0.239.0>
09:57:17.575 [debug] Supervisor kernel_safe_sup started pg2:start_link() at pid <0.241.0>
09:57:17.575 [debug] Supervisor ejabberd_sup started ejabberd_node_groups:start_link() at pid <0.240.0>
09:57:17.575 [debug] Supervisor ejabberd_sup started ejabberd_system_monitor:start_link() at pid <0.242.0>
09:57:17.577 [debug] Supervisor ejabberd_sup started ejabberd_router:start_link() at pid <0.243.0>
09:57:17.579 [debug] Supervisor ejabberd_sup started ejabberd_router_multicast:start_link() at pid <0.249.0>
09:57:17.582 [debug] Supervisor ejabberd_sup started ejabberd_s2s:start_link() at pid <0.255.0>
09:57:17.584 [debug] Supervisor ejabberd_sup started ejabberd_local:start_link() at pid <0.265.0>
09:57:17.585 [debug] The option captcha_cmd is not configured, but some module wants to use the CAPTCHA feature.
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_captcha:start_link() at pid <0.271.0>
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_s2s_in_sup, ejabberd_s2s_in) at pid <0.273.0>
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_s2s_out_sup, ejabberd_s2s_out) at pid <0.274.0>
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_service_sup, ejabberd_service) at pid <0.275.0>
09:57:17.587 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_iq_sup, gen_iq_handler) at pid <0.276.0>
09:57:17.588 [debug] Supervisor ejabberd_sup started ejabberd_tmp_sup:start_link(ejabberd_frontend_socket_sup, ejabberd_frontend_socket) at pid <0.277.0>
09:57:17.588 [debug] Supervisor ejabberd_sup started ejabberd_listener:start_link() at pid <0.278.0>
09:57:17.591 [info] Application protobuffs started on node ejabberd#xmpp
09:57:17.591 [info] Application riak_pb started on node ejabberd#xmpp
09:57:17.591 [info] Application riakc started on node ejabberd#xmpp
09:57:17.600 [debug] Supervisor inet_gethost_native_sup started undefined at pid <0.289.0>
09:57:17.600 [debug] Supervisor kernel_safe_sup started inet_gethost_native:start_link() at pid <0.288.0>
I managed to get a bit more detail by ejabberdctl debug. It seems to be having an issue with the node name, but the exact same config works fine if i don't add Riak to the ejabberd.yml file.
tail: cannot open ‘/var/log/ejabberd/crash.log’ for reading: No such file or directory
tail: cannot open ‘/var/log/ejabberd/error.log’ for reading: No such file or directory
tail: cannot open ‘/var/log/ejabberd/erlang.log’ for reading: No such file or directory
{error_logger,{{2016,2,4},{19,30,38}},"Invalid node name: ~p~n",['debug-not a tty-ejabberd#xmpp']}
{error_logger,{{2016,2,4},{19,30,38}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,322}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.17.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,902}],[]]}
{error_logger,{{2016,2,4},{19,30,38}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['debug-not a tty-ejabberd',shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2016,2,4},{19,30,38}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2016,2,4},{19,30,38}},crash_report,[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.9.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,133}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}},{ancestors,[<0.8.0>]},{messages,[{'EXIT',<0.10.0>,normal}]},{links,[<0.8.0>,<0.7.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,27},{reductions,117}],[]]}
{error_logger,{{2016,2,4},{19,30,38}},std_info,[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}}"}
Crash dump was written to: //var/log/ejabberd/erl_crash_20160204-193037.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{k
**** Update ****
The reason that this was happening was because I hadn't specified the --net network connection in my Docker run command and so it couldn't find the network. Unfortunately there is no debug to indicate this it just hangs forever (this would happen in the general case where the network that hosts the Riak cluster cannot be found and is a nightmare to debug).
I still don't know why the "debug" flag causes tty to be added to the node name but i suspect it is somehow related as when i fixed it that also stopped appearing.
Anyone interested in knowing the detail can view it here https://github.com/rroemhild/docker-ejabberd/issues/81#issuecomment-181133336
You are starting the Erlang VM with an invalid node name:
{error_logger,{{2016,2,4},{19,30,38}},"Invalid node name: ~p~n",['debug-not a tty-ejabberd#xmpp']}
Check where you have configured this: 'debug-not a tty-ejabberd#xmpp', as it is indeed not a valid Erlang VM cluster node name.
Related
IBM APIC starting loopback
I am new to API Connect, and I have installed npm, node and apic in my local MacBook. Now I have created a loopback directory and trying to run the loopback application using apic Start. However, I am not understanding the error received from the logs: MacBook-Pro-2:socialreviews Work$ apic start Error: Service socialreviews started but did not initialize within the timeout period. Dumping log buffer. [Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 3.1.3.201810251210 (Agent Core 3.2.6) [Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883 strong-supervisor attaching dashboard at /appmetrics-dash 2019-04-30T09:02:42.694Z pid:44844 worker:0 INFO supervisor starting (pid 44844) 2019-04-30T09:02:42.697Z pid:44844 worker:0 INFO supervisor reporting metrics to internal: 2019-04-30T09:02:42.709Z pid:44844 worker:0 INFO supervisor size set to undefined 2019-04-30T09:02:42.905Z pid:44848 worker:1 [Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 3.1.3.201810251210 (Agent Core 3.2.6) 2019-04-30T09:02:42.959Z pid:44848 worker:1 [Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883 2019-04-30T09:02:42.995Z pid:44848 worker:1 strong-supervisor attaching dashboard at /appmetrics-dash 2019-04-30T09:02:45.017Z pid:44848 worker:1 Web server listening at: http://0.0.0.0:4004 2019-04-30T09:24:29.148Z pid:44844 worker:0 WARN received SIGTERM, shutting down 2019-04-30T09:24:29.148Z pid:44844 worker:0 INFO supervisor size set to undefined 2019-04-30T09:24:29.148Z pid:44844 worker:0 INFO supervisor stopped Can someone help me with this issue please?
This issue is solved, however I am not 100% sure what was the exact issue. What I have done is ran apic edit command then when clicking on start it suddenly asked me to install docker. I have done so, then I started to have readable errors of some packages not installed. So I used npm commands to install them and my issue is fixed now! :)
Issue when trying to start Sonarqube services
I installed sonarqube-6.3.1 in my machine and created a database in mysql db named 'sonarqubedb'. Now when I am making changes in sonar.properties file to use the database, sonarqube is not getting started and throwing error msg, but If I am using the default DB configuration (and NOT mysql), I am able to start. Could somebody please provide me a solution what is going wrong when I am using mysql db. My sonar.properties file be like: sonar.jdbc.username=root sonar.jdbc.password= sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqubedb?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance and the sonar log file when I try to start service, be like: --> Wrapper Started as Service Launching a JVM... WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader#4e25154f Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. 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.7600 Java Version : 1.8.0_45-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#4f023edb, args[]) called by thread: main Communications runner thread started. Open socket to wrapper...Wrapper-Connection Failed attempt to bind using local port 31000 Opened Socket from 31001 to 32000 Send a packet KEY : 4hhDEyNqmPXAiWpf handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31001]) Received a packet LOW_LOG_LEVEL : 1 Wrapper Manager: LowLogLevel from Wrapper is 1 Received a packet PING_TIMEOUT : 0 PingTimeout from Wrapper is 0 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 2017.04.26 14:54:12 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Program Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp 2017.04.26 14:54:12 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_45\bin\java - Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true - XX:+UseParNewGC -XX:+UseConcMarkSweepGC - XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly - XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Program Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp -javaagent:C:\Program Files\Java\jre1.8.0_45\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\Program Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp\sq- process3041279828124660880properties 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 Received a packet PING : ping Send a packet PING : ok 2017.04.26 14:54:23 INFO app[][o.s.p.m.Monitor] Process[es] is up 2017.04.26 14:54:23 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_45\bin\java - Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m - XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\Program Files\Sonar\sonarqube-6.3.1\sonarqube-6.3.1\temp -javaagent:C:\Program Files\Java\jre1.8.0_45\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;C:\Program Files\Sonar\sonarqube- 6.3.1\sonarqube-6.3.1\lib\jdbc\mysql\mysql-connector-java-5.1.39.jar org.sonar.server.app.WebServer C:\Program Files\Sonar\sonarqube- 6.3.1\sonarqube-6.3.1\temp\sq-process5745752416531116392properties Received a packet PING : ping Send a packet PING : ok 2017.04.26 14:54:28 INFO app[][o.s.p.m.Monitor] Process[es] is stopping 2017.04.26 14:54:28 ERROR app[][o.s.p.m.Monitor] Process[web] failed to start 2017.04.26 14:54:28 INFO app[][o.s.p.m.Monitor] Process[es] is stopped Wrapper Manager: ShutdownHook started WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook Send a packet STOP : 0 Received a packet STOP : Thread, Wrapper-Shutdown-Hook, handling the shutdown process. calling listener.stop() WrapperSimpleApp: stop(0) returned from listener.stop() -> 0 shutdownJVM(0) Thread:Wrapper-Shutdown-Hook Send a packet STOPPED : 0 Closing socket. Server daemon shut down Wrapper Manager: ShutdownHook complete <-- Wrapper Stopped Thanks in Advance :)
Go to your sonarqube/logs directory. You'll find several log files and one of them will contain the detailed error on why sonarqube won't start.(you'll have to scroll all the way down inside the files for the latest information iirc)
Go through this sonar documentation, you will get some help - https://docs.sonarqube.org/display/SONAR/Installing+the+Server
I had the same issue. The problem was that my MySQL version didn't meet the minimum requirements.
Jenkins error: Authorization failed to svn in sonarqube.
I am using Jenkins 2.8 with Sonarqube Plugin 2.2.1. A week ago we had a problem with the sonar server and we get this error. To solve the problem we decided to create a new mysql schema and link it with sonar server. We did something like this: mysql –u root -plinux; create database sonarqube2 character set utf8; grant all privileges on sonarqube2.* to 'sonarsuer'#'localhost' identified by 'linux'; grant all privileges sonarqube2.* to 'sonaruser'#'%' identified by 'linux'; flush privileges; Note: We used the same user we had in the old database After update sonar.jdbc.url with the new data in sonar.properties and in Jenkins configuration we manage to deploy sonarqube again. Then, we tried to launch a SONAR job that we have already created before and we get this error: [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) This is the whole stacktrace: [INFO] --- sonar-maven-plugin:2.6:sonar (default-cli) # cas --- [INFO] SonarQube version: 5.0.1 [WARNING] Invalid POM for org.samba.jcifs:jcifs-ext:jar:0.9.4, transitive dependencies (if any) will not be available, enable debug logging for more details INFO: Default locale: "es_ES", source code encoding: "UTF-8" (analysis is platform dependent) INFO: Work directory: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/sonar INFO: SonarQube Server 5.0.1 [INFO] [13:47:05.297] Load global referentials... [INFO] [13:47:05.751] Load global referentials done: 458 ms [INFO] [13:47:05.771] User cache: /home/tomcat/.sonar/cache [INFO] [13:47:05.801] Install plugins [INFO] [13:47:07.792] Install JDBC driver [INFO] [13:47:07.802] Create JDBC datasource for jdbc:mysql://myserver:3306/sonarqube2?useUnicode=true&characterEncoding=utf8 [INFO] [13:47:11.353] Initializing Hibernate [ERROR] [13:47:15.591] No license for plugin views [INFO] [13:47:16.958] Load project referentials... [INFO] [13:47:18.003] Load project referentials done: 1045 ms [INFO] [13:47:18.003] Load project settings [INFO] [13:47:19.038] Loading technical debt model... [INFO] [13:47:19.097] Loading technical debt model done: 59 ms [INFO] [13:47:19.115] Apply project exclusions [INFO] [13:47:19.336] ------------- Scan CAS (Central Authentication Service) [INFO] [13:47:19.339] Load module settings [INFO] [13:47:21.334] Loading rules... [INFO] [13:47:23.049] Loading rules done: 1715 ms [INFO] [13:47:23.115] Configure Maven plugins [INFO] [13:47:23.367] No quality gate is configured. [INFO] [13:47:29.435] Initializer FindbugsMavenInitializer... [INFO] [13:47:29.437] Initializer FindbugsMavenInitializer done: 2 ms [INFO] [13:47:29.437] Base dir: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk [INFO] [13:47:29.437] Working dir: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/sonar [INFO] [13:47:29.438] Source paths: src/main/webapp, pom.xml, src/main/java [INFO] [13:47:29.438] Test paths: src/test/java [INFO] [13:47:29.439] Binary dirs: target/classes [INFO] [13:47:29.439] Source encoding: UTF-8, default locale: es_ES [INFO] [13:47:29.439] Index files [INFO] [13:47:30.480] 36 files indexed [INFO] [13:47:31.213] Quality profile for java: Sonar way [INFO] [13:47:31.213] Quality profile for js: Sonar way [INFO] [13:47:31.300] JIRA issues sensor will not run as some parameters are missing. [INFO] [13:47:31.392] Sensor JavaSquidSensor... [INFO] [13:47:32.089] Java Main Files AST scan... [INFO] [13:47:32.094] 25 source files to be analyzed [INFO] [13:47:36.733] Java Main Files AST scan done: 4643 ms [INFO] [13:47:36.733] 25/25 source files analyzed [INFO] [13:47:36.746] Java bytecode scan... [INFO] [13:47:37.302] Java bytecode scan done: 556 ms [INFO] [13:47:37.305] Java Test Files AST scan... [INFO] [13:47:37.306] 5 source files to be analyzed [INFO] [13:47:37.626] 5/5 source files analyzed [INFO] [13:47:37.627] Java Test Files AST scan done: 321 ms [INFO] [13:47:37.633] Package design analysis... [INFO] [13:47:37.684] Package design analysis done: 51 ms [INFO] [13:47:37.801] Sensor JavaSquidSensor done: 6409 ms [INFO] [13:47:37.813] Sensor QProfileSensor... [INFO] [13:47:37.819] Sensor QProfileSensor done: 6 ms [INFO] [13:47:37.819] Sensor Maven dependencies... [INFO] [13:47:40.023] Sensor Maven dependencies done: 2204 ms [INFO] [13:47:40.026] Sensor JavaScriptSquidSensor... [INFO] [13:47:40.205] 6 source files to be analyzed [INFO] [13:47:45.590] 6/6 source files analyzed [INFO] [13:47:48.499] Sensor JavaScriptSquidSensor done: 8473 ms [INFO] [13:47:48.506] Sensor CoverageSensor... [INFO] [13:47:48.507] Sensor CoverageSensor done: 1 ms [INFO] [13:47:48.507] Sensor InitialOpenIssuesSensor... [INFO] [13:47:48.525] Sensor InitialOpenIssuesSensor done: 18 ms [INFO] [13:47:48.525] Sensor ProjectLinksSensor... [INFO] [13:47:48.557] Sensor ProjectLinksSensor done: 32 ms [INFO] [13:47:48.558] Sensor VersionEventsSensor... [INFO] [13:47:48.600] Sensor VersionEventsSensor done: 42 ms [INFO] [13:47:48.600] Sensor FileHashSensor... [INFO] [13:47:48.608] Sensor FileHashSensor done: 8 ms [INFO] [13:47:48.610] Sensor CoberturaSensor... [INFO] [13:47:48.616] parsing /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/site/cobertura/coverage.xml [INFO] [13:47:49.078] Sensor CoberturaSensor done: 468 ms [INFO] [13:47:49.078] Sensor SCM Sensor... [INFO] [13:47:49.089] SCM provider for this project is: svn [INFO] [13:47:49.089] Retrieve SCM blame information... [INFO] [13:47:49.218] 36 files to be analyzed [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:04.240s [INFO] Finished at: Fri Aug 12 13:47:54 CEST 2016 [INFO] Final Memory: 58M/955M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) Should I change aditional credential in Jenkins? Any help would be appreciated.
See SonarQube 5.0 SCM support documentation for details on how to configure SVN authentication (which is what is failing here) using sonar.svn.username and sonar.svn.password.secured. (side-note: SonarQube 5.0 is pretty old and known for having performance issues, you should really upgrade to latest/LTS version)
Apache Drill: Failure setting up ZK for client
I am testing Apache Drill with a two server cluster. Let's say their external IPs are: 1.1.1.1 2.2.2.2 I first setup Zookeeper to run on both, and when I do the status command I get positive response: ZooKeeper JMX enabled by default Using config: /opt/zookeeper-3.4.8/bin/../conf/zoo.cfg Mode: leader The way I have my zoo.cfg to get it working was like this: Server 1: // other default values omitted clientPort=2181 server.1=0.0.0.0:2888:3888 server.2=2.2.2.2:2888:3888 Server 2: // other default values omitted clientPort=2181 server.1=1.1.1.1:2888:3888 server.2=0.0.0.0:2888:3888 Next I wanted to get Drill running with this cluster, so I modify the drill-override.conf file for the 2 servers as follows: Server 1: drill.exec: { cluster-id: "test", zk.connect: "1.1.1.1:2181,2.2.2.2:2181" } Server 2: drill.exec: { cluster-id: "test", zk.connect: "2.2.2.2:2181,1.1.1.1:2181" } I can start a drillbit on both servers, and when I do status I get this response on both servers: drillbit is running. But when I then try to open the console via bin/drill-conf I get this stack trace: Error: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client. (state=,code=0) java.sql.SQLException: Failure in connecting to Drill: org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client. at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:159) at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:64) at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69) at net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126) at org.apache.drill.jdbc.Driver.connect(Driver.java:72) at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167) at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213) at sqlline.Commands.connect(Commands.java:1083) at sqlline.Commands.connect(Commands.java:1015) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36) at sqlline.SqlLine.dispatch(SqlLine.java:742) at sqlline.SqlLine.initArgs(SqlLine.java:528) at sqlline.SqlLine.begin(SqlLine.java:596) at sqlline.SqlLine.start(SqlLine.java:375) at sqlline.SqlLine.main(SqlLine.java:268) Caused by: org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client. at org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:208) at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:151) ... 18 more Caused by: java.io.IOException: Failure to connect to the zookeeper cluster service within the allotted time of 10000 milliseconds. at org.apache.drill.exec.coord.zk.ZKClusterCoordinator.start(ZKClusterCoordinator.java:123) at org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:206) ... 19 more apache drill 1.7.0 "start your sql engine" Why would drill fail to connect to the ZK cluster, which is running just fine? All ports are open between these two boxes.
Pre-Requisites Prerequisites for starting drill in distributed mode: (Required) Running Oracle JDK version 7 (Required) Running a ZooKeeper quorum (Recommended) Running a Hadoop cluster (Recommended) Using DNS Configuration As your server IP address: Server 1 - 1.1.1.1 Server 2 - 2.2.2.2 Put same configuration in zoo.cfg in both Server 1 and Server 2 clientPort=2181 server.1=1.1.1.1:2888:3888 server.2=2.2.2.2:2888:3888 Similarly same configuration in drill-override.conf for both the servers drill.exec: { cluster-id: "test", zk.connect: "1.1.1.1:2181,2.2.2.2:2181" } Starting Drill Start drillbit on all the cluster nodes using bin/drillbit.sh start Using Drill Web UI: Open web UI using any node address. For example: 1.1.1.1:8047 Via Shell: Fire bin/drill-localhost command and drill shell will appear. Verify Installation From drill shell or UI fire SELECT * FROM sys.drillbits; Drill lists information about the Drillbits that are running Stopping Drill Fire command bin/drillbit.sh stop
Jenkins-Sonar communication on Openshift
I am making a development environnement based on Jenkins and Sonar. Both are placed on isolated gears. The Jenkins gear has been created with the Instant App option. The Sonar gear has been created thanks to these github indications. I created a Jenkins free-style job in order to analysis a Maven project. The script used on that job is based on this wordpress article. # Build script of the Job settingsPath=$OPENSHIFT_DATA_DIR/settings.xml settings="<settings>\n <localRepository>$OPENSHIFT_DATA_DIR</localRepository>\n</settings>\n" echo $settings > $settingsPath # Cleaning of the workspace mvn --global-settings $settingsPath clean test # Preparation of Sonar informations export SONAR_JDBC="-Dsonar.jdbc.url=jdbc:mysql://xxx.xxx.xxx.xxx:3306/sonar?useUnicode=true&characterEncoding=utf8" export SONAR_DRIVER=-Dsonar.jdbc.driver=com.mysql.jdbc.Driver export SONAR_DBUSER=-Dsonar.jdbc.username=xxx export SONAR_DBPASS=-Dsonar.jdbc.password=xxx export SONAR_URL=-Dsonar.host.url=http://sonar-alc.rhcloud.com export SONAR_OPTS="$SONAR_JDBC $SONAR_DRIVER $SONAR_DBUSER $SONAR_DBPASS $SONAR_URL" # Sonar analysis mvn --global-settings $settingsPath sonar:sonar $SONAR_OPTS On the execution of the mvn sonar:sonar command, I have the following error: Can not execute SonarQube analysis: Fail to connect to database: Cannot create PoolableConnectionFactory (Communications link failure Here is the stacktrace corresponding to this error: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ClientEvalcolor 1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- sonar-maven-plugin:2.1:sonar (default-cli) # ClientEvalcolor --- [INFO] SonarQube version: 3.3.1 [INFO] [03:28:09.324] Create JDBC datasource for jdbc:mysql://xxx.xxx.xxx.xxx:3306/sonar?useUnicode=true&characterEncoding=utf8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.634s [INFO] Finished at: Mon Nov 25 03:28:10 EST 2013 [INFO] Final Memory: 12M/182M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project ClientEvalcolor: Can not execute SonarQube analysis: Fail to connect to database: Cannot create PoolableConnectionFactory (Communications link failure [ERROR] [ERROR] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.): No route to host [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Build step 'Execute shell' marked build as failure Finished: FAILURE I know that an Openshift mysql database isn't accessible from a remote server, but Sonar seems to be runnable on Openshift, and the article that I previously linked successfully did it. Do you have any idea about how to fix that ? Thank you, Alvaro C.
I finally succeeded on making my Jenkins gear send data to my Sonar gear ! I'll explain the solution I found here, maybe it will help some people. There a three ways to access an Openshift database: The gear that contains that database can access it easily on localhost:3306. That's the usual case. From your own computer, you can bind ports (with the rhc tool) in order to access the database. This can't be applied from another gear, and requires the rhc tool to keep running. Any gear from your account can access the database of a scalable application. Usage: When creating the Sonar gear, it's necessary to set the gear as scalable (this can't be done with jenkins/diy gears). Adding a database cartridge to this gear will consume 1 gear, but this database can be accessed from any Openshift application. Notice that this new database will have a port different than 3306 (in my case, 39536). If you don't have this, that's probably that the embedded app isn't set scalable. The Jenkins job script that I put in my question is correct. Changing all these "xxxxx" and the port with your database info will permit Jenkins to do his job !