Nope, still not working. I don't believe I have http enabled. # hive --service beeline --verbose=true -u "jdbc:hive2://hiveservice:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice" issuing: !connect jdbc:hive2://hiveservice:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice '' '' scan complete in 3ms Connecting to jdbc:hive2://hiveservice:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice Error: Invalid URL: jdbc:hive2://hiveservice:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice (state=08S01,code=0) java.sql.SQLException: Invalid URL: jdbc:hive2://hiveservice:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice
# telnet hiveservice 10001 Trying 192.168.1.167... telnet: connect to address 192.168.1.167: Connection refused telnet: Unable to connect to remote host: Connection refused I know it's able to connect to the server. When I run a tcpdump I see activity going back and forth between the server and client. It doesn't seem to be authenticating or understand my commands. # tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes 12:44:13.450221 IP hiveclient.48936 > hiveservice.11000: P 982732164:982732174(10) ack 794910603 win 46 <nop,nop,timestamp 1236151950 1710577473> E..>c.@.@... GJs GJ..(*.:.M./a_......]..... I...e.WA.....PLAIN 12:44:13.452261 IP hiveclient.48936 > hiveservice.11000: P 10:35(25) ack 1 win 46 <nop,nop,timestamp 1236151950 1710577473> E..Mc.@.@.-. GJs GJ..(*.:.M./a_.....#...... I...e.WA......anonymous.anonymous 12:44:13.451381 IP hiveservice.11000 > hiveclient.48936: P 1:6(5) ack 35 win 46 <nop,nop,timestamp 1710577475 1236151950> E..9..@.@..L GJ. GJs*..(/a_.:.M............ e.WCI........ 12:44:13.451559 IP hiveclient.48936 > hiveservice.11000: P 35:74(39) ack 6 win 46 <nop,nop,timestamp 1236151951 1710577475> E..[c.@.@.-. GJs GJ..(*.:.M./a_............ I...e.WC...#........OpenSession................ 12:44:38.163329 IP hiveclient.48940 > hiveservice.11000: P 4148810730:4148810740(10) ack 3265530137 win 46 <nop,nop,timestamp 1236176663 1710602187> E..>].@.@.4. GJs GJ..,*..I.... ......W..... I...e........PLAIN 12:44:38.163347 IP hiveclient.48940 > hiveservice.11000: P 10:35(25) ack 1 win 46 <nop,nop,timestamp 1236176663 1710602187> E..M].@.@.4. GJs GJ..,*..I.... ............ I...e.........anonymous.anonymous 12:44:38.164592 IP hiveservice.11000 > hiveclient.48940: P 1:6(5) ack 35 win 46 <nop,nop,timestamp 1710602188 1236176663> E..9..@.@..B GJ. ........... ..I. e...I........ 12:44:38.164761 IP hiveclient.48940 > hiveservice.11000: P 35:74(39) ack 6 win 46 <nop,nop,timestamp 1236176665 1710602188> E..[].@.@.3. GJs ....,*.......u...... I...e......#........OpenSession............... On Mon, Jul 7, 2014 at 7:53 PM, D K <deepe...@gmail.com> wrote: > How about try this? > hive --service beeline -u > jdbc:hive2://hiveservice:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice > > In your previous response I see that you have > "hive.server2.thrift.http.port=10001" > > > > On Thu, Jul 3, 2014 at 5:15 AM, Hang Chan <h...@needsystem.com> wrote: > >> It just stays stuck when I try to connect using http transport mode. >> >> [hiveclient]# hive --service beeline -u >> jdbc:hive2://hiveservice:11000/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice >> scan complete in 3ms >> Connecting to >> jdbc:hive2://hiveservice:11000/default?hive.server2.transport.mode=http >> >> Telnet works for me. >> >> [hiveclient]# telnet hiveservice 11000 >> Trying 192.168.1.167... >> Connected to hiveservice (192.168.1.167). >> Escape character is '^]'. >> >> On the thrift server, it is listening on port 11000. I see some sessions >> in CLOSE_WAIT from my client. >> >> [hiveservice]# netstat -pan | grep 11000 >> tcp 0 0 :::11000 :::* >> LISTEN 21978/java >> tcp 0 0 ::ffff:192.168.1.167:11000 ::ffff: >> 192.168.1.133:51548 CLOSE_WAIT 21978/java >> tcp 0 0 ::ffff:192.168.1.167:11000 ::ffff: >> 192.168.1.133:35499 CLOSE_WAIT 21978/java >> >> [hiveservice]# ps -ef | grep hive >> root 21976 1 0 Jul02 ? 00:00:00 /sbin/runuser -s /bin/sh >> -c /usr/bin/hive --service hiveserver2 hadoop >> hadoop 21978 21976 0 Jul02 ? 00:00:07 /usr/java/latest/bin/java >> -Xmx2000m -Dhadoop.log.dir=/opt/hadoop-0.20.2-shell-dev/bin/../logs >> -Dhadoop.log.file=hadoop.log >> -Dhadoop.home.dir=/opt/hadoop-0.20.2-shell-dev/bin/.. -Dhadoop.id.str= >> -Dhadoop.root.logger=INFO,console >> -Djava.library.path=/opt/hadoop-0.20.2-shell-dev/bin/../lib/native/Linux-amd64-64 >> -Dhadoop.policy.file=hadoop-policy.xml -classpath >> /opt/hadoop-0.20.2-shell-dev/bin/../conf:/usr/java/latest/lib/tools.jar:/opt/hadoop-0.20.2-shell-dev/bin/../hadoop-0.20.2-core.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-cli-1.2.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-codec-1.3.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-el-1.0.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-httpclient-3.0.1.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-logging-1.0.4.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-logging-api-1.0.4.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/commons-net-1.4.1.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/core-3.1.1.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/hadoop-lib-1.5.8.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/hadoop-snappy-0.0.1-SNAPSHOT.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/hsqldb-1.8.0.10.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jasper-compiler-5.5.12.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jasper-runtime-5.5.12.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jets3t-0.6.1.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jetty-6.1.14.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jetty-util-6.1.14.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/junit-3.8.1.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/kfs-0.2.2.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/log4j-1.2.15.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/mockito-all-1.8.0.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/mysql-connector-java-5.0.8-bin.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/oro-2.0.8.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/servlet-api-2.5-6.1.14.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/slf4j-api-1.4.3.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/slf4j-log4j12-1.4.3.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/xmlenc-0.52.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jsp-2.1/jsp-2.1.jar:/opt/hadoop-0.20.2-shell-dev/bin/../lib/jsp-2.1/jsp-api-2.1.jar::/opt/hive-conf/dev:/opt/hive-0.12.0/lib/antlr-runtime-3.4.jar:/opt/hive-0.12.0/lib/avro-1.7.1.jar:/opt/hive-0.12.0/lib/avro-mapred-1.7.1.jar:/opt/hive-0.12.0/lib/bonecp-0.7.1.RELEASE.jar:/opt/hive-0.12.0/lib/commons-cli-1.2.jar:/opt/hive-0.12.0/lib/commons-codec-1.4.jar:/opt/hive-0.12.0/lib/commons-codec-1.6.jar:/opt/hive-0.12.0/lib/commons-collections-3.2.1.jar:/opt/hive-0.12.0/lib/commons-compress-1.4.1.jar:/opt/hive-0.12.0/lib/commons-configuration-1.6.jar:/opt/hive-0.12.0/lib/commons-io-2.4.jar:/opt/hive-0.12.0/lib/commons-lang-2.4.jar:/opt/hive-0.12.0/lib/commons-logging-1.1.1.jar:/opt/hive-0.12.0/lib/commons-logging-api-1.0.4.jar:/opt/hive-0.12.0/lib/commons-pool-1.5.4.jar:/opt/hive-0.12.0/lib/datanucleus-api-jdo-3.2.1.jar:/opt/hive-0.12.0/lib/datanucleus-core-3.2.2.jar:/opt/hive-0.12.0/lib/datanucleus-rdbms-3.2.1.jar:/opt/hive-0.12.0/lib/derby-10.4.2.0.jar:/opt/hive-0.12.0/lib/guava-11.0.2.jar:/opt/hive-0.12.0/lib/hbase-0.94.6.1.jar:/opt/hive-0.12.0/lib/hbase-0.94.6.1-tests.jar:/opt/hive-0.12.0/lib/hive-beeline-0.12.0.jar:/opt/hive-0.12.0/lib/hive-cli-0.12.0.jar:/opt/hive-0.12.0/lib/hive-common-0.12.0.jar:/opt/hive-0.12.0/lib/hive-contrib-0.12.0.jar:/opt/hive-0.12.0/lib/hive-exec-0.12.0.jar:/opt/hive-0.12.0/lib/hive-hbase-handler-0.12.0.jar:/opt/hive-0.12.0/lib/hive-hwi-0.12.0.jar:/opt/hive-0.12.0/lib/hive-jdbc-0.12.0.jar:/opt/hive-0.12.0/lib/hive-metastore-0.12.0.jar:/opt/hive-0.12.0/lib/hive-serde-0.12.0.jar:/opt/hive-0.12.0/lib/hive-service-0.12.0.jar:/opt/hive-0.12.0/lib/hive-shims-0.12.0.jar:/opt/hive-0.12.0/lib/httpclient-4.2.5.jar:/opt/hive-0.12.0/lib/httpcore-4.2.4.jar:/opt/hive-0.12.0/lib/jackson-core-asl-1.8.8.jar:/opt/hive-0.12.0/lib/jackson-jaxrs-1.8.8.jar:/opt/hive-0.12.0/lib/jackson-mapper-asl-1.8.8.jar:/opt/hive-0.12.0/lib/jackson-xc-1.8.8.jar:/opt/hive-0.12.0/lib/JavaEWAH-0.3.2.jar:/opt/hive-0.12.0/lib/javolution-5 >> >> >> >> >> On Wed, Jul 2, 2014 at 11:48 PM, Andre Araujo <ara...@pythian.com> wrote: >> >>> Does this work? >>> >>> >>> jdbc:hive2://hiveservice:11000/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice >>> >>> Are you certain that HiveServer2 daemon is running on hiveservice AND >>> listening on port 11000? >>> >>> >>> >>> On 3 July 2014 13:12, Hang Chan <h...@needsystem.com> wrote: >>> >>>> hive.server.read.socket.timeout=10 >>>> hive.server.tcp.keepalive=true >>>> hive.server2.async.exec.shutdown.timeout=10 >>>> hive.server2.async.exec.threads=50 >>>> hive.server2.authentication=NONE >>>> hive.server2.enable.doAs=true >>>> hive.server2.table.type.mapping=CLASSIC >>>> hive.server2.thrift.http.max.worker.threads=500 >>>> hive.server2.thrift.http.min.worker.threads=5 >>>> hive.server2.thrift.http.path=cliservice >>>> hive.server2.thrift.http.port=10001 >>>> hive.server2.thrift.max.worker.threads=500 >>>> hive.server2.thrift.min.worker.threads=5 >>>> hive.server2.thrift.port=11000 >>>> hive.server2.thrift.sasl.qop=auth >>>> hive.server2.transport.mode=binary >>>> >>>> >>>> On Wed, Jul 2, 2014 at 10:55 PM, Andre Araujo <ara...@pythian.com> >>>> wrote: >>>> >>>>> Did you explicitly change the HiveServer2 port to 11000? The default >>>>> is 10000. >>>>> >>>>> Can you provide the output of the following ? >>>>> >>>>> hive -e set | grep hive.server >>>>> >>>>> >>>>> >>>>> On 3 July 2014 11:08, Hang Chan <h...@needsystem.com> wrote: >>>>> >>>>>> It's not a dns problem. I just substituted my real server name with >>>>>> "hiveservice". I confirmed that the hostname is indeed resolvable in >>>>>> dns. >>>>>> I also tried using the ip address in place of the hostname and I still >>>>>> get >>>>>> the same error. >>>>>> >>>>>> >>>>>> On Wed, Jul 2, 2014 at 5:36 PM, Andre Araujo <ara...@pythian.com> >>>>>> wrote: >>>>>> >>>>>>> If the name "hiveserver" is not resolved correctly, that's the exact >>>>>>> error you'd getting. >>>>>>> Does "nslookup hiveservice" resolve the name successfully? >>>>>>> >>>>>>> Try using the fully qualified name instead. >>>>>>> >>>>>>> >>>>>>> On 3 July 2014 07:01, Szehon Ho <sze...@cloudera.com> wrote: >>>>>>> >>>>>>>> I believe you should be able to put in anything by default. The >>>>>>>> hive jdbc url is of the form jdbc:hive2://<host>:<port>, is the url >>>>>>>> correct? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Szehon >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Jul 2, 2014 at 10:16 AM, Hang Chan <h...@needsystem.com> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> beeline does not seem to be connecting remotely. It works if I >>>>>>>>> connect using the embedded client. I am using all the default >>>>>>>>> configurations, except I configured my hiveserver2 thrift port to >>>>>>>>> 11000. >>>>>>>>> If I put in the database name after the port number, it will prompt >>>>>>>>> me for >>>>>>>>> a username and password. I just put in anything, but that doesn't >>>>>>>>> seem to >>>>>>>>> work. I thought that by default there should be no authentication. >>>>>>>>> >>>>>>>>> [hiveclient]# hive --service beeline -u >>>>>>>>> jdbc:hive2://hiveservice:11000 >>>>>>>>> scan complete in 2ms >>>>>>>>> Connecting to jdbc:hive2://hiveservice:11000 >>>>>>>>> Error: Invalid URL: jdbc:hive2://hiveservice:11000 >>>>>>>>> (state=08S01,code=0) >>>>>>>>> -hiveconf (No such file or directory) >>>>>>>>> hive.aux.jars.path=file:............................. >>>>>>>>> Beeline version 0.12.0 by Apache Hive >>>>>>>>> 0: jdbc:hive2://hiveservice:11000> show tables; >>>>>>>>> No current connection >>>>>>>>> >>>>>>>>> [hiveclient]# hive --service beeline -u jdbc:hive2:// >>>>>>>>> scan complete in 3ms >>>>>>>>> Connecting to jdbc:hive2:// >>>>>>>>> 14/07/02 12:37:47 INFO service.CompositeService: HiveServer2: >>>>>>>>> Async execution pool size50 >>>>>>>>> 14/07/02 12:37:47 INFO service.AbstractService: >>>>>>>>> Service:OperationManager is inited. >>>>>>>>> 14/07/02 12:37:47 INFO service.AbstractService: >>>>>>>>> Service:SessionManager is inited. >>>>>>>>> 14/07/02 12:37:47 INFO service.AbstractService: Service:CLIService >>>>>>>>> is inited. >>>>>>>>> 14/07/02 12:37:47 INFO service.AbstractService: >>>>>>>>> Service:OperationManager is started. >>>>>>>>> 14/07/02 12:37:47 INFO service.AbstractService: >>>>>>>>> Service:SessionManager is started. >>>>>>>>> 14/07/02 12:37:47 INFO service.AbstractService: Service:CLIService >>>>>>>>> is started. >>>>>>>>> 14/07/02 12:37:47 INFO hive.metastore: Trying to connect to >>>>>>>>> metastore with URI thrift://hiveservice:9083 >>>>>>>>> 14/07/02 12:37:47 INFO hive.metastore: Waiting 1 seconds before >>>>>>>>> next connection attempt. >>>>>>>>> 14/07/02 12:37:48 INFO hive.metastore: Connected to metastore. >>>>>>>>> 14/07/02 12:37:48 INFO cli.CLIService: SessionHandle >>>>>>>>> [7e1279d9-4342-48f1-9c49-1377734062e5]: openSession() >>>>>>>>> 14/07/02 12:37:48 INFO cli.CLIService: SessionHandle >>>>>>>>> [7e1279d9-4342-48f1-9c49-1377734062e5]: getInfo() >>>>>>>>> Connected to: Hive (version 0.12.0) >>>>>>>>> Driver: Hive (version 0.12.0) >>>>>>>>> Transaction isolation: TRANSACTION_REPEATABLE_READ >>>>>>>>> -hiveconf (No such file or directory) >>>>>>>>> hive.aux.jars.path=file:...... >>>>>>>>> Beeline version 0.12.0 by Apache Hive >>>>>>>>> 0: jdbc:hive2://> show tables; >>>>>>>>> +--------------------------------------------------------+ >>>>>>>>> | tab_name | >>>>>>>>> +--------------------------------------------------------+ >>>>>>>>> | abc | >>>>>>>>> >>>>>>>>> 731 rows selected (2.345 seconds) >>>>>>>>> 14/07/02 12:38:05 INFO exec.ListSinkOperator: 0 finished. >>>>>>>>> closing... >>>>>>>>> 14/07/02 12:38:05 INFO exec.ListSinkOperator: 0 forwarded 0 rows >>>>>>>>> 14/07/02 12:38:05 INFO ql.Driver: <PERFLOG method=releaseLocks> >>>>>>>>> 14/07/02 12:38:05 INFO ql.Driver: </PERFLOG method=releaseLocks >>>>>>>>> start=1404319085209 end=1404319085209 duration=0> >>>>>>>>> 14/07/02 12:38:05 INFO zookeeper.ZooKeeper: Session: >>>>>>>>> 0x245f6924c200129 closed >>>>>>>>> 14/07/02 12:38:05 INFO zookeeper.ClientCnxn: EventThread shut down >>>>>>>>> 14/07/02 12:38:05 INFO cli.CLIService: OperationHandle >>>>>>>>> [opType=EXECUTE_STATEMENT, >>>>>>>>> getHandleIdentifier()=c05a98eb-1077-4732-9b18-c638e0b0a402]: >>>>>>>>> closeOperation >>>>>>>>> 0: jdbc:hive2://> >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Hang >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> André Araújo >>>>>>> Big Data Consultant/Solutions Architect >>>>>>> The Pythian Group - Australia - www.pythian.com >>>>>>> >>>>>>> Office (calls from within Australia): 1300 366 021 x1270 >>>>>>> Office (international): +61 2 8016 7000 x270 *OR* +1 613 565 >>>>>>> 8696 x1270 >>>>>>> Mobile: +61 410 323 559 >>>>>>> Fax: +61 2 9805 0544 >>>>>>> IM: pythianaraujo @ AIM/MSN/Y! or ara...@pythian.com @ GTalk >>>>>>> >>>>>>> “Success is not about standing at the top, it's the steps you leave >>>>>>> behind.” — Iker Pou (rock climber) >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> André Araújo >>>>> Big Data Consultant/Solutions Architect >>>>> The Pythian Group - Australia - www.pythian.com >>>>> >>>>> Office (calls from within Australia): 1300 366 021 x1270 >>>>> Office (international): +61 2 8016 7000 x270 *OR* +1 613 565 8696 >>>>> x1270 >>>>> Mobile: +61 410 323 559 >>>>> Fax: +61 2 9805 0544 >>>>> IM: pythianaraujo @ AIM/MSN/Y! or ara...@pythian.com @ GTalk >>>>> >>>>> “Success is not about standing at the top, it's the steps you leave >>>>> behind.” — Iker Pou (rock climber) >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >>> -- >>> André Araújo >>> Big Data Consultant/Solutions Architect >>> The Pythian Group - Australia - www.pythian.com >>> >>> Office (calls from within Australia): 1300 366 021 x1270 >>> Office (international): +61 2 8016 7000 x270 *OR* +1 613 565 8696 >>> x1270 >>> Mobile: +61 410 323 559 >>> Fax: +61 2 9805 0544 >>> IM: pythianaraujo @ AIM/MSN/Y! or ara...@pythian.com @ GTalk >>> >>> “Success is not about standing at the top, it's the steps you leave >>> behind.” — Iker Pou (rock climber) >>> >>> -- >>> >>> >>> >>> >> >