Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive2 working with Beeline JDBC but not through Hue

avatar
New Contributor

Hi guys,

 

I am able to connect to my Hive2 server with the following command: 

 

beeline jdbc:hive2://<hostname>:10001/;ssl=true;sslTrustStore=/etc/hadoop/conf/hive-truststore.jks;trustStorePassword=<redacted>;transportMode=https;httpPath=cliservice

 

However, when I try to connect with Hue I get the following error:

 

500 Server Error: Server Error for url: https://<hostname>:10001/cliservice/ <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 </title> </head> <body> <h2>HTTP ERROR: 500</h2> <p>Problem accessing /cliservice/. Reason: <pre> java.lang.IllegalArgumentException: Invalid sign, original = <long string> current = <another long string></pre></p> <hr /><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.3.25.v20180904</a><hr/> </body> </html> (error 500)

 

In my hiveserver2.log it shows the error in more detail:

 

2022-11-30T15:27:31,281 WARN [HiveServer2-HttpHandler-Pool: Thread-153]: servlet.ServletHandler (:()) - /cliservice/
java.lang.IllegalArgumentException: Invalid sign, original = <long string> current = <another long string>
at org.apache.hive.service.CookieSigner.verifyAndExtract(CookieSigner.java:85) ~[hive-service-3.1.0.3.1.5.0-152.jar:3.1.0.3.1.5.0-152]
at org.apache.hive.service.cli.thrift.ThriftHttpServlet.getClientNameFromCookie(ThriftHttpServlet.java:269) ~[hive-service-3.1.0.3.1.5.0-152.jar:3.1.0.3.1.5.0-152]
at org.apache.hive.service.cli.thrift.ThriftHttpServlet.validateCookie(ThriftHttpServlet.java:325) ~[hive-service-3.1.0.3.1.5.0-152.jar:3.1.0.3.1.5.0-152]
at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(ThriftHttpServlet.java:146) ~[hive-service-3.1.0.3.1.5.0-152.jar:3.1.0.3.1.5.0-152]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:513) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:493) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.Server.handle(Server.java:539) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) ~[jetty-io-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) ~[jetty-io-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:259) ~[jetty-io-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) ~[jetty-io-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) ~[jetty-io-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) ~[jetty-io-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) ~[jetty-runner-9.3.25.v20180904.jar:9.3.25.v20180904]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_312]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_312]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]

 

I was wondering what would cause this error from Hue when connecting to Hive2 with Beeline works fine?

 

Thanks,

 

David

4 REPLIES 4

avatar
Expert Contributor

@d_liu 

Quickest way would be to restart HS2/Hue.

Are you able to fetch results from impala?

 

avatar
New Contributor

Hi Asim, I did restart HS2 yesterday afternoon but it did not fix the error. However, accessing HS2 from Hue magically worked this morning for myself and another colleague. It must have reset itself overnight or something?

avatar
Expert Contributor

Hi @d_liu  

Could be you took restart of HS2 but didn't logged in again from Hue, could be it is using same session.

But HS2 restart should solve your problem.

avatar
Master Collaborator

@d_liu It seems like it was using a cookie based authentication(hive.server2.thrift.http.cookie.auth.enabled=true set in HS2 config), and it failed due to some error at the server end. Do you have multiple Hive servers configured with Hue, and now it is trying to connect to a different instance? As suggested by @Basim earlier, restart HS2 and Hue service, and retry.