oozie没有在aws ec2示例中启动mysql

8qgya5xd  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(464)

我们正在aws ec2示例(5个节点)上安装一个hadoop集群,用于poc。
软件栈-hadoop、hdfs、oozie和mongodb。
我们能够成功安装hadoop、hdfs和mongodb。但是我们不能用mysql服务器安装oozie。我们得到以下错误

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
        at com.mysql.jdbc.Util.getInstance(Util.java:387)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2330)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
        at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
        ... 51 more
Caused by: java.lang.NullPointerException
        at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:2997)
        at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1936)
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1865)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1228)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284)

cloudera发行版-5.3.1
hadoop版本-2.5.0 oozie版本-4.0.0 mysql版本-mysql版本8.0.17 linux on x86_(mysql社区服务器gpl)
我们已经做了以下参考许多谷歌链接
创建oozie用户,授予特权等
正在将mysql连接器jar添加到oozie libext文件夹中。(mysql-connector-java-5.1.48-bin.jar)
oozie数据库和模式生成已经完成。但oozie服务没有启动。我们得到了连接拒绝错误。
如果需要更多的信息请告诉我。感谢您的指导。

fivyi3re

fivyi3re1#

这个问题解决了。问题是我们正在与另一个用户创建oozie数据库,因此它无法连接。我们使用同一个用户创建oozie数据库,并授予该用户所需的权限。效果不错。

CREATE USER 'hadoopuser'@'%' IDENTIFIED BY '<Password>';
GRANT ALL PRIVILEGES ON *.* TO 'hadoopuser'@'%';
FLUSH PRIVILEGES;

我们参考了mysql安装的以下链接-https://www.linode.com/docs/databases/mysql/how-to-install-mysql-on-centos-7/

相关问题