The odd part is that I can do that too, but I can't connect via the Groovy script that is in /vagrant_data (accumulo.groovy; Groovy distribution in /vagrant_data/groovy) from outside the VM. Inside the VM, it works just fine.
On Mon, Dec 7, 2015 at 11:40 PM, Josh Elser <[email protected]> wrote: > Mike sent me a tarball of his Vagrant VM. > > Following my own advice (via the --debug option on the shell): > > 2015-12-07 23:35:50,969 [rpc.ThriftUtil] TRACE: Opening normal transport > 2015-12-07 23:35:50,969 [rpc.ThriftUtil] WARN : Failed to open transport > to vagrant-ubuntu-vivid-64:9997 > 2015-12-07 23:35:50,969 [impl.ThriftTransportPool] DEBUG: Failed to > connect to vagrant-ubuntu-vivid-64:9997 (120000) > org.apache.thrift.transport.TTransportException: > java.net.UnknownHostException > at > org.apache.accumulo.core.rpc.ThriftUtil.createClientTransport(ThriftUtil.java:313) > at > org.apache.accumulo.core.client.impl.ThriftTransportPool.createNewTransport(ThriftTransportPool.java:478) > at > org.apache.accumulo.core.client.impl.ThriftTransportPool.getAnyTransport(ThriftTransportPool.java:466) > at > org.apache.accumulo.core.client.impl.ServerClient.getConnection(ServerClient.java:141) > at > org.apache.accumulo.core.client.impl.ServerClient.getConnection(ServerClient.java:117) > at > org.apache.accumulo.core.client.impl.ServerClient.getConnection(ServerClient.java:113) > at > org.apache.accumulo.core.client.impl.ServerClient.executeRaw(ServerClient.java:95) > at > org.apache.accumulo.core.client.impl.ServerClient.execute(ServerClient.java:61) > at > org.apache.accumulo.core.client.impl.ConnectorImpl.<init>(ConnectorImpl.java:67) > at > org.apache.accumulo.core.client.ZooKeeperInstance.getConnector(ZooKeeperInstance.java:248) > at org.apache.accumulo.shell.Shell.config(Shell.java:362) > at org.apache.accumulo.shell.Shell.execute(Shell.java:571) > at org.apache.accumulo.start.Main$1.run(Main.java:93) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.net.UnknownHostException > at sun.nio.ch.Net.translateException(Net.java:181) > at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:139) > at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:82) > at > org.apache.accumulo.core.rpc.TTimeoutTransport.create(TTimeoutTransport.java:55) > at > org.apache.accumulo.core.rpc.TTimeoutTransport.create(TTimeoutTransport.java:48) > at > org.apache.accumulo.core.rpc.ThriftUtil.createClientTransport(ThriftUtil.java:310) > ... 13 more > 2015-12-07 23:35:50,969 [impl.ServerClient] DEBUG: ClientService request > failed null, retrying ... > org.apache.thrift.transport.TTransportException: Failed to connect to a > server > at > org.apache.accumulo.core.client.impl.ThriftTransportPool.getAnyTransport(ThriftTransportPool.java:474) > at > org.apache.accumulo.core.client.impl.ServerClient.getConnection(ServerClient.java:141) > at > org.apache.accumulo.core.client.impl.ServerClient.getConnection(ServerClient.java:117) > at > org.apache.accumulo.core.client.impl.ServerClient.getConnection(ServerClient.java:113) > at > org.apache.accumulo.core.client.impl.ServerClient.executeRaw(ServerClient.java:95) > at > org.apache.accumulo.core.client.impl.ServerClient.execute(ServerClient.java:61) > at > org.apache.accumulo.core.client.impl.ConnectorImpl.<init>(ConnectorImpl.java:67) > at > org.apache.accumulo.core.client.ZooKeeperInstance.getConnector(ZooKeeperInstance.java:248) > at org.apache.accumulo.shell.Shell.config(Shell.java:362) > at org.apache.accumulo.shell.Shell.execute(Shell.java:571) > at org.apache.accumulo.start.Main$1.run(Main.java:93) > at java.lang.Thread.run(Thread.java:745) > > Accumulo is using the FQDN of the VM. Adding in the proper entries to > /etc/hosts on my local machine let me open the Accumulo shell locally (not > in the VM. > > > Josh Elser wrote: > >> Interesting. What version of Accumulo are you using? >> >> Also, can you jstack your client application, maybe we can get a hint >> where it's stuck. You could also try increase the Log4j level in your >> client application for the 'org.apache.accumulo.core' package to DEBUG >> or TRACE. >> >> Even better, if this is something you can share (making assumptions >> since it's Vagrant-based), feel free to. I'll try to run your example >> and poke around myself. >> >> Mike Thomsen wrote: >> >>> This is the output from netstat: >>> >>> vagrant@vagrant-ubuntu-vivid-64:/opt/accumulo$ netstat -nape | fgrep >>> 9999 | fgrep LISTEN >>> (Not all processes could be identified, non-owned process info >>> will not be shown, you would have to be root to see it all.) >>> tcp 0 0 10.0.2.15:9999 <http://10.0.2.15:9999> >>> 0.0.0.0:* LISTEN 1000 35450 3809/java >>> vagrant@vagrant-ubuntu-vivid-64:/opt/accumulo$ netstat -nape | fgrep >>> 9997 | fgrep LISTEN >>> (Not all processes could be identified, non-owned process info >>> will not be shown, you would have to be root to see it all.) >>> tcp 0 0 10.0.2.15:9997 <http://10.0.2.15:9997> >>> 0.0.0.0:* LISTEN 1000 35962 3655/java >>> >>> On Fri, Dec 4, 2015 at 12:35 PM, Josh Elser <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> Each line in the Accumulo "hosts" files (masters, slaves, etc) >>> denote a host which the process should be run on, FYI. >>> >>> What does netstat show for ports 9999 and 9997? Those are the two >>> ports that your client should ever need to talk to for Accumulo, IIRC. >>> >>> Mike Thomsen wrote: >>> >>> I stopped all of the services, removed localhost and even >>> reinitialized >>> the node. When I brought it back up, that Groovy script hangs at the >>> line right after it says it's attempting to get a connection. Even >>> Ubuntu's firewall is turned off. >>> >>> On Fri, Dec 4, 2015 at 10:50 AM, Adam Fuchs <[email protected] >>> <mailto:[email protected]> >>> <mailto:[email protected] <mailto:[email protected]>>> wrote: >>> >>> Mike, >>> >>> I suspect if you get rid of the "localhost" line and restart >>> Accumulo then you will get services listening on the >>> non-loopback >>> IPs. Right now you have some of your processes accessible >>> outside >>> your VM and others only accessible from inside, and you >>> probably >>> have two tablet servers when you should only have one. >>> >>> Cheers, >>> Adam >>> >>> >>> >>> On Fri, Dec 4, 2015 at 9:50 AM, Mike Thomsen >>> <[email protected] <mailto:[email protected]> >>> <mailto:[email protected] <mailto:[email protected]>>> >>> wrote: >>> >>> I tried adding some read/write examples and ran into a >>> problem. >>> It would hang at the first scan or write operation I >>> tried. I >>> checked the master port (9999) and it was only listening on >>> 127.0.0.1:9999 <http://127.0.0.1:9999> <http://127.0.0.1:9999>. >>> netstat had two entries >>> for 9997. This is what conf/masters has for my VM: >>> >>> # limitations under the License. >>> >>> localhost >>> vagrant-ubuntu-vivid-64 >>> >>> It's the same with all of the other files (slaves, gc, >>> etc.) >>> >>> Any ideas? >>> >>> Thanks, >>> >>> Mike >>> >>> On Thu, Dec 3, 2015 at 3:54 PM, Mike Thomsen >>> <[email protected] <mailto:[email protected]> >>> <mailto:[email protected] <mailto:[email protected]>>> >>> wrote: >>> >>> Thanks! That was all that I needed to do. >>> >>> On Thu, Dec 3, 2015 at 3:33 PM, Josh Elser >>> <[email protected] <mailto:[email protected]> >>> <mailto:[email protected] <mailto:[email protected]>>> wrote: >>> >>> Could be that the Accumulo services are only >>> listening >>> on localhost and not the "external" interface >>> for your >>> VM. To get a connector, that's a call to a >>> TabletServer >>> which run on 9997 by default (and you have open). >>> >>> Do a `netstat -nape | fgrep 9997 | fgrep >>> LISTEN` in your >>> VM and see what interface the server is bound >>> to. I'd >>> venture a guess that you just need to put the >>> FQDN for >>> your VM in $ACCUMULO_CONF_DIR/slaves (and masters, >>> monitor, gc, tracers, for completeness) instead of >>> localhost. >>> >>> >>> Mike Thomsen wrote: >>> >>> I have Accumulo running in a VM. This >>> Groovy script >>> will connect just >>> fine from within the VM, but outside of the >>> VM it >>> hangs at the first >>> println statement. >>> >>> String instance = "test" >>> String zkServers = "localhost:2181" >>> String principal = "root"; >>> AuthenticationToken authToken = new >>> PasswordToken("testing1234"); >>> >>> ZooKeeperInstance inst = new >>> ZooKeeperInstance(instance, zkServers); >>> println "Attempting connection" >>> Connector conn = inst.getConnector(principal, >>> authToken); >>> println "Connected!" >>> >>> This is the listing of ports I have opened >>> up in >>> Vagrant: >>> >>> config.vm.network "forwarded_port", guest: >>> 2122, >>> host: 2122 >>> config.vm.network "forwarded_port", >>> guest: 2181, >>> host: 2181 >>> config.vm.network "forwarded_port", >>> guest: 2888, >>> host: 2888 >>> config.vm.network "forwarded_port", >>> guest: 3888, >>> host: 3888 >>> config.vm.network "forwarded_port", >>> guest: 4445, >>> host: 4445 >>> config.vm.network "forwarded_port", >>> guest: 4560, >>> host: 4560 >>> config.vm.network "forwarded_port", >>> guest: 6379, >>> host: 6379 >>> config.vm.network "forwarded_port", >>> guest: 8020, >>> host: 8020 >>> config.vm.network "forwarded_port", >>> guest: 8030, >>> host: 8030 >>> config.vm.network "forwarded_port", >>> guest: 8031, >>> host: 8031 >>> config.vm.network "forwarded_port", >>> guest: 8032, >>> host: 8032 >>> config.vm.network "forwarded_port", >>> guest: 8033, >>> host: 8033 >>> config.vm.network "forwarded_port", >>> guest: 8040, >>> host: 8040 >>> config.vm.network "forwarded_port", >>> guest: 8042, >>> host: 8042 >>> config.vm.network "forwarded_port", >>> guest: 8081, >>> host: 8081 >>> config.vm.network "forwarded_port", >>> guest: 8082, >>> host: 8082 >>> config.vm.network "forwarded_port", >>> guest: 8088, >>> host: 8088 >>> config.vm.network "forwarded_port", >>> guest: 9000, >>> host: 9000 >>> config.vm.network "forwarded_port", >>> guest: 9092, >>> host: 9092 >>> config.vm.network "forwarded_port", >>> guest: 9200, >>> host: 9200 >>> config.vm.network "forwarded_port", >>> guest: 9300, >>> host: 9300 >>> config.vm.network "forwarded_port", >>> guest: 9997, >>> host: 9997 >>> config.vm.network "forwarded_port", >>> guest: 9999, >>> host: 9999 >>> #config.vm.network "forwarded_port", guest: >>> 10001, host: 10001 >>> config.vm.network "forwarded_port", guest: >>> 10002, host: 10002 >>> config.vm.network "forwarded_port", guest: >>> 11224, host: 11224 >>> config.vm.network "forwarded_port", guest: >>> 12234, host: 12234 >>> config.vm.network "forwarded_port", guest: >>> 19888, host: 19888 >>> config.vm.network "forwarded_port", guest: >>> 42424, host: 42424 >>> config.vm.network "forwarded_port", guest: >>> 49707, host: 49707 >>> config.vm.network "forwarded_port", guest: >>> 50010, host: 50010 >>> config.vm.network "forwarded_port", guest: >>> 50020, host: 50020 >>> config.vm.network "forwarded_port", guest: >>> 50070, host: 50070 >>> config.vm.network "forwarded_port", guest: >>> 50075, host: 50075 >>> config.vm.network "forwarded_port", guest: >>> 50090, host: 50090 >>> config.vm.network "forwarded_port", guest: >>> 50091, host: 50091 >>> config.vm.network "forwarded_port", guest: >>> 50095, host: 50095 >>> >>> Any ideas why it is not letting my connect? >>> It just >>> hangs and never even >>> seems to time out. >>> >>> Thanks, >>> >>> Mike >>> >>> >>> >>> >>> >>> >>>
