I wanted to explicitly connect to a hiveserver by specifying -u but that didn't work because it was not running/etc...
The strange thing is that somehow the default connection is activated...and tried
The possible "hazard" here is that if someone specifies -u $MY_DEV_HS2 -f recreate_db.sql to run some sql script...beeline may connect somewhere else and run the commands there - which might have serious consequences.... (in the above case having default as production might be interesting)
beeline -u jdbc:hive2:SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/18.104.22.168-1406/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/22.214.171.124-1406/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http:SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2:18/05/31 07:51:20 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10502
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2:Connecting to jdbc:hive2:18/05/31 07:51:21 [main]: INFO jdbc.HiveConnection: Connected to ctr-e138-1518143905142-336795-01-000003.hwx.site:10001
18/05/31 07:51:21 [main]: ERROR jdbc.HiveConnection: Error opening session
org.apache.thrift.transport.TTransportException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed