1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > hive mysql 不兼容_Hive+mySql遇到的问题和解决办法

hive mysql 不兼容_Hive+mySql遇到的问题和解决办法

时间:2024-05-26 20:07:40

相关推荐

hive mysql 不兼容_Hive+mySql遇到的问题和解决办法

问题1:

Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby

...

Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby

at org.apache.hadoop.hdfs.server.namenode.ha.StandbyState.checkOperation(StandbyState.java:87)

...

org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:596)

at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:554)

at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:508)

... 7 more

出现原因:core-site.xml和hdfs-site.xml中的配置错误。如下图:我原先的配置是lida5:2181,lida2:2181,lida3:2181,后来我换服务器了,把lida5换成lida1了,但是忘了修改以上两文件中的配置,导致了上面错误的出现。

解决方法:修改core-site.xml和hdfs-site.xml文件中的配置。

问题2:

[ERROR] Terminal initialization failed; falling back to unsupported

java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected

at jline.TerminalFactory.create(TerminalFactory.java:101)

at jline.TerminalFactory.get(TerminalFactory.java:158)

at jline.console.ConsoleReader.(ConsoleReader.java:229)

at jline.console.ConsoleReader.(ConsoleReader.java:221)

at jline.console.ConsoleReader.(ConsoleReader.java:209)

at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:787)

at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:721)

at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)

at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected

at jline.console.ConsoleReader.(ConsoleReader.java:230)

at jline.console.ConsoleReader.(ConsoleReader.java:221)

at jline.console.ConsoleReader.(ConsoleReader.java:209)

at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:787)

at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:721)

at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)

at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

出现原因和解决办法可参看下面的连接:

http://blog..net/olfisher/article/details/48730229

到此还没完事,拷贝完之后,还需要删除/hadoop-2.5.2/share/hadoop/yarn/lib下的jline-0.9.94.jar

问题3:

FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

出现原因和解决办法可参看下面的连接:

/v/949343.html

问题4:

java.sql.SQLException: No suitable driver found for jdbc:jdbc:mysql://lida5/hive

at java.sql.DriverManager.getConnection(DriverManager.java:596)

at java.sql.DriverManager.getConnection(DriverManager.java:187)

at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)

at com.jolbox.bonecp.BoneCP.(BoneCP.java:416)

at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)

...

at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.(SessionHiveMetaStoreClient.java:74)

... 18 more

出现原因和解决办法:我已用蓝色字体标识出出错原因。解决办法自己悟吧!

问题5:

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://*.*.*.*:3306/*?useUnicode=true&characterEncoding=utf8, username = root. Terminating connection pool. Original Exception: ------

java.sql.SQLException: Access denied for user 'root'@'lida4l' (using password: NO)

出现原因和解决办法可参考下面的链接:

http://blog..net/jueshengtianya/article/details/12087443

问题6:

NestedThrowables:

java.sql.SQLException: Unable to open a test connection to the given database.JDBC url = jdbc:mysql://lida4:3306/hive, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app).Original Exception: ------

com.mysql.jdbc.municationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

...

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

Caused by: .ConnectException: Connection refused

at .PlainSocketImpl.socketConnect(Native Method)

...

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258)

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:305)

... 75 more

出现原因:mySql没有启动。

解决方法:先启动mySql,然后再启动Hive。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。