By running this on hive shell you can start hive server:
hive --service hiveserver
By default hive runs on port 10000 so you can verify if
netstat -nl | grep 10000 any result, if this command shows something with 10000 that means your hive server is running. you can verify it by running jdbc:hive cliet code.
hive --service hiveserver
By default hive runs on port 10000 so you can verify if
netstat -nl | grep 10000 any result, if this command shows something with 10000 that means your hive server is running. you can verify it by running jdbc:hive cliet code.
how to stop it again???
ReplyDeletePress ctrl + c it will stop
DeleteHive server will run like that only.. after running hive server you can connect with jdbc/hive client or bin/hive
Deletewhen i tried ur ways it says "starting server..." and it remains as it is, so i tried following syntax but i got below error,
ReplyDeleteplz look at it
root@ubuntu:/usr# bin/hive --service hiveserver
Starting Hive Thrift Server
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:99)
at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:80)
at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:73)
at org.apache.hadoop.hive.service.HiveServer.main(HiveServer.java:530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
Just press ctrl + c it will stop
ReplyDeleteHIVE_PORT=11000 $HIVE_HOME/bin/hive --service hiveserver
DeleteTry these :
ReplyDelete1. Clean up the scratch.dir (tmp/hive-root) while restarting Hive server.
2. Check if something is already running on port no 10000 you can get information by typing
netstat -nl | grep 10000
if you something, you can understand that some processes is already occupying the port
HIVE_PORT=11000
export HIVE_PORT
then try to start the hive server and see what is happening..
its also possible that you can try to start the hive server on different port than the default port which is 10000, the syntax for starting hive on different port follows :