Hi Bitfox, did you check if HS2 is indeed running on port 10000? ("sudo lsof -i -P -n | grep LISTEN" for instance).
IIRC the default credentials are "hive/hive", can you try that too? HTH, Alessandro On Wed, 23 Feb 2022 at 03:17, Bitfox <bit...@bitfox.top> wrote: > Hello > > I have hive 2.3.9 installed by default on localhost for testing. > HDFS is also installed on localhost, which works correctly b/c I have > already used the file storage feature. > > I didn't change any configure files for hive. > > I can login into hive shell: > > hive> show databases; > > OK > > default > > Time taken: 4.458 seconds, Fetched: 1 row(s) > > > > After started hiveserver2 which works online, I can't connect via beeline: > > > beeline> !connect jdbc:hive2://localhost:10000/default > > Connecting to jdbc:hive2://localhost:10000/default > > Enter username for jdbc:hive2://localhost:10000/default: APP > > Enter password for jdbc:hive2://localhost:10000/default: **** > > 22/02/23 10:11:41 [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/default: java.net.ConnectException: Connection > refused (Connection refused) (state=08S01,code=0) > > > > It prompts me to input username and password. > > I have tried both empty user/pass, and user "APP"/pass "mine". > > Neither of them will work. > > > > How can I fix this and connect to Hive correctly via beeline? > > > Sorry I am the newbie to Hive. > > > Thanks a lot. >