Post

2 followers Follow
0
Avatar

Gemfire in Docker

I am trying to dockerize gemfire v8.2.1.  But when I try to start gemfire locator container, it seems to get stuck after printing the following message in the log file

Starting server location for Distribution Locator on a59ae1b4c981[10334]

After building my container, I start it using the following command:

docker run --rm -it \
-e INSTANCE_TYPE=locator \
-e ADDRESS=$(hostname -i) \
-p 10334:10334 \
-p 1099:1099 \
-p 7070:7070 \
-p 47001-47100:47001-47100 \
-v /opt/data/gemfire/generic/work:/var/gemfire/work \
-v /opt/data/gemfire/generic/logs:/var/gemfire/logs \
-v /opt/data/gemfire/generic/stats:/var/gemfire/stats \
-v /opt/data/gemfire/generic/conf:/etc/opt/gemfire \
gemfire8:latest bash

Once I am inside the container, I invoke the a script called "start"

Upon execution I see progress dots being printed on the console and the log file prints the message above and then everything is stuck.

At this point if I press Ctrl+C, then I see the following message get printed to console:

............................................^C

Broken out of wait... the Locator process will continue to startup in the background.

 

In the fine mode, the following message gets printed after "Starting server location for Distribution Locator on a59ae1b4c981[10334]" in the logs

 

fine 2016/09/23 22:31:16.910 GMT locator_DOCKER_HOST_IP <main> tid=0x1] TcpServer@394019287 join() invoked. Server thread=Thread[Distribution Locator on a59ae1b4c981[10334],5,Distribution locators]@1328705686;alive=true

[fine 2016/09/23 22:31:17.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] size of put result is 2 maps is {GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP=ObjectName = GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP, GemFire:type=Member,member=locator_DOCKER_HOST_IP=ObjectName = GemFire:type=Member,member=locator_DOCKER_HOST_IP} proxyResult is null

[fine 2016/09/23 22:31:17.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] recording bulkOp start for ThreadId[192.168.255.3(locator_DOCKER_HOST_IP:locator)<ec><v0>:47052; thread 1]

[fine 2016/09/23 22:31:17.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] putAll GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP -> ObjectName = GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP

[fine 2016/09/23 22:31:17.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] putAll GemFire:type=Member,member=locator_DOCKER_HOST_IP -> ObjectName = GemFire:type=Member,member=locator_DOCKER_HOST_IP

[fine 2016/09/23 22:31:19.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] size of put result is 2 maps is {GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP=ObjectName = GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP, GemFire:type=Member,member=locator_DOCKER_HOST_IP=ObjectName = GemFire:type=Member,member=locator_DOCKER_HOST_IP} proxyResult is null

[fine 2016/09/23 22:31:19.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] recording bulkOp start for ThreadId[192.168.255.3(locator_DOCKER_HOST_IP:locator)<ec><v0>:47052; thread 1]

[fine 2016/09/23 22:31:19.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] putAll GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP -> ObjectName = GemFire:service=Locator,type=Member,member=locator_DOCKER_HOST_IP

[fine 2016/09/23 22:31:19.687 GMT locator_DOCKER_HOST_IP <Management Task> tid=0x33] putAll GemFire:type=Member,member=locator_DOCKER_HOST_IP -> ObjectName = GemFire:type=Member,member=locator_DOCKER_HOST_IP

Any pointer what could be going on? Let me know what level of details are needed from me to be able debug this.

Abhijat Upadhyay

Please sign in to leave a comment.

3 comments

0
Avatar

>Abhijat,

For this kind of symptom: endless of dot when using gfsh to start locator/cacheserver, it seems to be gemfire known issue: https://issues.apache.org/jira/browse/GEODE-1387.

............................................

 

You can refer the below knowledge and add tools.jar to gfsh's classpath parameter, then restart the gemfire service to see any change.

https://discuss.pivotal.io/hc/en-us/articles/223525728-GFSH-hang-issue-when-using-gfsh-start-or-gfsh-status-command

Jacky Xu 0 votes
0
Avatar

Thanks Jacky. Is there a way for me to check if tools.jar is in my classpath when I start locator using the command line?

I generally do 

gfsh start locator <my locator startup parameters>

When the log file is created, I do not see any I see the following property that is printed there:

sun.boot.class.path = /opt/jdk1.8.0_102/jre/lib/resources.jar:/opt/jdk1.8.0_102/jre/lib/rt.jar:/opt/jdk1.8.0_102/jre/lib/sunrsasign.jar:/opt/jdk1.8.0_102/jre/lib/jsse.jar:/opt/jdk1.8.0_102/jre/lib/jce.jar:/opt/jdk1.8.0_102/jre/lib/charsets.jar:/opt/jdk1.8.0_102/jre/lib/jfr.jar:/opt/jdk1.8.0_102/jre/classes

But I do not see tools.jar in there. Do I need to add tools.jar explicitly in my classpath? If yes then how do I do  that? 

 

Abhijat Upadhyay 0 votes
-1
Avatar

A typical start locator command looks like this for me:

gfsh start locator --name=mylocator \
--dir=/var/gemfire/work \
--hostname-for-clients=hostname.for.clients \
--properties-file=/etc/gemfire/defaults/gemfire.properties \
--J=-Dgemfire.enable-cluster-configuration=false,-Dgemfire.use-cluster-configuration=false,-Dgemfire.ALLOW_PERSISTENT_TRANSACTIONS=true,-Dgemfire.Query.VERBOSE=true,-Dgemfire.deploy-working-dir=/var/gemfire/work,-Dgemfire.log-file=/var/gemfire/logs/locator.log,-Dgemfire.statistic-archive-file=/var/gemfire/stats/locator.gfs.gz,-Dgemfire.jmx-manager-hostname-for-clients=100.78.20.104,-Djava.rmi.server.hostname=100.78.20.104,-Xms1g,-Xmx1g,-XX:NewSize=128M,-XX:MaxNewSize=128M,-XX:+UnlockDiagnosticVMOptions,-XX:ParGCCardsPerStrideChunk=4096,-XX:+UseNUMA,-XX:+PerfDisableSharedMem,-XX:+UseCompressedOops,-XX:+DisableExplicitGC,-XX:+UseParNewGC,-XX:+UseConcMarkSweepGC,-XX:+UseCMSInitiatingOccupancyOnly,-XX:CMSInitiatingOccupancyFraction=50,-XX:+CMSClassUnloadingEnabled,-XX:+CMSScavengeBeforeRemark,-XX:+PrintGCDetails,-XX:+PrintGCDateStamps,-XX:+PrintGCApplicationStoppedTime,-XX:+PrintGCApplicationConcurrentTime,-XX:+PrintTenuringDistribution,-XX:+PrintGCTimeStamps,-XX:+PrintCompressedOopsMode,-verbose:gc,-Xloggc:/var/gemfire/logs/gc.log,-XX:+UseGCLogFileRotation,-XX:NumberOfGCLogFiles=10,-XX:GCLogFileSize=50M

 

Abhijat Upadhyay -1 votes