Re: Connecting java client to Accumulo VM

2017-11-09 Thread Geoffry Roberts
Thanks for the best practice advice wrt accumulo-env.sh.  I was using
.profile because Hadoop finds it well enough.


On Thu, Nov 9, 2017 at 12:04 PM, Josh Elser  wrote:

> +1 to Christopher's assessment of the JAVA_HOME issue.
>
> A bit more color if you find it interesting: Accumulo tends to do a bit of
> SSH'ing in starting up processes (this has gotten better in the 1.8 or 2.0
> scripts). As such, it's a best-practice to explicitly set environment
> variables you need in accumulo-env.sh.
>
> On 11/9/17 11:52 AM, Christopher wrote:
>
>> So, Accumulo TServers publish their hostname from their config into the
>> Accumulo metadata. So, yes, this hostname must be reachable by clients as
>> well, because that's how clients will identify it in the Accumulo metadata.
>>
>> I'm not sure what the deal was with the JAVA_HOME variable. It's probably
>> one of the launch scripts which ssh'd to the hostname in the config to
>> start the tserver. When it's set to localhost, it probably doesn't ssh, but
>> just starts it directly. My guess is that .profile is not read when ssh'ing
>> because it's not creating a logon session and instead just executing the
>> given command. You could try putting it in .bashrc instead (assuming your
>> default shell is bash).
>>
>> On Thu, Nov 9, 2017 at 11:42 AM Geoffry Roberts > > wrote:
>>
>> All,
>>
>> Muchas gracias for the help.
>>
>> When I had masters/slaves populated with "localhost", 9997 was
>> listening but not remotely.  When I had m/s populated with the IP
>> address,  9997 was not listening and the log said JAVA_HOME was not
>> set and that I should set it in accumulo-env.sh.  I did that and
>> 9997 began listening remotely and was accessible.  Let us then,
>> declare victory.
>>
>> Two points, however, I should like to pass along:
>>
>>  1. Why the problem with JAVA_HOME?  I have JAVA_HOME set in
>> .profile.  When m/s is "localhost" no problem; but when
>> "hostname" (from /etc/hosts), big problem.
>>  2. Before I could get my remote client to connect, I had to make a
>> mirror entry in the host's /etc/hosts file.  i.e. Both host and
>> guest machines needed the same entry.  This is because the
>> client tries to work with the name from the guest's /etc/hosts
>> and not the IP.
>> Anyhow, I am off to the races with Accumulo.
>>
>> On Wed, Nov 8, 2017 at 5:49 PM, Edward Gleeck > > wrote:
>>
>> Yep should work. would suggest checking the logs at this point
>> to see  what’s causing the failure.  If it’s not starting up
>> there would be exceptions thrown by the service.
>>
>> On Wed, Nov 8, 2017 at 5:36 PM Geoffry Roberts
>> > wrote:
>>
>> I tried the IP address (a 192 number) but the same
>> result--no 9997.  Using said IP I can access from either the
>> host or from within the guest.
>>
>> So far nothing works in master/slaves except localhost.
>>
>> I gather this is supposed to work correct?
>>
>> On Wed, Nov 8, 2017 at 5:16 PM, Edward Gleeck
>> > wrote:
>>
>> You wouldn't want the 0.0.0.0 on your /etc/hosts as this
>> wouldn't be valid. I don't recall exactly which
>> configuration file under $ACCUMULO_CONF_DIR you would
>> want this in as Josh pointed out, but if you were to go
>> the /etc/host route, you want to put the IP address of
>> that interface VM host. for example /etc/hosts:
>>
>> 192.168.56.101 localhost localhost.localdomain
>>
>> HTH
>>
>>
>>
>> On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts
>> >
>> wrote:
>>
>> I gave your suggestion a try.  I made an entry in
>> /etc/hosts that resolves to 0.0.0.0 then set that
>> name in master and slaves.  (I am running single
>> node for now.). The upshot is port 9997 does not
>> appear as listening at all.  If I change back to
>> localhost, then it appears again.   My guess is the
>> tablet server only starts when it's port is localhost.
>>
>> Am I using Accumulo correctly?  Is it not designed
>> to be accessed remotely?
>>
>>
>> On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser
>> >
>>
>> wrote:
>>
>> Accumulo chooses the network interface to bind

Re: Connecting java client to Accumulo VM

2017-11-09 Thread Josh Elser

+1 to Christopher's assessment of the JAVA_HOME issue.

A bit more color if you find it interesting: Accumulo tends to do a bit 
of SSH'ing in starting up processes (this has gotten better in the 1.8 
or 2.0 scripts). As such, it's a best-practice to explicitly set 
environment variables you need in accumulo-env.sh.


On 11/9/17 11:52 AM, Christopher wrote:
So, Accumulo TServers publish their hostname from their config into the 
Accumulo metadata. So, yes, this hostname must be reachable by clients 
as well, because that's how clients will identify it in the Accumulo 
metadata.


I'm not sure what the deal was with the JAVA_HOME variable. It's 
probably one of the launch scripts which ssh'd to the hostname in the 
config to start the tserver. When it's set to localhost, it probably 
doesn't ssh, but just starts it directly. My guess is that .profile is 
not read when ssh'ing because it's not creating a logon session and 
instead just executing the given command. You could try putting it in 
.bashrc instead (assuming your default shell is bash).


On Thu, Nov 9, 2017 at 11:42 AM Geoffry Roberts > wrote:


All,

Muchas gracias for the help.

When I had masters/slaves populated with "localhost", 9997 was
listening but not remotely.  When I had m/s populated with the IP
address,  9997 was not listening and the log said JAVA_HOME was not
set and that I should set it in accumulo-env.sh.  I did that and
9997 began listening remotely and was accessible.  Let us then,
declare victory.

Two points, however, I should like to pass along:

 1. Why the problem with JAVA_HOME?  I have JAVA_HOME set in
.profile.  When m/s is "localhost" no problem; but when
"hostname" (from /etc/hosts), big problem.
 2. Before I could get my remote client to connect, I had to make a
mirror entry in the host's /etc/hosts file.  i.e. Both host and
guest machines needed the same entry.  This is because the
client tries to work with the name from the guest's /etc/hosts
and not the IP. 


Anyhow, I am off to the races with Accumulo.

On Wed, Nov 8, 2017 at 5:49 PM, Edward Gleeck > wrote:

Yep should work. would suggest checking the logs at this point
to see  what’s causing the failure.  If it’s not starting up
there would be exceptions thrown by the service.

On Wed, Nov 8, 2017 at 5:36 PM Geoffry Roberts
> wrote:

I tried the IP address (a 192 number) but the same
result--no 9997.  Using said IP I can access from either the
host or from within the guest.

So far nothing works in master/slaves except localhost.

I gather this is supposed to work correct?

On Wed, Nov 8, 2017 at 5:16 PM, Edward Gleeck
> wrote:

You wouldn't want the 0.0.0.0 on your /etc/hosts as this
wouldn't be valid. I don't recall exactly which
configuration file under $ACCUMULO_CONF_DIR you would
want this in as Josh pointed out, but if you were to go
the /etc/host route, you want to put the IP address of
that interface VM host. for example /etc/hosts:

192.168.56.101 localhost localhost.localdomain

HTH



On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts
>
wrote:

I gave your suggestion a try.  I made an entry in
/etc/hosts that resolves to 0.0.0.0 then set that
name in master and slaves.  (I am running single
node for now.). The upshot is port 9997 does not
appear as listening at all.  If I change back to
localhost, then it appears again.   My guess is the
tablet server only starts when it's port is localhost.

Am I using Accumulo correctly?  Is it not designed
to be accessed remotely?


On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser
>
wrote:

Accumulo chooses the network interface to bind
given the resolution of the hostname that you
provide in the "hosts" files in ACCUMULO_CONF_DIR.

If you have "localhost" (the default) still in
the files (e.g. masters, slaves), this
presumably resolves to 127.0.0.1 which will
result in Accumulo not accepting connections

Re: Connecting java client to Accumulo VM

2017-11-09 Thread Christopher
So, Accumulo TServers publish their hostname from their config into the
Accumulo metadata. So, yes, this hostname must be reachable by clients as
well, because that's how clients will identify it in the Accumulo metadata.

I'm not sure what the deal was with the JAVA_HOME variable. It's probably
one of the launch scripts which ssh'd to the hostname in the config to
start the tserver. When it's set to localhost, it probably doesn't ssh, but
just starts it directly. My guess is that .profile is not read when ssh'ing
because it's not creating a logon session and instead just executing the
given command. You could try putting it in .bashrc instead (assuming your
default shell is bash).

On Thu, Nov 9, 2017 at 11:42 AM Geoffry Roberts 
wrote:

> All,
>
> Muchas gracias for the help.
>
> When I had masters/slaves populated with "localhost", 9997 was listening
> but not remotely.  When I had m/s populated with the IP address,  9997 was
> not listening and the log said JAVA_HOME was not set and that I should set
> it in accumulo-env.sh.  I did that and 9997 began listening remotely and
> was accessible.  Let us then, declare victory.
>
> Two points, however, I should like to pass along:
>
>
>1. Why the problem with JAVA_HOME?  I have JAVA_HOME set in .profile.
>When m/s is "localhost" no problem; but when "hostname" (from /etc/hosts),
>big problem.
>2. Before I could get my remote client to connect, I had to make a
>mirror entry in the host's /etc/hosts file.  i.e. Both host and guest
>machines needed the same entry.  This is because the client tries to work
>with the name from the guest's /etc/hosts and not the IP.
>
> Anyhow, I am off to the races with Accumulo.
>
> On Wed, Nov 8, 2017 at 5:49 PM, Edward Gleeck  wrote:
>
>> Yep should work. would suggest checking the logs at this point to see
>>  what’s causing the failure.  If it’s not starting up there would be
>> exceptions thrown by the service.
>>
>> On Wed, Nov 8, 2017 at 5:36 PM Geoffry Roberts 
>> wrote:
>>
>>> I tried the IP address (a 192 number) but the same result--no 9997.
>>> Using said IP I can access from either the host or from within the guest.
>>>
>>> So far nothing works in master/slaves except localhost.
>>>
>>> I gather this is supposed to work correct?
>>>
>>> On Wed, Nov 8, 2017 at 5:16 PM, Edward Gleeck  wrote:
>>>
 You wouldn't want the 0.0.0.0 on your /etc/hosts as this wouldn't be
 valid. I don't recall exactly which configuration file under
 $ACCUMULO_CONF_DIR you would want this in as Josh pointed out, but if you
 were to go the /etc/host route, you want to put the IP address of that
 interface VM host. for example /etc/hosts:

 192.168.56.101 localhost localhost.localdomain

 HTH



 On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts  wrote:

> I gave your suggestion a try.  I made an entry in /etc/hosts that
> resolves to 0.0.0.0 then set that name in master and slaves.  (I am 
> running
> single node for now.). The upshot is port 9997 does not appear as 
> listening
> at all.  If I change back to localhost, then it appears again.   My guess
> is the tablet server only starts when it's port is localhost.
>
> Am I using Accumulo correctly?  Is it not designed to be accessed
> remotely?
>
>
>
> On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser 
> wrote:
>
>> Accumulo chooses the network interface to bind given the resolution
>> of the hostname that you provide in the "hosts" files in 
>> ACCUMULO_CONF_DIR.
>>
>> If you have "localhost" (the default) still in the files (e.g.
>> masters, slaves), this presumably resolves to 127.0.0.1 which will result
>> in Accumulo not accepting connections from your VM's network adapter.
>>
>> A quick hack would be to put "0.0.0.0" in those files instead of
>> "localhost". I think the Accumulo scripts only have the ability to 
>> override
>> the bound interface for the Monitor, not all processes, to be 0.0.0.0. 
>> You
>> could also use a hostname you define in /etc/hosts that binds to the 
>> proper
>> interface instead (which would be a bit more like reality).
>>
>> On 11/8/17 10:43 AM, Geoffry Roberts wrote:
>>
>>> All,
>>>
>>> I have used Accumulo before, but a few versions ago (1.5.1), maybe
>>> something has changed.  Also, I've never before run it in a VM.
>>>
>>> I am running Accumulo from withn a VM and attempting to connect from
>>> without.  I am getting a complaint regarding port 9997, which, within 
>>> the
>>> VM, is listening on 127.0.0.1:9997 .
>>> Apparently, I need to get it onto 0.0.0.0:9997 .
>>> Am I correct?
>>>
>>> Hadoop 2.6.2
>>> 

Re: Connecting java client to Accumulo VM

2017-11-09 Thread Geoffry Roberts
All,

Muchas gracias for the help.

When I had masters/slaves populated with "localhost", 9997 was listening
but not remotely.  When I had m/s populated with the IP address,  9997 was
not listening and the log said JAVA_HOME was not set and that I should set
it in accumulo-env.sh.  I did that and 9997 began listening remotely and
was accessible.  Let us then, declare victory.

Two points, however, I should like to pass along:


   1. Why the problem with JAVA_HOME?  I have JAVA_HOME set in .profile.
   When m/s is "localhost" no problem; but when "hostname" (from /etc/hosts),
   big problem.
   2. Before I could get my remote client to connect, I had to make a
   mirror entry in the host's /etc/hosts file.  i.e. Both host and guest
   machines needed the same entry.  This is because the client tries to work
   with the name from the guest's /etc/hosts and not the IP.

Anyhow, I am off to the races with Accumulo.

On Wed, Nov 8, 2017 at 5:49 PM, Edward Gleeck  wrote:

> Yep should work. would suggest checking the logs at this point to see
>  what’s causing the failure.  If it’s not starting up there would be
> exceptions thrown by the service.
>
> On Wed, Nov 8, 2017 at 5:36 PM Geoffry Roberts 
> wrote:
>
>> I tried the IP address (a 192 number) but the same result--no 9997.
>> Using said IP I can access from either the host or from within the guest.
>>
>> So far nothing works in master/slaves except localhost.
>>
>> I gather this is supposed to work correct?
>>
>> On Wed, Nov 8, 2017 at 5:16 PM, Edward Gleeck  wrote:
>>
>>> You wouldn't want the 0.0.0.0 on your /etc/hosts as this wouldn't be
>>> valid. I don't recall exactly which configuration file under
>>> $ACCUMULO_CONF_DIR you would want this in as Josh pointed out, but if you
>>> were to go the /etc/host route, you want to put the IP address of that
>>> interface VM host. for example /etc/hosts:
>>>
>>> 192.168.56.101 localhost localhost.localdomain
>>>
>>> HTH
>>>
>>>
>>>
>>> On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts 
>>> wrote:
>>>
 I gave your suggestion a try.  I made an entry in /etc/hosts that
 resolves to 0.0.0.0 then set that name in master and slaves.  (I am running
 single node for now.). The upshot is port 9997 does not appear as listening
 at all.  If I change back to localhost, then it appears again.   My guess
 is the tablet server only starts when it's port is localhost.

 Am I using Accumulo correctly?  Is it not designed to be accessed
 remotely?



 On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser 
 wrote:

> Accumulo chooses the network interface to bind given the resolution of
> the hostname that you provide in the "hosts" files in ACCUMULO_CONF_DIR.
>
> If you have "localhost" (the default) still in the files (e.g.
> masters, slaves), this presumably resolves to 127.0.0.1 which will result
> in Accumulo not accepting connections from your VM's network adapter.
>
> A quick hack would be to put "0.0.0.0" in those files instead of
> "localhost". I think the Accumulo scripts only have the ability to 
> override
> the bound interface for the Monitor, not all processes, to be 0.0.0.0. You
> could also use a hostname you define in /etc/hosts that binds to the 
> proper
> interface instead (which would be a bit more like reality).
>
> On 11/8/17 10:43 AM, Geoffry Roberts wrote:
>
>> All,
>>
>> I have used Accumulo before, but a few versions ago (1.5.1), maybe
>> something has changed.  Also, I've never before run it in a VM.
>>
>> I am running Accumulo from withn a VM and attempting to connect from
>> without.  I am getting a complaint regarding port 9997, which, within the
>> VM, is listening on 127.0.0.1:9997 .
>> Apparently, I need to get it onto 0.0.0.0:9997 .
>> Am I correct?
>>
>> Hadoop 2.6.2
>> Zookeeper 3.4.10
>> Accumulo 1.8.1
>> Thrift 0.10.0
>> Ubuntu 16.04 as a VBox guest
>> OSX 10.12.06 as the host
>>
>> The HAZ is running on the VM.  From the CLI I can connect with the
>> Zookeeper client and the Accumulo client.
>>
>> I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.
>>
>>  From the host, I can browse the Hadoop and Accumulo web pages.  I
>> can also connect using the Zookeeper client.  When I try to connect from
>> Java,  I am getting a successful connect to 2181, but it complains about
>> port 9997.
>>
>> The VM is showing all forwarded ports as listening on 0.0.0.0 <
>> http://0.0.0.0>: except for 127.0.0.1:9997 <
>> http://127.0.0.1:9997>.  As best I can tell Thrift needs the port.
>>
>> My connect code:
>>
>> String instance= properties.getProperty(ACCUMULO_INSTANCE);
>>
>> String uri = 

Re: Connecting java client to Accumulo VM

2017-11-08 Thread Edward Gleeck
Yep should work. would suggest checking the logs at this point to see
 what’s causing the failure.  If it’s not starting up there would be
exceptions thrown by the service.

On Wed, Nov 8, 2017 at 5:36 PM Geoffry Roberts 
wrote:

> I tried the IP address (a 192 number) but the same result--no 9997.  Using
> said IP I can access from either the host or from within the guest.
>
> So far nothing works in master/slaves except localhost.
>
> I gather this is supposed to work correct?
>
> On Wed, Nov 8, 2017 at 5:16 PM, Edward Gleeck  wrote:
>
>> You wouldn't want the 0.0.0.0 on your /etc/hosts as this wouldn't be
>> valid. I don't recall exactly which configuration file under
>> $ACCUMULO_CONF_DIR you would want this in as Josh pointed out, but if you
>> were to go the /etc/host route, you want to put the IP address of that
>> interface VM host. for example /etc/hosts:
>>
>> 192.168.56.101 localhost localhost.localdomain
>>
>> HTH
>>
>>
>>
>> On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts 
>> wrote:
>>
>>> I gave your suggestion a try.  I made an entry in /etc/hosts that
>>> resolves to 0.0.0.0 then set that name in master and slaves.  (I am running
>>> single node for now.). The upshot is port 9997 does not appear as listening
>>> at all.  If I change back to localhost, then it appears again.   My guess
>>> is the tablet server only starts when it's port is localhost.
>>>
>>> Am I using Accumulo correctly?  Is it not designed to be accessed
>>> remotely?
>>>
>>>
>>>
>>> On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser  wrote:
>>>
 Accumulo chooses the network interface to bind given the resolution of
 the hostname that you provide in the "hosts" files in ACCUMULO_CONF_DIR.

 If you have "localhost" (the default) still in the files (e.g. masters,
 slaves), this presumably resolves to 127.0.0.1 which will result in
 Accumulo not accepting connections from your VM's network adapter.

 A quick hack would be to put "0.0.0.0" in those files instead of
 "localhost". I think the Accumulo scripts only have the ability to override
 the bound interface for the Monitor, not all processes, to be 0.0.0.0. You
 could also use a hostname you define in /etc/hosts that binds to the proper
 interface instead (which would be a bit more like reality).

 On 11/8/17 10:43 AM, Geoffry Roberts wrote:

> All,
>
> I have used Accumulo before, but a few versions ago (1.5.1), maybe
> something has changed.  Also, I've never before run it in a VM.
>
> I am running Accumulo from withn a VM and attempting to connect from
> without.  I am getting a complaint regarding port 9997, which, within the
> VM, is listening on 127.0.0.1:9997 .
> Apparently, I need to get it onto 0.0.0.0:9997 .
> Am I correct?
>
> Hadoop 2.6.2
> Zookeeper 3.4.10
> Accumulo 1.8.1
> Thrift 0.10.0
> Ubuntu 16.04 as a VBox guest
> OSX 10.12.06 as the host
>
> The HAZ is running on the VM.  From the CLI I can connect with the
> Zookeeper client and the Accumulo client.
>
> I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.
>
>  From the host, I can browse the Hadoop and Accumulo web pages.  I can
> also connect using the Zookeeper client.  When I try to connect from Java,
>  I am getting a successful connect to 2181, but it complains about port
> 9997.
>
> The VM is showing all forwarded ports as listening on 0.0.0.0 <
> http://0.0.0.0>: except for 127.0.0.1:9997 <
> http://127.0.0.1:9997>.  As best I can tell Thrift needs the port.
>
> My connect code:
>
> String instance= properties.getProperty(ACCUMULO_INSTANCE);
>
> String uri = properties.getProperty(ZOOKEEPER_URI);
>
> Instance inst = new ZooKeeperInstance(instance, uri);
>
> String user = properties.getProperty(USER);
>
> String password = properties.getProperty(PASSWORD);
>
> AuthenticationToken token = new PasswordToken(password);
>
> conn = inst.getConnector(user, token);
>
>
> Errors from Java:
>
> 2017-11-08 09:50:55 INFO  ZooKeeper:438 - Initiating client
> connection, connectString=192.168.50.101:2181 <
> http://192.168.50.101:2181> sessionTimeout=3
> watcher=org.apache.accumulo.fate.zookeeper.ZooSession$ZooWatcher@4b013c76
>
> 2017-11-08 09:50:55 INFO  ClientCnxn:1032 - Opening socket connection
> to server 192.168.50.101/192.168.50.101:2181 <
> http://192.168.50.101/192.168.50.101:2181>. Will not attempt to
> authenticate using SASL (unknown error)
>
> 2017-11-08 09:50:55 INFO  ClientCnxn:876 - Socket connection
> established to 192.168.50.101/192.168.50.101:2181 <
> http://192.168.50.101/192.168.50.101:2181>, initiating session
>
> 2017-11-08 

Re: Connecting java client to Accumulo VM

2017-11-08 Thread Geoffry Roberts
I tried the IP address (a 192 number) but the same result--no 9997.  Using
said IP I can access from either the host or from within the guest.

So far nothing works in master/slaves except localhost.

I gather this is supposed to work correct?

On Wed, Nov 8, 2017 at 5:16 PM, Edward Gleeck  wrote:

> You wouldn't want the 0.0.0.0 on your /etc/hosts as this wouldn't be
> valid. I don't recall exactly which configuration file under
> $ACCUMULO_CONF_DIR you would want this in as Josh pointed out, but if you
> were to go the /etc/host route, you want to put the IP address of that
> interface VM host. for example /etc/hosts:
>
> 192.168.56.101 localhost localhost.localdomain
>
> HTH
>
>
>
> On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts 
> wrote:
>
>> I gave your suggestion a try.  I made an entry in /etc/hosts that
>> resolves to 0.0.0.0 then set that name in master and slaves.  (I am running
>> single node for now.). The upshot is port 9997 does not appear as listening
>> at all.  If I change back to localhost, then it appears again.   My guess
>> is the tablet server only starts when it's port is localhost.
>>
>> Am I using Accumulo correctly?  Is it not designed to be accessed
>> remotely?
>>
>>
>>
>> On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser  wrote:
>>
>>> Accumulo chooses the network interface to bind given the resolution of
>>> the hostname that you provide in the "hosts" files in ACCUMULO_CONF_DIR.
>>>
>>> If you have "localhost" (the default) still in the files (e.g. masters,
>>> slaves), this presumably resolves to 127.0.0.1 which will result in
>>> Accumulo not accepting connections from your VM's network adapter.
>>>
>>> A quick hack would be to put "0.0.0.0" in those files instead of
>>> "localhost". I think the Accumulo scripts only have the ability to override
>>> the bound interface for the Monitor, not all processes, to be 0.0.0.0. You
>>> could also use a hostname you define in /etc/hosts that binds to the proper
>>> interface instead (which would be a bit more like reality).
>>>
>>> On 11/8/17 10:43 AM, Geoffry Roberts wrote:
>>>
 All,

 I have used Accumulo before, but a few versions ago (1.5.1), maybe
 something has changed.  Also, I've never before run it in a VM.

 I am running Accumulo from withn a VM and attempting to connect from
 without.  I am getting a complaint regarding port 9997, which, within the
 VM, is listening on 127.0.0.1:9997 .
 Apparently, I need to get it onto 0.0.0.0:9997 .
 Am I correct?

 Hadoop 2.6.2
 Zookeeper 3.4.10
 Accumulo 1.8.1
 Thrift 0.10.0
 Ubuntu 16.04 as a VBox guest
 OSX 10.12.06 as the host

 The HAZ is running on the VM.  From the CLI I can connect with the
 Zookeeper client and the Accumulo client.

 I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.

  From the host, I can browse the Hadoop and Accumulo web pages.  I can
 also connect using the Zookeeper client.  When I try to connect from Java,
  I am getting a successful connect to 2181, but it complains about port
 9997.

 The VM is showing all forwarded ports as listening on 0.0.0.0 <
 http://0.0.0.0>: except for 127.0.0.1:9997 .
 As best I can tell Thrift needs the port.

 My connect code:

 String instance= properties.getProperty(ACCUMULO_INSTANCE);

 String uri = properties.getProperty(ZOOKEEPER_URI);

 Instance inst = new ZooKeeperInstance(instance, uri);

 String user = properties.getProperty(USER);

 String password = properties.getProperty(PASSWORD);

 AuthenticationToken token = new PasswordToken(password);

 conn = inst.getConnector(user, token);


 Errors from Java:

 2017-11-08 09:50:55 INFO  ZooKeeper:438 - Initiating client connection,
 connectString=192.168.50.101:2181 
 sessionTimeout=3 watcher=org.apache.accumulo.fa
 te.zookeeper.ZooSession$ZooWatcher@4b013c76

 2017-11-08 09:50:55 INFO  ClientCnxn:1032 - Opening socket connection
 to server 192.168.50.101/192.168.50.101:2181 <
 http://192.168.50.101/192.168.50.101:2181>. Will not attempt to
 authenticate using SASL (unknown error)

 2017-11-08 09:50:55 INFO  ClientCnxn:876 - Socket connection
 established to 192.168.50.101/192.168.50.101:2181 <
 http://192.168.50.101/192.168.50.101:2181>, initiating session

 2017-11-08 09:50:55 INFO  ClientCnxn:1299 - Session establishment
 complete on server 192.168.50.101/192.168.50.101:2181 <
 http://192.168.50.101/192.168.50.101:2181>, sessionid =
 0x15f9c185f8e0006, negotiated timeout = 3

 2017-11-08 09:50:58 WARN  ThriftTransportPool:539 - Server
 localhost:9997 (12) had 20 failures in a short time period, will not
 

Re: Connecting java client to Accumulo VM

2017-11-08 Thread Edward Gleeck
You wouldn't want the 0.0.0.0 on your /etc/hosts as this wouldn't be valid.
I don't recall exactly which configuration file under $ACCUMULO_CONF_DIR
you would want this in as Josh pointed out, but if you were to go the
/etc/host route, you want to put the IP address of that interface VM host.
for example /etc/hosts:

192.168.56.101 localhost localhost.localdomain

HTH



On Wed, Nov 8, 2017 at 4:13 PM, Geoffry Roberts 
wrote:

> I gave your suggestion a try.  I made an entry in /etc/hosts that resolves
> to 0.0.0.0 then set that name in master and slaves.  (I am running single
> node for now.). The upshot is port 9997 does not appear as listening at
> all.  If I change back to localhost, then it appears again.   My guess is
> the tablet server only starts when it's port is localhost.
>
> Am I using Accumulo correctly?  Is it not designed to be accessed remotely?
>
>
>
> On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser  wrote:
>
>> Accumulo chooses the network interface to bind given the resolution of
>> the hostname that you provide in the "hosts" files in ACCUMULO_CONF_DIR.
>>
>> If you have "localhost" (the default) still in the files (e.g. masters,
>> slaves), this presumably resolves to 127.0.0.1 which will result in
>> Accumulo not accepting connections from your VM's network adapter.
>>
>> A quick hack would be to put "0.0.0.0" in those files instead of
>> "localhost". I think the Accumulo scripts only have the ability to override
>> the bound interface for the Monitor, not all processes, to be 0.0.0.0. You
>> could also use a hostname you define in /etc/hosts that binds to the proper
>> interface instead (which would be a bit more like reality).
>>
>> On 11/8/17 10:43 AM, Geoffry Roberts wrote:
>>
>>> All,
>>>
>>> I have used Accumulo before, but a few versions ago (1.5.1), maybe
>>> something has changed.  Also, I've never before run it in a VM.
>>>
>>> I am running Accumulo from withn a VM and attempting to connect from
>>> without.  I am getting a complaint regarding port 9997, which, within the
>>> VM, is listening on 127.0.0.1:9997 .
>>> Apparently, I need to get it onto 0.0.0.0:9997 .
>>> Am I correct?
>>>
>>> Hadoop 2.6.2
>>> Zookeeper 3.4.10
>>> Accumulo 1.8.1
>>> Thrift 0.10.0
>>> Ubuntu 16.04 as a VBox guest
>>> OSX 10.12.06 as the host
>>>
>>> The HAZ is running on the VM.  From the CLI I can connect with the
>>> Zookeeper client and the Accumulo client.
>>>
>>> I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.
>>>
>>>  From the host, I can browse the Hadoop and Accumulo web pages.  I can
>>> also connect using the Zookeeper client.  When I try to connect from Java,
>>>  I am getting a successful connect to 2181, but it complains about port
>>> 9997.
>>>
>>> The VM is showing all forwarded ports as listening on 0.0.0.0 <
>>> http://0.0.0.0>: except for 127.0.0.1:9997 .
>>> As best I can tell Thrift needs the port.
>>>
>>> My connect code:
>>>
>>> String instance= properties.getProperty(ACCUMULO_INSTANCE);
>>>
>>> String uri = properties.getProperty(ZOOKEEPER_URI);
>>>
>>> Instance inst = new ZooKeeperInstance(instance, uri);
>>>
>>> String user = properties.getProperty(USER);
>>>
>>> String password = properties.getProperty(PASSWORD);
>>>
>>> AuthenticationToken token = new PasswordToken(password);
>>>
>>> conn = inst.getConnector(user, token);
>>>
>>>
>>> Errors from Java:
>>>
>>> 2017-11-08 09:50:55 INFO  ZooKeeper:438 - Initiating client connection,
>>> connectString=192.168.50.101:2181 
>>> sessionTimeout=3 watcher=org.apache.accumulo.fa
>>> te.zookeeper.ZooSession$ZooWatcher@4b013c76
>>>
>>> 2017-11-08 09:50:55 INFO  ClientCnxn:1032 - Opening socket connection to
>>> server 192.168.50.101/192.168.50.101:2181 >> .50.101:2181>. Will not attempt to authenticate using SASL (unknown
>>> error)
>>>
>>> 2017-11-08 09:50:55 INFO  ClientCnxn:876 - Socket connection established
>>> to 192.168.50.101/192.168.50.101:2181 >> .50.101:2181>, initiating session
>>>
>>> 2017-11-08 09:50:55 INFO  ClientCnxn:1299 - Session establishment
>>> complete on server 192.168.50.101/192.168.50.101:2181 <
>>> http://192.168.50.101/192.168.50.101:2181>, sessionid =
>>> 0x15f9c185f8e0006, negotiated timeout = 3
>>>
>>> 2017-11-08 09:50:58 WARN  ThriftTransportPool:539 - Server
>>> localhost:9997 (12) had 20 failures in a short time period, will not
>>> complain anymore
>>>
>>> ...
>>> It then continues to try to connect to no avail.
>>>
>>>
>>> Thanks in advance
>>>
>>> --
>>> There are ways and there are ways,
>>>
>>> Geoffry Roberts
>>>
>>
>
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts
>


Re: Connecting java client to Accumulo VM

2017-11-08 Thread Geoffry Roberts
I gave your suggestion a try.  I made an entry in /etc/hosts that resolves
to 0.0.0.0 then set that name in master and slaves.  (I am running single
node for now.). The upshot is port 9997 does not appear as listening at
all.  If I change back to localhost, then it appears again.   My guess is
the tablet server only starts when it's port is localhost.

Am I using Accumulo correctly?  Is it not designed to be accessed remotely?



On Wed, Nov 8, 2017 at 2:20 PM, Josh Elser  wrote:

> Accumulo chooses the network interface to bind given the resolution of the
> hostname that you provide in the "hosts" files in ACCUMULO_CONF_DIR.
>
> If you have "localhost" (the default) still in the files (e.g. masters,
> slaves), this presumably resolves to 127.0.0.1 which will result in
> Accumulo not accepting connections from your VM's network adapter.
>
> A quick hack would be to put "0.0.0.0" in those files instead of
> "localhost". I think the Accumulo scripts only have the ability to override
> the bound interface for the Monitor, not all processes, to be 0.0.0.0. You
> could also use a hostname you define in /etc/hosts that binds to the proper
> interface instead (which would be a bit more like reality).
>
> On 11/8/17 10:43 AM, Geoffry Roberts wrote:
>
>> All,
>>
>> I have used Accumulo before, but a few versions ago (1.5.1), maybe
>> something has changed.  Also, I've never before run it in a VM.
>>
>> I am running Accumulo from withn a VM and attempting to connect from
>> without.  I am getting a complaint regarding port 9997, which, within the
>> VM, is listening on 127.0.0.1:9997 .  Apparently,
>> I need to get it onto 0.0.0.0:9997 .  Am I correct?
>>
>> Hadoop 2.6.2
>> Zookeeper 3.4.10
>> Accumulo 1.8.1
>> Thrift 0.10.0
>> Ubuntu 16.04 as a VBox guest
>> OSX 10.12.06 as the host
>>
>> The HAZ is running on the VM.  From the CLI I can connect with the
>> Zookeeper client and the Accumulo client.
>>
>> I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.
>>
>>  From the host, I can browse the Hadoop and Accumulo web pages.  I can
>> also connect using the Zookeeper client.  When I try to connect from Java,
>>  I am getting a successful connect to 2181, but it complains about port
>> 9997.
>>
>> The VM is showing all forwarded ports as listening on 0.0.0.0 <
>> http://0.0.0.0>: except for 127.0.0.1:9997 .
>> As best I can tell Thrift needs the port.
>>
>> My connect code:
>>
>> String instance= properties.getProperty(ACCUMULO_INSTANCE);
>>
>> String uri = properties.getProperty(ZOOKEEPER_URI);
>>
>> Instance inst = new ZooKeeperInstance(instance, uri);
>>
>> String user = properties.getProperty(USER);
>>
>> String password = properties.getProperty(PASSWORD);
>>
>> AuthenticationToken token = new PasswordToken(password);
>>
>> conn = inst.getConnector(user, token);
>>
>>
>> Errors from Java:
>>
>> 2017-11-08 09:50:55 INFO  ZooKeeper:438 - Initiating client connection,
>> connectString=192.168.50.101:2181 
>> sessionTimeout=3 watcher=org.apache.accumulo.fa
>> te.zookeeper.ZooSession$ZooWatcher@4b013c76
>>
>> 2017-11-08 09:50:55 INFO  ClientCnxn:1032 - Opening socket connection to
>> server 192.168.50.101/192.168.50.101:2181 > .50.101:2181>. Will not attempt to authenticate using SASL (unknown
>> error)
>>
>> 2017-11-08 09:50:55 INFO  ClientCnxn:876 - Socket connection established
>> to 192.168.50.101/192.168.50.101:2181 > .50.101:2181>, initiating session
>>
>> 2017-11-08 09:50:55 INFO  ClientCnxn:1299 - Session establishment
>> complete on server 192.168.50.101/192.168.50.101:2181 <
>> http://192.168.50.101/192.168.50.101:2181>, sessionid =
>> 0x15f9c185f8e0006, negotiated timeout = 3
>>
>> 2017-11-08 09:50:58 WARN  ThriftTransportPool:539 - Server localhost:9997
>> (12) had 20 failures in a short time period, will not complain anymore
>>
>> ...
>> It then continues to try to connect to no avail.
>>
>>
>> Thanks in advance
>>
>> --
>> There are ways and there are ways,
>>
>> Geoffry Roberts
>>
>


-- 
There are ways and there are ways,

Geoffry Roberts


Re: Connecting java client to Accumulo VM

2017-11-08 Thread Josh Elser
Accumulo chooses the network interface to bind given the resolution of 
the hostname that you provide in the "hosts" files in ACCUMULO_CONF_DIR.


If you have "localhost" (the default) still in the files (e.g. masters, 
slaves), this presumably resolves to 127.0.0.1 which will result in 
Accumulo not accepting connections from your VM's network adapter.


A quick hack would be to put "0.0.0.0" in those files instead of 
"localhost". I think the Accumulo scripts only have the ability to 
override the bound interface for the Monitor, not all processes, to be 
0.0.0.0. You could also use a hostname you define in /etc/hosts that 
binds to the proper interface instead (which would be a bit more like 
reality).


On 11/8/17 10:43 AM, Geoffry Roberts wrote:

All,

I have used Accumulo before, but a few versions ago (1.5.1), maybe 
something has changed.  Also, I've never before run it in a VM.


I am running Accumulo from withn a VM and attempting to connect from 
without.  I am getting a complaint regarding port 9997, which, within 
the VM, is listening on 127.0.0.1:9997 .  
Apparently, I need to get it onto 0.0.0.0:9997 .  
Am I correct?


Hadoop 2.6.2
Zookeeper 3.4.10
Accumulo 1.8.1
Thrift 0.10.0
Ubuntu 16.04 as a VBox guest
OSX 10.12.06 as the host

The HAZ is running on the VM.  From the CLI I can connect with the 
Zookeeper client and the Accumulo client.


I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.

 From the host, I can browse the Hadoop and Accumulo web pages.  I can 
also connect using the Zookeeper client.  When I try to connect from 
Java,  I am getting a successful connect to 2181, but it complains about 
port 9997.


The VM is showing all forwarded ports as listening on 0.0.0.0 
: except for 127.0.0.1:9997 
.  As best I can tell Thrift needs the port.


My connect code:

String instance= properties.getProperty(ACCUMULO_INSTANCE);

String uri = properties.getProperty(ZOOKEEPER_URI);

Instance inst = new ZooKeeperInstance(instance, uri);

String user = properties.getProperty(USER);

String password = properties.getProperty(PASSWORD);

AuthenticationToken token = new PasswordToken(password);

conn = inst.getConnector(user, token);


Errors from Java:

2017-11-08 09:50:55 INFO  ZooKeeper:438 - Initiating client connection, 
connectString=192.168.50.101:2181  
sessionTimeout=3 
watcher=org.apache.accumulo.fate.zookeeper.ZooSession$ZooWatcher@4b013c76


2017-11-08 09:50:55 INFO  ClientCnxn:1032 - Opening socket connection to 
server 192.168.50.101/192.168.50.101:2181 
. Will not attempt to 
authenticate using SASL (unknown error)


2017-11-08 09:50:55 INFO  ClientCnxn:876 - Socket connection established 
to 192.168.50.101/192.168.50.101:2181 
, initiating session


2017-11-08 09:50:55 INFO  ClientCnxn:1299 - Session establishment 
complete on server 192.168.50.101/192.168.50.101:2181 
, sessionid = 
0x15f9c185f8e0006, negotiated timeout = 3


2017-11-08 09:50:58 WARN  ThriftTransportPool:539 - Server 
localhost:9997 (12) had 20 failures in a short time period, will not 
complain anymore


...
It then continues to try to connect to no avail.


Thanks in advance

--
There are ways and there are ways,

Geoffry Roberts


Connecting java client to Accumulo VM

2017-11-08 Thread Geoffry Roberts
All,

I have used Accumulo before, but a few versions ago (1.5.1), maybe
something has changed.  Also, I've never before run it in a VM.

I am running Accumulo from withn a VM and attempting to connect from
without.  I am getting a complaint regarding port 9997, which, within the
VM, is listening on 127.0.0.1:9997.  Apparently, I need to get it onto
0.0.0.0:9997.  Am I correct?

Hadoop 2.6.2
Zookeeper 3.4.10
Accumulo 1.8.1
Thrift 0.10.0
Ubuntu 16.04 as a VBox guest
OSX 10.12.06 as the host

The HAZ is running on the VM.  From the CLI I can connect with the
Zookeeper client and the Accumulo client.

I have ports 22, 50070, 50075, 2181, 9995, and 9997 forwarded.

>From the host, I can browse the Hadoop and Accumulo web pages.  I can also
connect using the Zookeeper client.  When I try to connect from Java,  I am
getting a successful connect to 2181, but it complains about port 9997.

The VM is showing all forwarded ports as listening on 0.0.0.0: except
for 127.0.0.1:9997.  As best I can tell Thrift needs the port.

My connect code:

  String instance =   properties.getProperty(ACCUMULO_INSTANCE);

  String uri = properties.getProperty(ZOOKEEPER_URI);

  Instance inst = new ZooKeeperInstance(instance, uri);

String user = properties.getProperty(USER);

  String password = properties.getProperty(PASSWORD);

  AuthenticationToken token = new PasswordToken(password);

   conn = inst.getConnector(user, token);



Errors from Java:

2017-11-08 09:50:55 INFO  ZooKeeper:438 - Initiating client connection,
connectString=192.168.50.101:2181 sessionTimeout=3
watcher=org.apache.accumulo.fate.zookeeper.ZooSession$ZooWatcher@4b013c76

2017-11-08 09:50:55 INFO  ClientCnxn:1032 - Opening socket connection to
server 192.168.50.101/192.168.50.101:2181. Will not attempt to authenticate
using SASL (unknown error)

2017-11-08 09:50:55 INFO  ClientCnxn:876 - Socket connection established to
192.168.50.101/192.168.50.101:2181, initiating session

2017-11-08 09:50:55 INFO  ClientCnxn:1299 - Session establishment complete
on server 192.168.50.101/192.168.50.101:2181, sessionid =
0x15f9c185f8e0006, negotiated timeout = 3

2017-11-08 09:50:58 WARN  ThriftTransportPool:539 - Server localhost:9997
(12) had 20 failures in a short time period, will not complain anymore
...
It then continues to try to connect to no avail.


Thanks in advance

-- 
There are ways and there are ways,

Geoffry Roberts


Re: Accumulo VM

2012-12-03 Thread John Vines
Additional note-
Same rules as the last one I did apply. Username/pass is ubuntu/secret. The
Accumulo shell can be run as the accumulo user or root, only the root user
is setup and the root password is secret as well.

John


On Fri, Nov 30, 2012 at 3:25 PM, John Vines vi...@apache.org wrote:

 Uuugghh, failing at internet today. I'm the worst.

 http://dl.dropbox.com/u/538523/Accumulo-UbuntuServer1204.ova





 On Fri, Nov 30, 2012 at 3:17 PM, John Vines vi...@apache.org wrote:

 I recut an Accumulo-1.4.2 VM for people to have a quick start with
 Accumulo. It is configured to use 4GB of memory. I eventually be updating
 it with a new VM which set the appropriate footprint at startup so you can
 work on a smaller sized VM, but for now this is what's available.

 Everything is init.d, you just need to wait a few minutes for everything
 to get up and going. You can view the monitor on port 50095 after starting
 up the VM to check to see if it's all the way up. It is based on Ubuntu
 Server 12.04.1.

 Any questions/comments are appreciated.
 John





Accumulo VM

2012-11-30 Thread John Vines
I recut an Accumulo-1.4.2 VM for people to have a quick start with
Accumulo. It is configured to use 4GB of memory. I eventually be updating
it with a new VM which set the appropriate footprint at startup so you can
work on a smaller sized VM, but for now this is what's available.

Everything is init.d, you just need to wait a few minutes for everything to
get up and going. You can view the monitor on port 50095 after starting up
the VM to check to see if it's all the way up. It is based on Ubuntu Server
12.04.1.

Any questions/comments are appreciated.
John


Re: Accumulo VM

2012-11-30 Thread dlmarion


John, 



  Where is this VM located? 



Dave 



- Original Message -


From: John Vines vi...@apache.org 
To: user@accumulo.apache.org 
Sent: Friday, November 30, 2012 3:17:48 PM 
Subject: Accumulo VM 

I recut an Accumulo-1.4.2 VM for people to have a quick start with Accumulo. It 
is configured to use 4GB of memory. I eventually be updating it with a new VM 
which set the appropriate footprint at startup so you can work on a smaller 
sized VM, but for now this is what's available. 

Everything is init.d, you just need to wait a few minutes for everything to get 
up and going. You can view the monitor on port 50095 after starting up the VM 
to check to see if it's all the way up. It is based on Ubuntu Server 12.04.1. 

Any questions/comments are appreciated. 
John 


Re: Accumulo VM

2012-11-30 Thread John Vines
Uuugghh, failing at internet today. I'm the worst.

http://dl.dropbox.com/u/538523/Accumulo-UbuntuServer1204.ova




On Fri, Nov 30, 2012 at 3:17 PM, John Vines vi...@apache.org wrote:

 I recut an Accumulo-1.4.2 VM for people to have a quick start with
 Accumulo. It is configured to use 4GB of memory. I eventually be updating
 it with a new VM which set the appropriate footprint at startup so you can
 work on a smaller sized VM, but for now this is what's available.

 Everything is init.d, you just need to wait a few minutes for everything
 to get up and going. You can view the monitor on port 50095 after starting
 up the VM to check to see if it's all the way up. It is based on Ubuntu
 Server 12.04.1.

 Any questions/comments are appreciated.
 John