accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Accessing Accumulo from a different machine
Date Tue, 17 Feb 2015 22:23:16 GMT
If you're using the same exact code on both machines, it sounds like you might have something
unexpected going on with your networking.

Accumulo can share ZooKeeper and HDFS instances -- it uses the notion of an InstanceID to
do this. The InstanceID is a UUID assigned to an Accumulo instance during `accumulo init`.
Because a UUID is hard to memorize, and you need to identify the Accumulo instance you want
to connect to in the client API, there is also a mapping of some 'easy-to-remember' name to
that UUID. For example 'daves_accumulo' maps to '12345678-1234-1234-123456789012'.

The error you're seeing is because the UUID your client found from the `instanceName` is different
than the instanceID the Accumulo server has. A quick sanity check is to look at ZooKeeper:

zkCli.sh -server your_zk_host:2181
> get /accumulo/instances/your_instance_name

Compare the value of that node (first line of output) with the instance ID displayed on the
Accumulo monitor (top of the page). They should be the same.

I don't think I've ever seen this personally, so I'm not sure what to guess at how it happened.
It's possible you might have networking messed up and are talking to a different ZooKeeper
than you think you are (common problem if you have misconfigured a quorum and each ZK node
is acting independent instead of together). A quick fix would be to change the node in ZK
to the correct instance ID.

zkCli.sh -server your_zk_host:2181
> delete /accumulo/instances/your_instance_name
> create /accumulo/instances/your_instance_name instance_id_from_monitor

If that doesn't help, please give us some more information (versions you're using, how you
set up the system, anything special you did).

David Patterson wrote:
> I'm running a very simple test configuration with on Ubuntu 14 
> machine. If I run code on that machine I can read the data I've added.
>
> I'm only using column family name, (empty_text for the qualifier) and 
> a value -- no authorizations.
>
> When I run the exact same program (identical jar) on another Ubuntu 14 
> machine, I get
>
> org.apache.accumulo.core.client.AccumuloSecurityException: Error 
> INVALID_INSTANCEID for user dave - Unknown security exception
>         at 
> org.apache.accumulo.core.client.impl.ServerClient.execute(ServerClient.java:63)
>         at 
> org.apache.accumulo.core.client.impl.ConnectorImpl.<init>(ConnectorImpl.java:70)
>         at 
> org.apache.accumulo.core.client.ZooKeeperInstance.getConnector(ZooKeeperInstance.java:240)
>         at com.iai.diad.data.ImageDAO_A.<init>(ImageDAO_A.java:123)
>         at com.iai.diad.data.ImageDAO_A.main(ImageDAO_A.java:63)
> Caused by: ThriftSecurityException(user:dave, code:INVALID_INSTANCEID)
>
> The error occurs on the instance.getConnector call (the second line below)
>
>             instance = new ZooKeeperInstance(instanceName, zooServers);
>             connector = instance.getConnector( acUserName, new 
> PasswordToken( acPassword));
>
> One possible source for strangeness is that both of these machines are 
> on a cloud server. Each of them has 2 ip addresses -- one that is 
> available from the outside, and one that is available only inside the 
> cloud. I'm using the outside-the-cloud ip address in the zooServers 
> string.
>
> The /etc/hosts file on the machine with the Accumulo data has the 
> external ip address as the name of the machine. It also has 127.0.0.1 
> defined as localhost.
>
> Any suggestions?
>
> Dave Patterson
>

Mime
View raw message