1

I've followed the instructions on https://cwiki.apache.org/confluence/display/GEODE/Index#Index-Geodein5minutes an started a locator and a server. When I try to create a region, I get an error message: ""create region" is not available. Reason: Requires connection.".

Could you please help me with a solution ?

I'm running my locator, my server and the region in 3 separate windows.

  • OS: Windows7-64bit
  • Java: build 1.8.0_25-b18

Last entry in locator.log: [info 2015/09/30 17:16:51.703 CEST locator tid=0x51] Cluster configuration service start up completed successfully and is now running ....

Last entry in server.log: [info 2015/09/30 17:21:28.046 CEST server tid=0x1] CacheServer Configuration: port=40404 max-connections=800 max-threads=0 notify-by-subscription=true socket-buffer-size=32768 maximum-time-between-pings=60000 maximum-message-count=230000 message-time-to-live=180 eviction-policy=none capacity=1 overflow directory=. groups=[] loadProbe=ConnectionCountProbe loadPollInterval=5000 tcpNoDelay=true

3 Answers3

4

The reason you're not seeing the same results as described in Geodein5minutes is that you're using three separate windows. Geodein5minutes describes using one single window.

Below shows going through Geodein5minutes with a couple extra commands such as "list members" and "list region" to illustrate.


    C:\geode\gemfire-assembly\build\install\apache-geode>.\bin\gfsh.bat
        _________________________     __
       / _____/ ______/ ______/ /____/ /
      / /  __/ /___  /_____  / _____  /
     / /__/ / ____/  _____/ / /    / /
    /______/_/      /______/_/    /_/    v1.0.0-incubating-SNAPSHOT

    Monitor and Manage GemFire
    gfsh>start locator --name=locator
    Starting a GemFire Locator in C:\geode\gemfire-assembly\build\install\
    apache-geode\locator...
    ...............................
    Locator in C:\geode\gemfire-assembly\build\install\apache-geode\locato
    r on klund-e6420.vmware.com[10334] as locator is currently online.
    Process ID: 1800
    Uptime: 16 seconds
    GemFire Version: 1.0.0-incubating-SNAPSHOT
    Java Version: 1.8.0_45
    Log File: C:\geode\gemfire-assembly\build\install\apache-geode\locator
    \locator.log
    JVM Arguments: -Dgemfire.enable-cluster-configuration=true -Dgemfire.load-cluste
    r-configuration-from-dir=false -Dgemfire.launcher.registerSignalHandlers=true -D
    java.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
    Class-Path: C:\geode\gemfire-assembly\build\install\apache-geode\lib\g
    emfire-core-1.0.0-incubating-SNAPSHOT.jar;C:\geode\gemfire-assembly\bu
    ild\install\apache-geode\lib\gemfire-core-dependencies.jar

    Successfully connected to: [host=klund-e6420.vmware.com, port=1099]

    Cluster configuration service is up and running.

    gfsh>list members
     Name   | Id
    ------- | ------------------------------------------
    locator | klund-e6420(locator:1800:locator):1987

    gfsh>start server --name=server
    Starting a GemFire Server in C:\geode\gemfire-assembly\build\install\a
    pache-geode\server...
    .......
    Server in C:\geode\gemfire-assembly\build\install\apache-geode\server
    on klund-e6420.vmware.com[40404] as server is currently online.
    Process ID: 5412
    Uptime: 4 seconds
    GemFire Version: 1.0.0-incubating-SNAPSHOT
    Java Version: 1.8.0_45
    Log File: C:\geode\gemfire-assembly\build\install\apache-geode\server\
    server.log
    JVM Arguments: -Dgemfire.default.locators=10.118.33.206[10334] -Dgemfire.use-clu
    ster-configuration=true -XX:OnOutOfMemoryError=taskkill /F /PID %p -Dgemfire.lau
    ncher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.
    gcInterval=9223372036854775806
    Class-Path: C:\geode\gemfire-assembly\build\install\apache-geode\lib\g
    emfire-core-1.0.0-incubating-SNAPSHOT.jar;C:\geode\gemfire-assembly\bu
    ild\install\apache-geode\lib\gemfire-core-dependencies.jar

    gfsh>create region --name=region --type=REPLICATE
    Member | Status
    ------ | ------------------------------------
    server | Region "/region" created on "server"

    gfsh>list members
     Name   | Id
    ------- | ------------------------------------------
    locator | klund-e6420(locator:1800:locator):1987
    server  | klund-e6420(server:5412):65511

    gfsh>list regions
    List of regions
    ---------------
    region

    gfsh>

After I started the locator, I typed "list members" which shows that GFSH autoconnected to the locator I just started. In the same GFSH window, I then proceed to start the server.

If you want to use separate GFSH windows you can, but you'll need to use the connect command in the other windows.

Kirk Lund
  • 106
  • 6
  • 1
    I need to use separate windows, because after "start locator --name=locator" I do not get my prompt back. All I see is "Starting a GemFire Locator in ........................................." – Stefan Lecho Oct 02 '15 at 06:09
  • That was a bug that was fixed in GemFire 8.2 and Apache Geode. GFSH consumes the stdout/stderr of the launched process, but calls to BufferedReader.readLine() will block on Windows until the process departs. We changed it to be non-blocking. Try it in GemFire 8.2 or with Geode and you'll see it correctly return to the prompt. – Kirk Lund Oct 02 '15 at 16:01
  • Was this fixed recently, because I did a git clone of https://github.com/apache/incubator-geode/ last Wednesday ? – Stefan Lecho Oct 05 '15 at 07:16
  • I am using `gfsh>start locator --name=locator1`.. the prompt doesn't come back... I don't see any further movement in the log file either. – Divs Jul 05 '17 at 11:56
1

When gfsh starts, you have to point it to a running locator using the connect command, so that you can create regions etc. The following is an example:

gfsh>connect --locator=localhost[10334]
Swapnil
  • 1,191
  • 7
  • 8
  • This helps, but now I'm having another issue when creating a region: "No caching members found". BTW: it might be interesting to add this required step on https://cwiki.apache.org/confluence/display/GEODE/Index#Index-Geodein5minutes – Stefan Lecho Oct 01 '15 at 06:20
1

What is the output when you do "list members" in gfsh. gfsh>connect --locator=localhost[10334] list members

are the locator and server are in same host?

Shuvro Das
  • 71
  • 2