I am trying to run Hazelcast cluster (version 3.0-RC1) on Amazon EC2 machine. I followed the example given in the documentation. The machines are not forming a cluster. Instead, I get the following message:
2013-07-16 17:58:41 com.hazelcast.system 11295 INFO [10.168.30.154]:5701 [hzmap]
Copyright (C) 2008-2013 Hazelcast.com
2013-07-16 17:58:41 com.hazelcast.instance.Node 11302 WARN [10.168.30.154]:5701 [hzmap] com.hazelcast.impl.cluster.TcpIpJoinerOverAWS
2013-07-16 17:58:41 com.hazelcast.core.LifecycleService 11304 INFO [10.168.30.154]:5701 [hzmap] Address[10.168.30.154]:5701 is STARTING
2013-07-16 17:58:41 com.hazelcast.instance.Node 11636 WARN [10.168.30.154]:5701 [hzmap] No join method is enabled! Starting standalone.
2013-07-16 17:58:41 com.hazelcast.core.LifecycleService 11739 INFO [10.168.30.154]:5701 [hzmap] Address[10.168.30.154]:5701 is STARTED
2013-07-16 17:58:42 com.hazelcast.partition.PartitionService 12812 INFO [10.168.30.154]:5701 [hzmap] Initializing cluster partition table first arrangement...
Bug has been resolved in RC-2.
It looks like there is a bug in Hazelcast 3.0-RC1
Node#createJoiner() method still using the old package name for TcpIPJoinerAWS class.
Class clazz = Class.forName("com.hazelcast.impl.cluster.TcpIpJoinerOverAWS");
Instead, the current package name for this class is:
Class clazz = Class.forName("com.hazelcast.impl.TcpIpJoinerOverAWS");
This bug is solved in Hazelcast 3 final.
Related
I have this Spring-Boot 1.5.4 project that needed a clustered database cache with Hazelcast. So the changes I made are these:
pom.xml:
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-eureka-one</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.mybatis.caches</groupId>
<artifactId>mybatis-hazelcast</artifactId>
<version>1.1.1</version>
</dependency>
Bean:
#Bean
public Config hazelcastConfig(EurekaClient eurekaClient) {
EurekaOneDiscoveryStrategyFactory.setEurekaClient(eurekaClient);
Config config = new Config();
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
return config;
}
mapper.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sjngm.blah.dao.mapper.AttributeMapper">
<resultMap type="attribute" id="attributeResult">
...
</resultMap>
<cache type="org.mybatis.caches.hazelcast.HazelcastCache" eviction="LRU" size="100000" flushInterval="600000" />
...
I don't have a hazelcast.xml or eureka-client.properties.
It starts fine, but logs this:
2019-11-13 09:51:48,003 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] [localhost-startStop-1] Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2019-11-13 09:51:48,005 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] [localhost-startStop-1] Finished creating instance of bean 'hazelcastConfig'
2019-11-13 09:51:48,005 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] [localhost-startStop-1] Autowiring by type from bean name 'hazelcastInstance' via factory method to bean named 'hazelcastConfig'
2019-11-13 09:51:48,066 INFO [com.hazelcast.instance.DefaultAddressPicker] [localhost-startStop-1] [LOCAL] [dev] [3.7.7] Prefer IPv4 stack is true.
2019-11-13 09:51:48,124 INFO [com.hazelcast.instance.DefaultAddressPicker] [localhost-startStop-1] [LOCAL] [dev] [3.7.7] Picked [10.20.20.86]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
2019-11-13 09:51:48,142 INFO [com.hazelcast.system] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] Hazelcast 3.7.7 (20170404 - e3c56ea) starting at [10.20.20.86]:5701
2019-11-13 09:51:48,142 INFO [com.hazelcast.system] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
2019-11-13 09:51:48,142 INFO [com.hazelcast.system] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] Configured Hazelcast Serialization version : 1
2019-11-13 09:51:48,341 INFO [com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] Backpressure is disabled
2019-11-13 09:51:49,006 INFO [com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] Starting 4 partition threads
2019-11-13 09:51:49,008 INFO [com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] Starting 3 generic threads (1 dedicated for priority tasks)
2019-11-13 09:51:49,013 INFO [com.hazelcast.core.LifecycleService] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] [10.20.20.86]:5701 is STARTING
2019-11-13 09:51:49,014 INFO [com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThreadingModel] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
2019-11-13 09:51:49,031 WARN [com.hazelcast.instance.Node] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] No join method is enabled! Starting standalone.
2019-11-13 09:51:49,063 INFO [com.hazelcast.core.LifecycleService] [localhost-startStop-1] [10.20.20.86]:5701 [dev] [3.7.7] [10.20.20.86]:5701 is STARTED
2019-11-13 09:51:49,269 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] [localhost-startStop-1] Eagerly caching bean 'hazelcastInstance' to allow for resolving potential circular references
...
2019-11-13 09:51:50,563 DEBUG [org.mybatis.spring.SqlSessionFactoryBean] [main] Registered type handler: 'class [C'
2019-11-13 09:51:50,563 DEBUG [org.mybatis.spring.SqlSessionFactoryBean] [main] Registered type handler: 'class java.time.Duration'
2019-11-13 09:51:50,563 DEBUG [org.mybatis.spring.SqlSessionFactoryBean] [main] Registered type handler: 'class java.net.URL'
2019-11-13 09:51:50,563 DEBUG [org.mybatis.spring.SqlSessionFactoryBean] [main] Registered type handler: 'class java.time.ZonedDateTime'
2019-11-13 09:51:50,655 INFO [com.hazelcast.config.XmlConfigLocator] [main] Loading 'hazelcast-default.xml' from classpath.
2019-11-13 09:51:50,812 INFO [com.hazelcast.instance.DefaultAddressPicker] [main] [LOCAL] [dev] [3.7.7] Prefer IPv4 stack is true.
2019-11-13 09:51:50,867 INFO [com.hazelcast.instance.DefaultAddressPicker] [main] [LOCAL] [dev] [3.7.7] Picked [10.20.20.86]:5702, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5702], bind any local is true
2019-11-13 09:51:50,868 INFO [com.hazelcast.system] [main] [10.20.20.86]:5702 [dev] [3.7.7] Hazelcast 3.7.7 (20170404 - e3c56ea) starting at [10.20.20.86]:5702
2019-11-13 09:51:50,868 INFO [com.hazelcast.system] [main] [10.20.20.86]:5702 [dev] [3.7.7] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
2019-11-13 09:51:50,868 INFO [com.hazelcast.system] [main] [10.20.20.86]:5702 [dev] [3.7.7] Configured Hazelcast Serialization version : 1
2019-11-13 09:51:50,873 INFO [com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator] [main] [10.20.20.86]:5702 [dev] [3.7.7] Backpressure is disabled
2019-11-13 09:51:51,010 INFO [com.hazelcast.instance.Node] [main] [10.20.20.86]:5702 [dev] [3.7.7] Creating MulticastJoiner
2019-11-13 09:51:51,019 INFO [com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl] [main] [10.20.20.86]:5702 [dev] [3.7.7] Starting 4 partition threads
2019-11-13 09:51:51,020 INFO [com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl] [main] [10.20.20.86]:5702 [dev] [3.7.7] Starting 3 generic threads (1 dedicated for priority tasks)
2019-11-13 09:51:51,020 INFO [com.hazelcast.core.LifecycleService] [main] [10.20.20.86]:5702 [dev] [3.7.7] [10.20.20.86]:5702 is STARTING
2019-11-13 09:51:51,021 INFO [com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThreadingModel] [main] [10.20.20.86]:5702 [dev] [3.7.7] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
2019-11-13 09:51:53,952 INFO [com.hazelcast.internal.cluster.impl.MulticastJoiner] [main] [10.20.20.86]:5702 [dev] [3.7.7]
Members [1] {
Member [10.20.20.86]:5702 - d29f6be8-a775-4804-bce3-8e0d3aaaab4b this
}
2019-11-13 09:51:53,953 WARN [com.hazelcast.instance.Node] [main] [10.20.20.86]:5702 [dev] [3.7.7] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
2019-11-13 09:51:53,954 INFO [com.hazelcast.core.LifecycleService] [main] [10.20.20.86]:5702 [dev] [3.7.7] [10.20.20.86]:5702 is STARTED
2019-11-13 09:51:50,917 DEBUG [org.mybatis.spring.SqlSessionFactoryBean] [main] Parsed mapper file: 'file [C:\workspaces\projects\com.sjngm.blah.db\target\classes\sqlmap\AttributeMapper.xml]'
It logs the two warnings and I don't know why. At first it tries to instantiate a standalone instance and then it plays along and uses Eureka and "complains" about the opened port 5701.
IMHO the first block shouldn't be there at all, which would result in the second warning not being printed. It looks like Hazelcast initialises itself at first and then Spring-Boot creates the #Bean.
What am I missing here?
As you disabled multicast, you have no joiner for Hazelcast. That is why it prints
No join method is enabled! Starting standalone.
Here is the link how to enable it for Eureka
For older versions like 3.7, you can use to configure Eureka by giving fully qualified class name.
<network>
<discovery-strategies>
<discovery-strategy class="com.hazelcast.eureka.one.EurekaOneDiscoveryStrategy" enabled="true">
<properties>
<property name="namespace">hazelcast</property>
</properties>
</discovery-strategy>
</discovery-strategies>
</network>
P.S: I suggest you to upgrade to latest hazelcast as 3.7.7 is pretty old.
Latest Hazelcast Versions are listed here. https://hazelcast.org/download/
I am installing SN5.5 using PostgreSQL9.5 under Windows. Unfortunately, I am hitting error "Webapp did not start".
Below is the full stack trace. I think I got the error first at line "Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener"
2016.05.19 18:10:59 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.05.19 18:10:59 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.05.19 18:11:00 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.5 / 5773a4aab0ef6c0de79d3038e82f8a051049d6d0
2016.05.19 18:11:00 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonar
2016.05.19 18:11:01 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
org.sonar.api.utils.MessageException: Current version is too old. Please upgrade to Long Term Support version firstly.
2016.05.19 18:11:01 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.05.19 18:11:01 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2016.05.19 18:11:01 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
2016.05.19 18:11:01 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.05.19 18:11:01 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
2016.05.19 18:11:01 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2016.05.19 18:11:01 WARN web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start
at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-5.5.jar:na]
at org.sonar.server.app.WebServer.isUp(WebServer.java:48) [sonar-server-5.5.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.5.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:69) [sonar-server-5.5.jar:na]
2016.05.19 18:11:01 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.05.19 18:11:02 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.05.19 18:11:02 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2016.05.19 18:11:02 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
2016.05.19 18:11:03 INFO app[o.s.p.m.Monitor] Process[es] is stopping
2016.05.19 18:11:03 INFO es[o.s.p.StopWatcher] Stopping process
2016.05.19 18:11:03 INFO es[o.elasticsearch.node] [sonar-1463652653150] stopping ...
2016.05.19 18:11:03 INFO es[o.elasticsearch.node] [sonar-1463652653150] stopped
2016.05.19 18:11:03 INFO es[o.elasticsearch.node] [sonar-1463652653150] closing ...
2016.05.19 18:11:03 INFO es[o.elasticsearch.node] [sonar-1463652653150] closed
2016.05.19 18:11:04 INFO app[o.s.p.m.Monitor] Process[es] is stopped
<-- Wrapper Stopped
org.sonar.api.utils.MessageException: Current version is too old. Please upgrade to Long Term Support version firstly.
This log means than you're trying to upgrade to a too recent version. You should first upgrade to the nearest LTS version (probably 4.5.X), then you'll be able to upgrade to 5.5.
See http://docs.sonarqube.org/display/SONAR/Upgrading for more information about the upgrade strategy.
You can try adding below properties in wrapper.conf file. It did the trick for me.
# Java Additional Parameter
wrapper.java.additional.1=-Djava.awt.headless=true
wrapper.java.additional.2=-XX:MaxPermSize=160m
wrapper.java.additional.3=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.4=-Dfile.encoding=UTF-8
wrapper.java.additional.5=-Djruby.management.enabled=false
# Maximum amount of memory of Java VM
wrapper.java.additional.6=-Xmx2048M
I have installed Neo4j 2.3.2 Community Edition on Mac OS 10.10. I can launch the application and connect to it from localhost:7474/browser/. So far, so good.
I would like to launch Neo4j 2.3.2 from a Terminal window, so that I don't have the overhead of a windowed application running at the same time. When I run the following command...
$ ~/neo4j/bin/neo4j console
... I get this output in the Terminal window:
WARNING: Max 256 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Starting Neo4j Server console-mode...
Unable to find any JVMs matching version "1.7".
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow -XX:hashCode=5 -Dneo4j.ext.udc.source=tarball
2016-02-25 14:03:18.755+0000 INFO [API] Setting startup timeout to: 120000ms based on 120000
2016-02-25 14:03:58.356+0000 INFO [API] Successfully started database
2016-02-25 14:04:04.220+0000 INFO [API] Starting HTTP on port :7474 with 2 threads available
2016-02-25 14:04:13.512+0000 INFO [API] Enabling HTTPS on port :7473
09:04:20.201 [main] INFO org.eclipse.jetty.util.log - Logging initialized #98517ms
2016-02-25 14:04:23.034+0000 INFO [API] Mounting static content at [/webadmin] from [webadmin-html]
2016-02-25 14:04:25.785+0000 INFO [API] Mounting static content at [/browser] from [browser]
09:04:25.993 [main] INFO org.eclipse.jetty.server.Server - jetty-9.2.4.v20141103
09:04:26.722 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler#1611ba2{/,null,AVAILABLE}
09:04:27.794 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /webadmin, did not find org.apache.jasper.servlet.JspServlet
09:04:27.981 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext#132ea25{/webadmin,jar:file:/Users/james/neo4j/system/lib/neo4j-server-2.2.5-static-web.jar!/webadmin-html,AVAILABLE}
09:04:38.841 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#60bfaa02{/db/manage,null,AVAILABLE}
09:04:39.326 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#28e2e149{/db/data,null,AVAILABLE}
09:04:39.353 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /browser, did not find org.apache.jasper.servlet.JspServlet
09:04:39.355 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext#78e6aa71{/browser,jar:file:/Users/james/neo4j/system/lib/neo4j-browser-2.2.5.jar!/browser,AVAILABLE}
09:04:39.536 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#4994d9ab{/,null,AVAILABLE}
09:04:39.745 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector#2d19cf20{HTTP/1.1}{localhost:7474}
09:04:40.576 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector#43c742c{SSL-HTTP/1.1}{localhost:7473}
09:04:40.577 [main] INFO org.eclipse.jetty.server.Server - Started #119058ms
2016-02-25 14:04:40.577+0000 INFO [API] Server started on: http://localhost:7474/
2016-02-25 14:04:40.590+0000 INFO [API] Remote interface ready and available at [http://localhost:7474/]
I have Java version 8, update 74 installed (build 1.8.0_74-b02), so I assume that I can ignore the warning Unable to find any JVMs matching version "1.7".
However, when I visit http://localhost:7474/ in Chrome Version 45.0.2454.85 (64-bit), I see three errors in the Developer Console: two files that fail to load and a subsequent script error.
localhost/:28 GET http://localhost:7474/browser/styles/68eddd94.main.css
localhost/:466 GET http://localhost:7474/browser/scripts/ded362b3.scripts.js
Uncaught Error: [$injector:modulerr] Failed to instantiate module neo4jApp due to:
Error: [$injector:nomod] Module 'neo4jApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
As a result, the Neo4j interface does not appear in the browser window.
Is it possible to run Neo4j 2.3.2 from the Terminal, and if so, what do I need to do to get http://localhost:7474/ to load correctly?
Shift-reload, or test in an incognito window.
Looks like a JS file mismatch due to aggressive browser caching.
Is it possible to run more than one Bamboo Agent per EC2 Elastic Instance?
We use Docker in our build system and the process seems mostly network IO bound. It would be nice if we could run multiple Agents on one machine.
By running multiple agents on one machine instead of starting multiple machines, we also don't need to worry about shipping Docker images between machines as artifacts.
Update 30 Oct 2014:
I tried copying the current startup script and adding a new home:
$ cat /opt/bamboo-elastic-agent/bin/bamboo-elastic-agent2
#!/bin/sh
bambooAgentBin=$(cd -P -- $(dirname $0) && pwd)
. $bambooAgentBin/bambooShellFunctions.sh
echo Starting Elastic Bamboo Agent...
java -Dbamboo.home=/home/bamboo/bamboo-agent-home-2/ -Dimagefiles.version=3.3-SNAPSHOT -jar $bambooAgentBin/*installer*.jar 2>&1 | tee -a $(getHomeDir)/bamboo-elastic-agent.out
It seems like the elastic version sets up some kind of a tunnel and crashes because a tunnel is already running:
# su -c /opt/bamboo-elastic-agent/bin/bamboo-elastic-agent2 - bamboo &
[1] 14143
Starting Elastic Bamboo Agent...
2014-10-30 08:39:31,804 INFO [main] [S3Sync] Syncing from: bamboo-agent-release-us-e1/5.6-OD-01-0070/cce16404c14f06456c6adc44181746abf8dd1206/ to /opt/bamboo-elastic-agent
2014-10-30 08:39:31,979 INFO [main] [S3Utils] Syncing s3://bamboo-agent-release-us-e1/5.6-OD-01-0070/cce16404c14f06456c6adc44181746abf8dd1206/ to /opt/bamboo-elastic-agent
2014-10-30 08:39:31,979 INFO [main] [S3Utils] Fetching the list of remote objects...
2014-10-30 08:39:33,006 INFO [main] [S3Utils] Found 579 files in s3://bamboo-agent-release-us-e1/5.6-OD-01-0070/cce16404c14f06456c6adc44181746abf8dd1206/
2014-10-30 08:39:33,059 INFO [main] [S3Utils] Found 463 files in /opt/bamboo-elastic-agent
2014-10-30 08:39:33,060 INFO [main] [S3Utils] Generating the list of files to fetch from S3...
2014-10-30 08:39:33,076 INFO [main] [S3Utils] Generating the list of files to remove...
2014-10-30 08:39:33,078 INFO [main] [S3Utils] Removing 0 files from /opt/bamboo-elastic-agent
2014-10-30 08:39:33,079 INFO [main] [S3Utils] Fetching 155 files to /opt/bamboo-elastic-agent
2014-10-30 08:39:39,969 INFO [main] [S3Utils] Fetched 113 MB from S3
2014-10-30 08:39:39,973 INFO [main] [ElasticAgentInstaller] Starting [java, -server, -Xms32m, -Xmx256m, -XX:MaxPermSize=128m, -XX:+HeapDumpOnOutOfMemoryError, -Dimagefiles.version=3.3, -Dbamboo.agent.installDir=/opt/bamboo-elastic-agent, -cp, /opt/bamboo-elastic-agent/boot/annotations-13.0.jar:/opt/bamboo-elastic-agent/boot/gson-2.2.2-atlassian-1.jar:/opt/bamboo-elastic-agent/boot/atlassian-bamboo-api-agent-bootstrap-5.6-OD-01-0070.jar:/opt/bamboo-elastic-agent/boot/commons-io-2.4.jar:/opt/bamboo-elastic-agent/boot/jackson-core-2.1.1.jar:/opt/bamboo-elastic-agent/boot/atlassian-bamboo-agent-elastic-shared-5.6-OD-01-0070.jar:/opt/bamboo-elastic-agent/boot/atlassian-tunnel-0.21.jar:/opt/bamboo-elastic-agent/boot/stax-api-1.0-2.jar:/opt/bamboo-elastic-agent/boot/guava-bridge-11.0.2-atlassian-01.jar:/opt/bamboo-elastic-agent/boot/atlassian-bamboo-agent-elastic-5.6-OD-01-0070.jar:/opt/bamboo-elastic-agent/boot/commons-codec-1.8.jar:/opt/bamboo-elastic-agent/boot/atlassian-util-concurrent-2.4.1.jar:/opt/bamboo-elastic-agent/boot/joda-time-2.3.jar:/opt/bamboo-elastic-agent/boot/log4j-1.2.15.jar:/opt/bamboo-elastic-agent/boot/guava-11.0.2-atlassian-01.jar:/opt/bamboo-elastic-agent/boot/atlassian-bamboo-agent-bootstrap-5.6-OD-01-0070.jar:/opt/bamboo-elastic-agent/boot/commons-lang-2.6.jar:/opt/bamboo-elastic-agent/boot/atlassian-aws-1.0.71.jar:/opt/bamboo-elastic-agent/boot/jackson-databind-2.1.1.jar:/opt/bamboo-elastic-agent/boot/fugue-1.1.jar:/opt/bamboo-elastic-agent/boot/aws-java-sdk-1.7.1.jar:/opt/bamboo-elastic-agent/boot/httpclient-4.2.5.jar:/opt/bamboo-elastic-agent/boot/commons-logging-1.0.4.jar:/opt/bamboo-elastic-agent/boot/jackson-annotations-2.1.1.jar:/opt/bamboo-elastic-agent/boot/bcprov-jdk15on-1.48.jar:/opt/bamboo-elastic-agent/boot/atlassian-bamboo-core-agent-bootstrap-5.6-OD-01-0070.jar:/opt/bamboo-elastic-agent/boot/bcpkix-jdk15on-1.48.jar:/opt/bamboo-elastic-agent/boot/atlassian-annotations-0.4.jar:/opt/bamboo-elastic-agent/boot/jsr305-1.3.9.jar:/opt/bamboo-elastic-agent/boot/httpcore-4.2.5.jar:, com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap]
2014-10-30 08:39:40,119 INFO [main] [ElasticAgentBootstrap] Starting Agent Bootstrap using Java 1.6.0_45 from Sun Microsystems Inc.
2014-10-30 08:39:40,410 INFO [main] [ElasticAgentBootstrap] Using tunnelling. Setting virtual host name to https://xxxxxxx.atlassian.net/builds/agentServer/
2014-10-30 08:39:40,410 INFO [main] [ElasticAgentBootstrap] Using tunnelling for HTTP(S). Registering 'httpt' and 'httpst' protocols.
2014-10-30 08:39:40,416 INFO [main] [ElasticAgentBootstrap] HTTP(S) tunnel: enabled
2014-10-30 08:39:40,416 INFO [main] [ElasticAgentBootstrap] JMS tunnel: enabled
2014-10-30 08:39:40,424 INFO [main] [ElasticAgentBootstrap] Starting tunnel server, waiting for 2 connections.
2014-10-30 08:39:40,425 FATAL [tunnellogger-thread] [TunnelServer] [com.atlassian.tunnel.tunnel.server.TunnelServer] Fatal error in TunnelServer.
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
at java.net.ServerSocket.bind(ServerSocket.java:328)
at java.net.ServerSocket.<init>(ServerSocket.java:194)
at java.net.ServerSocket.<init>(ServerSocket.java:150)
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:84)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:81)
at com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:58)
at com.atlassian.tunnel.tunnel.server.TunnelServer.run(TunnelServer.java:54)
at java.lang.Thread.run(Thread.java:662)
Any idea for a workaround?
We (Atlassian Build Engineering) have created a set of plugins to run a number Docker based agents in a cluster (ECS) that come online, build a single job and then exit. It should be able to do what you outlined. We've recently open sourced the solution.
See https://bitbucket.org/atlassian/per-build-container for more details.
Amazon instances are historically bad providing I/O capacity (I am assuming you mean network I/O) per dollar as they tend to be optimized more for CPU and Memory intensive workloads. You may find that additional processes on the same node may not help.
If you install your docker image on a node and take a snapshot to create an AMI after the image is installed, you can launch as many ec2 instances with that AMI as you want. They will have the image preinstalled.
You can also use CloudFormation and/or Cloud Init to recompile or download your image on each Ec2 instance without having to worry about manually moving around docker image.
However, if you do want to run more than one bamboo agent on a node you should be able too as longs as you set the bamboo.home parameter differently for each agent instance.
java -Dbamboo.home=/agent1Home -jar atlassian-bamboo-agent-installer-X.X-SNAPSHOT.jar \
http://bamboo-host-server:8085/agentServer/
java -Dbamboo.home=/agent2Home -jar atlassian-bamboo-agent-installer-X.X-SNAPSHOT.jar \
http://bamboo-host-server:8085/agentServer/
Summary:
Installed standalone sonar
Started through /etc/init.d/sonar start
sonar.log doesn't show any error
unable to open http://mymachine.ipaddress:9000/sonar
GET http://mymachine.ipaddress:9000/sonar net::ERR_CONNECTION_TIMED_OUT
I am trying to run a standalone sonar on a remote machine running CentOS 6.5.
Following: http://sonar-pkg.sourceforge.net/ - installed through:
yum install sonar
I've set up a remote database connection to MySQL instance, already set up with the 'sonar' database and user as described in: http://docs.sonarqube.org/display/SONAR/Installing
Modified sonar.properties configuration:
sonar.jdbc.url=jdbc:mysql://<mysql.ipaddress>:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
Initially - I only changed the jdbc connection, sonar started fine but I am unable to open sonar web http://mymachine.ipaddress:9000/
Based on:
Sonar can be accessed locally but not accessed elsewhere
Unable to open remotely installed sonar on a browser
I updated more properties:
sonar.web.host=<mymachine.ipaddress>
sonar.web.context=/sonar
sonar.web.port=9000
and run sonar again
/etc/init.d/sonar start
Sonar started fine, but still unable to access it through browser.
Going to http://mymachine.ipaddress:9000/sonar gives: "This webpage is not available"
GET http://mymachine.ipaddress:9000/sonar net::ERR_CONNECTION_TIMED_OUT
sonar.log:
--> Wrapper Started as Daemon Launching a JVM... Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2014.10.01 14:30:18 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre/bin/java -Xmx256m
-Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djava.io.tmpdir=/opt/sonar/temp -cp ./lib/common/:./lib/search/ org.sonar.search.SearchServer
/tmp/sq-process2719628111769939329properties
2014.10.01 14:30:18 WARN sea[o.s.p.ProcessEntryPoint] Starting search
2014.10.01 14:30:18 INFO sea[o.s.s.SearchServer] Starting ES[sonarqube] on port: 9001
2014.10.01 14:30:18 INFO sea[o.elasticsearch.node] [sonar-1412188217506] version[1.1.2], pid[329],
build[e511f7b/2014-05-22T12:27:39Z]
2014.10.01 14:30:18 INFO sea[o.elasticsearch.node] [sonar-1412188217506] initializing ...
2014.10.01 14:30:18 INFO sea[o.e.plugins] [sonar-1412188217506] loaded [], sites []
2014.10.01 14:30:20 INFO sea[o.elasticsearch.node] [sonar-1412188217506] initialized
2014.10.01 14:30:20 INFO sea[o.elasticsearch.node] [sonar-1412188217506] starting ...
2014.10.01 14:30:20 INFO sea[o.e.transport] [sonar-1412188217506] bound_address {inet[/0.0.0.0:9001]}, publish_address
{inet[/:9001]}
2014.10.01 14:30:23 INFO sea[o.e.cluster.service] [sonar-1412188217506] new_master
[sonar-1412188217506][k85f1MFxQgSy_aXegApX1g][CORPSTGCI01][inet[/:9001]]{rack_id=sonar-1412188217506},
reason: zen-disco-join (elected_as_master)
2014.10.01 14:30:23 INFO sea[o.e.discovery] [sonar-1412188217506] sonarqube/k85f1MFxQgSy_aXegApX1g
2014.10.01 14:30:25 INFO sea[o.e.gateway] [sonar-1412188217506] recovered [2] indices into cluster_state
2014.10.01 14:30:25 INFO sea[o.elasticsearch.node] [sonar-1412188217506] started
2014.10.01 14:30:31 INFO app[o.s.p.m.Monitor] Process[search] is up
2014.10.01 14:30:31 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre/bin/java -Xmx768m
-XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djava.io.tmpdir=/opt/sonar/temp -cp ./lib/common/:./lib/server/:/opt/sonar/lib/jdbc/mysql/mysql-connector-java-5.1.27.jar
org.sonar.server.app.WebServer
/tmp/sq-process7956510077635803069properties
2014.10.01 14:30:32 WARN web[o.s.p.ProcessEntryPoint] Starting web
2014.10.01 14:30:32 INFO web[o.s.s.app.Connectors] HTTP connector is enabled on port 9000
2014.10.01 14:30:32 INFO web[o.s.s.app.Webapp] Webapp directory: /opt/sonar/web
2014.10.01 14:30:33 INFO web[o.e.plugins] [sonar-1412188217506] loaded [], sites []
2014.10.01 14:30:34 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 4.5 / c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:34 INFO web[o.s.c.p.Database] Create JDBC datasource for
jdbc:mysql://10.0.30.204:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2014.10.01 14:30:36 INFO web[o.s.s.p.DefaultServerFileSystem] SonarQube home: /opt/sonar
2014.10.01 14:30:36 INFO web[org.sonar.INFO] Install plugins...
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Findbugs / 2.4 /
a334be36ba4374bb779255272c53fb08675ac2c2
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Duplications / 4.5 /
c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Core / 4.5 / c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Java / 2.4 / 7e7e6335211bb9c0ff9727065f43e7010cc3df91
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Database Cleaner / 4.5 /
c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin English Pack / 4.5 /
c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Email notifications / 4.5 /
c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:36 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Design / 4.5 / c8bb686cbee8e1dce3312ef253db76e7c0e3c0c7
2014.10.01 14:30:36 INFO web[org.sonar.INFO] Install plugins done: 88 ms
2014.10.01 14:30:36 INFO web[o.s.s.p.RailsAppsDeployer] Deploy Ruby on Rails applications
2014.10.01 14:30:36 INFO web[o.s.j.s.AbstractDatabaseConnector] Initializing Hibernate
2014.10.01 14:30:38 INFO web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (no
proxy)
2014.10.01 14:30:38 INFO web[org.sonar.INFO] Code colorizer, supported languages: java
2014.10.01 14:30:39 INFO web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
2014.10.01 14:30:39 INFO web[o.s.s.s.IndexSynchronizer] Starting DB to Index synchronization
2014.10.01 14:30:39 INFO web[o.s.s.s.BaseIndex] Index rules:rules has last update of Wed Oct 01 13:39:50 EDT 2014
2014.10.01 14:30:42 INFO web[o.s.s.s.BaseIndex] Index rules:activeRules has last update of Wed Oct 01 13:40:01 EDT 2014
2014.10.01 14:30:42 INFO web[o.s.s.s.BaseIndex] Index logs:sonarLogs has last update of Wed Dec 31 19:00:00 EST 1969
2014.10.01 14:30:44 INFO web[o.s.s.s.IndexSynchronizer] Synchronization done in 5413ms...
2014.10.01 14:30:44 INFO web[org.sonar.INFO] Deploy GWT plugins...
2014.10.01 14:30:44 INFO web[org.sonar.INFO] Deploy GWT plugins done: 0 ms
2014.10.01 14:30:44 INFO web[org.sonar.INFO] Load metrics...
2014.10.01 14:30:45 INFO web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions
2014.10.01 14:30:45 INFO web[org.sonar.INFO] Load metrics done: 441 ms
2014.10.01 14:30:45 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model...
2014.10.01 14:30:45 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model done: 31 ms
2014.10.01 14:30:45 INFO web[org.sonar.INFO] Register rules...
2014.10.01 14:30:47 INFO web[org.sonar.INFO] Register rules done: 2256 ms
2014.10.01 14:30:47 INFO web[o.s.s.q.RegisterQualityProfiles] Register Quality Profiles...
2014.10.01 14:30:49 INFO web[o.s.s.q.RegisterQualityProfiles] Register Quality Profiles done: 2235 ms
2014.10.01 14:30:49 INFO web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters...
2014.10.01 14:30:49 INFO web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters done: 4 ms
2014.10.01 14:30:49 INFO web[o.s.s.s.RegisterDashboards] Register dashboards...
2014.10.01 14:30:49 INFO web[o.s.s.s.RegisterDashboards] Register dashboards done: 9 ms
2014.10.01 14:30:49 INFO web[o.s.s.s.RegisterPermissionTemplates] Register permission templates...
2014.10.01 14:30:49 INFO web[o.s.s.s.RegisterPermissionTemplates] Register permission templates done: 2 ms
2014.10.01 14:30:49 INFO web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2014.10.01 14:30:50 INFO web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on OpenJDK 64-Bit Server VM
1.7.0_55-mockbuild_2014_04_16_12_11-b00 [linux-amd64]
2014.10.01 14:30:50 INFO web[jruby.rack] using a shared (threadsafe!) runtime
2014.10.01 14:31:09 INFO web[jruby.rack] keeping custom (config.logger) Rails logger instance
2014.10.01 14:31:32 INFO web[o.a.c.u.SessionIdGenerator] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took
[22,433] milliseconds.
2014.10.01 14:31:32 INFO web[o.s.s.app.Logging] Web server is started
2014.10.01 14:31:32 INFO app[o.s.p.m.Monitor] Process[web] is up
I got the exact same problem for 4.5. I even downgraded to 4.4 and got the same issue.
As far as I can tell, the newer versions use elastic search and that part is totally broken.
I downgraded to version 4.3.3 and it started OK (and I didn't have to do anything special to not lose the existing data in my mysql db - from 4.3.2)
I reviewed the logs in /logs and read connect refused to localhost:9092,
therefore I changed (first you must stop (Ctrl+C) Sonar Server) sonar.jdbc.url property in /conf/sonar.properties:
Before:
sonar.jdbc.url: jdbc:h2:tcp://localhost:9092/sonar
Modified:
sonar.jdbc.url: jdbc:h2:tcp://127.0.0.1:9092/sonar
If you have other problems, you should deactivate Java 8 in Windows (Control Panel > Java > user tab and system tab) and close all windows of control panel, then restart Windows.
Other additional steps if it's necessary:
edit sonar-runner\conf\sonar-runner.properties
modified property:
sonar.host.url=http://127.0.0.1:9000