Stefan Lecho
Stefan Lecho

Reputation: 11

geode: "create region" is not available. Reason: Requires connection

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.

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

Upvotes: 1

Views: 2121

Answers (3)

Kirk Lund
Kirk Lund

Reputation: 116

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.

Upvotes: 4

Shuvro Das
Shuvro Das

Reputation: 71

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?

Upvotes: 1

Swapnil
Swapnil

Reputation: 1301

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]

Upvotes: 1

Related Questions