You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by Jason Axelson <ja...@referentia.com> on 2012/01/13 02:34:04 UTC
Unable to connect to remote Accumulo instance via Java
I have an Accumulo instance setup (with everything running on one
host) and I'm able to connect locally through the Accumulo shell.
However from a remote machine I get the following error:
12/01/12 14:21:03 WARN impl.ServerClient: Failed to find an available
server in the list of servers: [127.0.0.1:9997:9997 (120000),
localhost:9999:9999 (120000)]
This is roughly the code that I'm using:
new ZooKeeperInstance(instanceName, zooServers).getConnector(user, password);
Any ideas? Seems like some type of setup flaw.
Jason
Re: Unable to connect to remote Accumulo instance via Java
Posted by John W Vines <jo...@ugov.gov>.
----- Original Message -----
| From: "Jason Axelson" <ja...@referentia.com>
| To: accumulo-user@incubator.apache.org
| Sent: Thursday, January 12, 2012 10:26:19 PM
| Subject: Re: Unable to connect to remote Accumulo instance via Java
| Hi John,
|
| That overall idea does seem very plausible. Assuming you're talking
| about the conf/slaves file after putting the IP address in there
| (similar to 192.168.11.5)
After you made your changes to slaves, did you restart? If you didn't, then still IDs itself as the former name. (For a bit of clarification on my previous post, it will attempt to grab the IP which resolves to the name given in slaves, so if you use a name which locally resolves to 127.0.0.1 you will see this behavior).
|
| Now in the remote shell I am missing one of the entries: 16:54:02,898
| [impl.ServerClient] WARN : Failed to find an available server in the
| list of servers: [localhost:9999:9999 (120000)]
That message you are seeing on port 9999 is a similar problem, but with the master instead of tservers. Do the same change in your master file.
|
| I get the following error in logs/tserver_192.168.1.5.err:
|
| dirname: missing operand
| Try 'dirname --help' for more information. twice
|
| Additionally logs/tserver_192.168.1.5.out has:
| ZOOKEEPER_HOME is not set. Please make sure it's set globally or in
| conf/accumulo-env.sh
|
These two errors are a result of the remote server not knowing where to find Zookeeper. Make sure you set ZOOKEEPER_HOME in accumulo-env.sh (or globally).
| I'm partially worried that this is because we are currently using
| Version: 1.5.0-incubating-SNAPSHOT so I'm planning to try with the
| stable version as well.
So far I don't think that this is trunk related, but you are on the bleeding edge by running on it.
John
|
| Jason
|
| On Thu, Jan 12, 2012 at 4:35 PM, John W Vines <jo...@ugov.gov>
| wrote:
| > How did you declare your slaves on the machine? I believe if you
| > list localhost/127.0.0.1 in your slaves, it will attempt to use that
| > IP. This means when your remote client code hits ZooKeeper to find
| > the server locations, it will get localhost/127.0.01, which it can't
| > access externally. Try changing your slaves file to actual machine
| > names/IP addresses.
| >
| > John
| >
| > ----- Original Message -----
| > | From: "Jason Axelson" <ja...@referentia.com>
| > | To: accumulo-user@incubator.apache.org
| > | Sent: Thursday, January 12, 2012 8:34:04 PM
| > | Subject: Unable to connect to remote Accumulo instance via Java
| > | I have an Accumulo instance setup (with everything running on one
| > | host) and I'm able to connect locally through the Accumulo shell.
| > |
| > | However from a remote machine I get the following error:
| > |
| > | 12/01/12 14:21:03 WARN impl.ServerClient: Failed to find an
| > | available
| > | server in the list of servers: [127.0.0.1:9997:9997 (120000),
| > | localhost:9999:9999 (120000)]
| > |
| > | This is roughly the code that I'm using:
| > | new ZooKeeperInstance(instanceName, zooServers).getConnector(user,
| > | password);
| > |
| > | Any ideas? Seems like some type of setup flaw.
| > |
| > | Jason
Re: Unable to connect to remote Accumulo instance via Java
Posted by Jason Axelson <ja...@referentia.com>.
Hi John,
That overall idea does seem very plausible. Assuming you're talking
about the conf/slaves file after putting the IP address in there
(similar to 192.168.11.5)
Now in the remote shell I am missing one of the entries: 16:54:02,898
[impl.ServerClient] WARN : Failed to find an available server in the
list of servers: [localhost:9999:9999 (120000)]
I get the following error in logs/tserver_192.168.1.5.err:
dirname: missing operand
Try 'dirname --help' for more information. twice
Additionally logs/tserver_192.168.1.5.out has:
ZOOKEEPER_HOME is not set. Please make sure it's set globally or in
conf/accumulo-env.sh
I'm partially worried that this is because we are currently using
Version: 1.5.0-incubating-SNAPSHOT so I'm planning to try with the
stable version as well.
Jason
On Thu, Jan 12, 2012 at 4:35 PM, John W Vines <jo...@ugov.gov> wrote:
> How did you declare your slaves on the machine? I believe if you list localhost/127.0.0.1 in your slaves, it will attempt to use that IP. This means when your remote client code hits ZooKeeper to find the server locations, it will get localhost/127.0.01, which it can't access externally. Try changing your slaves file to actual machine names/IP addresses.
>
> John
>
> ----- Original Message -----
> | From: "Jason Axelson" <ja...@referentia.com>
> | To: accumulo-user@incubator.apache.org
> | Sent: Thursday, January 12, 2012 8:34:04 PM
> | Subject: Unable to connect to remote Accumulo instance via Java
> | I have an Accumulo instance setup (with everything running on one
> | host) and I'm able to connect locally through the Accumulo shell.
> |
> | However from a remote machine I get the following error:
> |
> | 12/01/12 14:21:03 WARN impl.ServerClient: Failed to find an available
> | server in the list of servers: [127.0.0.1:9997:9997 (120000),
> | localhost:9999:9999 (120000)]
> |
> | This is roughly the code that I'm using:
> | new ZooKeeperInstance(instanceName, zooServers).getConnector(user,
> | password);
> |
> | Any ideas? Seems like some type of setup flaw.
> |
> | Jason
Re: Unable to connect to remote Accumulo instance via Java
Posted by John W Vines <jo...@ugov.gov>.
How did you declare your slaves on the machine? I believe if you list localhost/127.0.0.1 in your slaves, it will attempt to use that IP. This means when your remote client code hits ZooKeeper to find the server locations, it will get localhost/127.0.01, which it can't access externally. Try changing your slaves file to actual machine names/IP addresses.
John
----- Original Message -----
| From: "Jason Axelson" <ja...@referentia.com>
| To: accumulo-user@incubator.apache.org
| Sent: Thursday, January 12, 2012 8:34:04 PM
| Subject: Unable to connect to remote Accumulo instance via Java
| I have an Accumulo instance setup (with everything running on one
| host) and I'm able to connect locally through the Accumulo shell.
|
| However from a remote machine I get the following error:
|
| 12/01/12 14:21:03 WARN impl.ServerClient: Failed to find an available
| server in the list of servers: [127.0.0.1:9997:9997 (120000),
| localhost:9999:9999 (120000)]
|
| This is roughly the code that I'm using:
| new ZooKeeperInstance(instanceName, zooServers).getConnector(user,
| password);
|
| Any ideas? Seems like some type of setup flaw.
|
| Jason