I checked the metastore logs, looks like it works well?
```
Initialization script completed
schemaTool completed
[WARN] Failed to create directory: /home/hive/.beeline
No such file or directory
+ '[' 0 -eq 0 ']'
+ echo 'Initialized schema successfully..'
+ '[' metastore == hiveserver2 ']'
+ '[' metastore == metastore ']'
Initialized schema successfully..
+ export METASTORE_PORT=9083
+ METASTORE_PORT=9083
+ exec /opt/hive/bin/hive --skiphadoopversion --skiphbasecp --service
metastore
2024-09-29 09:58:52: Starting Hive Metastore Server
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/opt/hive/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type
[org.apache.logging.slf4j.Log4jLoggerFactory]
```

Jia Fan <fanjia1...@gmail.com> 于2024年9月30日周一 10:32写道:

> Thanks Zoltan for response.
> I pull docker image[1] from docker hub. I believe it pushed by hive team.
> [1]
> https://hub.docker.com/layers/apache/hive/3.1.3/images/sha256-d102ba29ad07e93c303894896203a80b903c0001d80221f1cb9fea92dcac06e4?context=explore
>
> Zoltán Rátkai <zrat...@cloudera.com.invalid> 于2024年9月30日周一 03:51写道:
>
>> Hi Jia Fan,
>>
>> did you check the if metastore started properly as well?
>> On Dockerhub there is Hive version from 4.0, but as I see you tried to
>> use 3.1.3.
>>
>> Regards,
>>
>> Zoltan Ratkai
>>
>> On Sun, Sep 29, 2024 at 12:10 PM Jia Fan <fanjia1...@gmail.com> wrote:
>>
>>> Hi folks,
>>> I followed the guide[1] to run docker with hive.
>>> These are my shell command:
>>>
>>> ```
>>> [root@localhost ~]# docker run -d -p 9083:9083 --env
>>> SERVICE_NAME=metastore --name metastore apache/hive:3.1.3
>>> b8674d57fa252258354b9795eb2098b020f7ea8987f519b51cc158196b3da35f
>>> [root@localhost ~]# docker run -d -p 10000:10000 -p 10002:10002 --env
>>> SERVICE_NAME=hiveserver2 --env
>>> SERVICE_OPTS="-Dhive.metastore.uris=thrift://metastore:9083" --env
>>> IS_RESUME="true" --name hiveserver2-standalone apache/hive:3.1.3
>>> 4478c26d41aab075da8b014dd0cb64c0ef6baec148872f761b697fc674edfc6b
>>> ```
>>>
>>>
>>> The hive container seem like started properly.
>>> But I can not start beeline with command:
>>>
>>> ```
>>> [root@localhost ~]#  docker exec -it hiveserver2-standalone beeline -u
>>> 'jdbc:hive2://localhost:10000/'
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/opt/hive/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>> SLF4J: Actual binding is of type
>>> [org.apache.logging.slf4j.Log4jLoggerFactory]
>>> Connecting to jdbc:hive2://localhost:10000/
>>> 24/09/29 09:53:35 [main]: WARN jdbc.HiveConnection: Failed to connect to
>>> localhost:10000
>>> Could not open connection to the HS2 server. Please check the server URI
>>> and if the URI is correct, then ask the administrator to check the server
>>> status.
>>> Error: Could not open client transport with JDBC Uri:
>>> jdbc:hive2://localhost:10000/: java.net.ConnectException: Connection
>>> refused (Connection refused) (state=08S01,code=0)
>>> Beeline version 3.1.3 by Apache Hive
>>> [WARN] Failed to create directory: /home/hive/.beeline
>>> No such file or directory
>>> [root@localhost ~]#  docker exec -it hiveserver2-standalone beeline -u
>>> 'jdbc:hive2://localhost:10000/'
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/opt/hive/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>> SLF4J: Actual binding is of type
>>> [org.apache.logging.slf4j.Log4jLoggerFactory]
>>> Connecting to jdbc:hive2://localhost:10000/
>>> 24/09/29 09:59:12 [main]: WARN jdbc.HiveConnection: Failed to connect to
>>> localhost:10000
>>> Could not open connection to the HS2 server. Please check the server URI
>>> and if the URI is correct, then ask the administrator to check the server
>>> status.
>>> Error: Could not open client transport with JDBC Uri:
>>> jdbc:hive2://localhost:10000/: java.net.ConnectException: Connection
>>> refused (Connection refused) (state=08S01,code=0)
>>> Beeline version 3.1.3 by Apache Hive
>>> [WARN] Failed to create directory: /home/hive/.beeline
>>> No such file or directory
>>> ```
>>>
>>> Could you give me some help. Thanks.
>>>
>>> [1] https://hub.docker.com/r/apache/hive
>>>
>>> ________________________
>>>
>>>
>>> Jia Fan
>>>
>>

Reply via email to