启动metastore服务报错

启动Metastore的时候报错:

简略的报错信息:

 MetaException(message:Error creating transactional connection factory)Caused by: MetaException(message:Error creating transactional connection factory)Caused by: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:Caused by: java.lang.reflect.InvocationTargetExceptionCaused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "HikariCP" plugin t                                            o create a ConnectionPool gave an error : Failed to initialize pool: Communications link failureCaused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize po                                            ol: Communications link failureCaused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failureCaused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failureCaused by: java.net.ConnectException: 拒绝连接 (Connection refused)

完整的报错信息:

 MetaException(message:Error creating transactional connection factory)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:84)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:9                                            3)at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.jav                                            a:8661)at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.jav                                            a:8656)at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:8926)at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:8843)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.hadoop.util.RunJar.run(RunJar.java:323)at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: MetaException(message:Error creating transactional connection factory)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.                                            java:208)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108                                            )at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:80)... 11 more
Caused by: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetExceptionat org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDO                                            Helper.java:671)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenc                                            eManagerFactory.java:830)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(J                                            DOPersistenceManagerFactory.java:334)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOP                                            ersistenceManagerFactory.java:213)at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)at java.security.AccessController.doPrivileged(Native Method)at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:                                            1166)at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:650)at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:69                                            3)at org.apache.hadoop.hive.metastore.ObjectStore.initializeHelper(ObjectStore.java:483)at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:420)at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:375)at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:79)at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:139)at org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:59)at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStoreForConf(HiveMetaS                                            tore.java:718)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.j                                            ava:696)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:690                                            )at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStor                                            e.java:773)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:538)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.                                            java:147)... 13 more
Caused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.GeneratedConstructorAccessor74.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccesso                                            rImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPl                                            uginRegistry.java:606)at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:330)at org.datanucleus.store.AbstractStoreManager.registerConnectionFactory(AbstractStoreMana                                            ger.java:203)at org.datanucleus.store.AbstractStoreManager.<init>(AbstractStoreManager.java:162)at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:285)at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccesso                                            rImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPl                                            uginRegistry.java:606)at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHel                                            per.java:133)at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl                                            .java:422)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenc                                            eManagerFactory.java:817)... 43 more
Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "HikariCP" plugin t                                            o create a ConnectionPool gave an error : Failed to initialize pool: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactor                                            yImpl.java:232)at org.datanucleus.store.rdbms.ConnectionFactoryImpl.initialiseDataSources(ConnectionFact                                            oryImpl.java:117)at org.datanucleus.store.rdbms.ConnectionFactoryImpl.<init>(ConnectionFactoryImpl.java:82                                            )... 59 more
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize po                                            ol: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:544                                            )at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:536)at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:112)at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:72)at org.datanucleus.store.rdbms.connectionpool.HikariCPConnectionPoolFactory.createConnect                                            ionPool(HikariCPConnectionPoolFactory.java:176)at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactor                                            yImpl.java:213)... 61 more
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapp                                            ing.java:64)at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:356)at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:199)at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:444)at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:515)... 65 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at sun.reflect.GeneratedConstructorAccessor77.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccesso                                            rImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactor                                            y.java:167)at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)at com.mysql.cj.NativeSession.connect(NativeSession.java:119)at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)... 74 more
Caused by: java.net.ConnectException: 拒绝连接 (Connection refused)at java.net.PlainSocketImpl.socketConnect(Native Method)at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)at java.net.Socket.connect(Socket.java:606)at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:156)at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)... 77 more
Exception in thread "main" MetaException(message:Error creating transactional connection factory)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:84)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:9                                            3)at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.jav                                            a:8661)at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.jav                                            a:8656)at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:8926)at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:8843)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.hadoop.util.RunJar.run(RunJar.java:323)at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: MetaException(message:Error creating transactional connection factory)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.                                            java:208)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108                                            )at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:80)... 11 more
Caused by: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetExceptionat org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDO                                            Helper.java:671)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenc                                            eManagerFactory.java:830)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(J                                            DOPersistenceManagerFactory.java:334)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOP                                            ersistenceManagerFactory.java:213)at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)at java.security.AccessController.doPrivileged(Native Method)at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:                                            1166)at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:650)at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:69                                            3)at org.apache.hadoop.hive.metastore.ObjectStore.initializeHelper(ObjectStore.java:483)at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:420)at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:375)at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:79)at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:139)at org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:59)at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStoreForConf(HiveMetaS                                            tore.java:718)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.j                                            ava:696)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:690                                            )at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStor                                            e.java:773)at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:538)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.                                            java:147)... 13 more
Caused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.GeneratedConstructorAccessor74.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccesso                                            rImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPl                                            uginRegistry.java:606)at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:330)at org.datanucleus.store.AbstractStoreManager.registerConnectionFactory(AbstractStoreMana                                            ger.java:203)at org.datanucleus.store.AbstractStoreManager.<init>(AbstractStoreManager.java:162)at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:285)at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccesso                                            rImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPl                                            uginRegistry.java:606)at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHel                                            per.java:133)at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl                                            .java:422)at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenc                                            eManagerFactory.java:817)... 43 more
Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "HikariCP" plugin t                                            o create a ConnectionPool gave an error : Failed to initialize pool: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactor                                            yImpl.java:232)at org.datanucleus.store.rdbms.ConnectionFactoryImpl.initialiseDataSources(ConnectionFact                                            oryImpl.java:117)at org.datanucleus.store.rdbms.ConnectionFactoryImpl.<init>(ConnectionFactoryImpl.java:82                                            )... 59 more
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize po                                            ol: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:544                                            )at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:536)at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:112)at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:72)at org.datanucleus.store.rdbms.connectionpool.HikariCPConnectionPoolFactory.createConnect                                            ionPool(HikariCPConnectionPoolFactory.java:176)at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactor                                            yImpl.java:213)... 61 more
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapp                                            ing.java:64)at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:356)at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:199)at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:444)at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:515)... 65 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv                                            ed any packets from the server.at sun.reflect.GeneratedConstructorAccessor77.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccesso                                            rImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactor                                            y.java:167)at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)at com.mysql.cj.NativeSession.connect(NativeSession.java:119)at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)... 74 more
Caused by: java.net.ConnectException: 拒绝连接 (Connection refused)at java.net.PlainSocketImpl.socketConnect(Native Method)at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)at java.net.Socket.connect(Socket.java:606)at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:156)at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)... 77 more

怀疑是MySQL元数据出了问题:因为正常启动Metastore的时候是有进程的,但是一旦hiveserver2或者是Spark需要使用Metastore服务的时候,就会报错。

查看一下数据库的状态:

 mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since 五 2023-08-25 10:48:01 CST; 18min agoDocs: man:mysqld(8)http://dev.mysql.com/doc/refman/en/using-systemd.htmlProcess: 1373 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)Process: 983 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)Main PID: 1373 (code=exited, status=1/FAILURE)Status: "Server startup in progress"Error: 17 (文件已存在)825 10:47:56 datacollection systemd[1]: Starting MySQL Server...
825 10:48:01 datacollection systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
825 10:48:01 datacollection systemd[1]: Failed to start MySQL Server.
825 10:48:01 datacollection systemd[1]: Unit mysqld.service entered failed state.
825 10:48:01 datacollection systemd[1]: mysqld.service failed.

在这里插入图片描述

根据提供的错误信息,MySQL 服务器无法启动,导致 Hive Metastore 连接数据库失败。

主要的提示信息如下:

825 10:47:56 datacollection systemd[1]: Starting MySQL Server...
825 10:48:01 datacollection systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
825 10:48:01 datacollection systemd[1]: Failed to start MySQL Server.
825 10:48:01 datacollection systemd[1]: Unit mysqld.service entered failed state.
825 10:48:01 datacollection systemd[1]: mysqld.service failed.
这表明 MySQL 服务器启动失败,并且进入了失败状态。可能的原因和解决方法包括:配置问题:检查你的 MySQL 配置文件是否正确,特别是与 Hive Metastore 连接相关的配置。确保配置项中的数据库连接URL、用户名和密码等是正确的。数据库文件权限问题:错误消息中提到 "文件已存在",这可能意味着 MySQL 数据库文件的权限设置不正确。请确保数据库文件的所属用户和组正确,并且具有适当的权限。数据库服务未启动:请检查 MySQL 服务是否正在运行。你可以使用 systemctl status mysqld 命令来查看 MySQL 服务的当前状态。如果服务未运行,请尝试启动它:systemctl start mysqld
如果启动失败,请查看 MySQL 的错误日志文件以获取更多详细信息,并尝试解决错误。其他问题:MySQL 启动失败可能还有其他原因,如数据库损坏、资源不足或与其他进程的冲突。请检查 MySQL 的错误日志以获取更多信息,并根据具体情况尝试解决问题。请仔细检查以上建议,并尝试解决你的 MySQL 服务器启动问题。如果问题仍然存在,请考虑咨询你的系统管理员或 MySQL 社区支持以获取更多帮助

停止一下MySQL服务,再次查看状态:

在这里插入图片描述

重启一下MySQL的服务,再次查看状态:

在这里插入图片描述
可以看到这个时候MySQL状态正常

这个时候其他服务使用Metastore服务连接hive的时候就正常了

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/84632.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

网络安全02-C段扫描、开放端口

查询网站IP https://seo.chinaz.com/hetianlab.com 扫描指定IP&#xff1a;例&#xff1a;nmap -A -T4 ww.hetianlab.com -oX out.html 扫描指定段&#xff1a;例&#xff1a;nmap -O -Pn -A 192.168.113.1-200 扫描整个C段&#xff1a;例&#xff1a;nmap -O -Pn -A 192.168.…

Request对象和response对象

一、概念 request对象和response对象是通过Servlet容器&#xff08;如Tomcat&#xff09;自动创建并传递给Servlet的。 Servlet容器负责接收客户端的请求&#xff0c;并将请求信息封装到request对象中&#xff0c;然后将request对象传 递给相应的Servlet进行处理。类似地&…

MyBatis与Spring的集成整合加优化分页功能

目录 一.为什么要将MyBatis和Spring整合&#xff1f;&#xff1f;&#xff1f; 二.配置环境 2.1 pom文件 2.2 xml文件 三.演示举例 四.Aop整合pageHelper 分页插件 今天的分享就到这啦&#xff01;&#xff01;&#xff01; 一.为什么要将MyBatis和Spring整合&#xff1f…

[Mac软件]Pixelmator Pro 3.3.12 专业图像编辑中文版

Pixelmator Pro是专为Mac设计的功能强大&#xff0c;美观且易于使用的图像编辑器。借助广泛的专业级无损图像编辑工具&#xff0c;Pixelmator Pro可使您发挥出最佳的照片效果&#xff0c;创建华丽的构图和设计&#xff0c;绘制&#xff0c;绘画&#xff0c;应用令人惊叹的效果&…

学习中ChatGPT的17种用法

ChatGPT本质上是一个聊天工具&#xff0c;旧金山的人工智能企业OpenAI于2022年11月正式推出ChatGPT。那么&#xff0c;ChatGPT与其他人工智能产品相比有什么特殊呢&#xff1f; 它除了可以回答结构性的问题&#xff0c;例如语法修正、翻译和查找答案之外。最关键的是它能够去解…

Android Studio中引入MagicIndicator

1.github中下载文件 GitHub - hackware1993/MagicIndicator: A powerful, customizable and extensible ViewPager indicator framework. As the best alternative of ViewPagerIndicator, TabLayout and PagerSlidingTabStrip —— 强大、可定制、易扩展的 ViewPager 指示器框…

Nuxt.js--》添加路由、视图和过渡效果

博主今天开设Nuxt.js专栏&#xff0c;带您深入探索 Nuxt.js 的精髓&#xff0c;学习如何利用其强大功能构建出色的前端应用程序。我们将探讨其核心特点、灵活的路由系统、优化技巧以及常见问题的解决方案。无论您是想了解 Nuxt.js 的基础知识&#xff0c;还是希望掌握进阶技巧&…

探讨uniapp的路由与页面栈及参数传递问题

1首先引入页面栈 框架以栈的形式管理当前所有页面&#xff0c; 当发生路由切换的时候&#xff0c;页面栈的表现如下&#xff1a; 页面的路由操作无非&#xff1a;初始化、打开新页面、页面重定向、页面返回、tab切换、重加载。 2页面路由 uni-app 有两种页面路由跳转方式&am…

小研究 - J2EE 应用服务器的软件老化测试研究

软件老化现象是影响软件可靠性的重要因素&#xff0c;长期运行的软件系统存在软件老化现象&#xff0c;这将影响整个业务系统的正常运行&#xff0c;给企事业单位带来无可估量的经济损失。软件老化出现的主要原因是操作系统资源消耗殆尽&#xff0c;导致应用系统的性能下降甚至…

回归预测 | MATLAB实现PSO-RF粒子群优化算法优化随机森林算法多输入单输出回归预测(多指标,多图)

回归预测 | MATLAB实现PSO-RF粒子群优化算法优化随机森林算法多输入单输出回归预测&#xff08;多指标&#xff0c;多图&#xff09; 目录 回归预测 | MATLAB实现PSO-RF粒子群优化算法优化随机森林算法多输入单输出回归预测&#xff08;多指标&#xff0c;多图&#xff09;效果…

Redis从基础到进阶篇(二)----内存模型与内存优化

目录 一、缓存通识 1.1 ⽆处不在的缓存 1.2 多级缓存 &#xff08;重点&#xff09; 二、Redis简介 2.1 什么是Redis 2.2 Redis的应用场景 三、Redis数据存储的细节 3.1 Redis数据类型 3.2 内存结构 3.3 内存分配器 3.4 redisObject 3.4.1 type 3.4.2 encoding 3…

微信小程序路由以及跳转页面传递参数

路由 在app.json的pages里面写 "pages/页面/页面" 直接保存pages直接生成非常方便 跳转页面 wx.navigateTo() 保留当前页面&#xff0c;跳转到应用内的某个非tabBar页面。 <text bindtap"daka">点击</text> daka:function () {wx.navigateTo…