启动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.mzph.cn/news/55556.shtml

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

相关文章

使用VisualStudio制作上位机(五)

文章目录 使用VisualStudio制作上位机(五)第四部分:GUI界面数据显示使用VisualStudio制作上位机(五) Author:YAL 第四部分:GUI界面数据显示 这一部分,主要实现GUI的界面显示。 上一文已经实现了CAN数据的接收,并将数据更新到数组里。所以在做界面的显示时,只需要在…

C#设计模式六大原则之--接口隔离原则

设计模式六大原则是单一职责原则、里氏替换原则、依赖倒置原则、接口隔离原则、迪米特法则、开闭原则。它们不是要我们刻板的遵守&#xff0c;而是根据实际需要灵活运用。只要对它们的遵守程度在一个合理的范围内&#xff0c;努为做到一个良好的设计。本文主要介绍一下.NET(C#)…

软考高级系统架构设计师系列论文真题一:论软件系统架构风格:真题分析、理论素材、精品范文赏析

软考高级系统架构设计师系列论文真题一:论软件系统架构风格:真题分析、理论素材、精品范文赏析 一、论软件系统架构风格二、论文解题思路1.找准核心论点2.理论素材准备三、精品范文赏析1.摘要2.正文3.总结一、论软件系统架构风格 系统架构风格是描述某一特定应用领域中系统组…

数据结构(Java实现)-ArrayList与顺序表

什么是List List是一个接口&#xff0c;继承自Collection。 List的使用 List是个接口&#xff0c;并不能直接用来实例化。 如果要使用&#xff0c;必须去实例化List的实现类。在集合框架中&#xff0c;ArrayList和LinkedList都实现了List接口。 线性表 线性表&#xff08;lin…

【LeetCode】392. 判断子序列 - 双指针

这里写自定义目录标题 2023-8-24 18:53:25 392. 判断子序列 2023-8-24 18:53:25 class Solution {public boolean isSubsequence(String s, String t) {int sIndex 0;// 遍历原始字符串for (int i 0; i < t.length(); i) {// 子字符串的下标 已经等于 子字符串的长度// …

0821|C++day1 初步认识C++

一、思维导图 二、知识点回顾 【1】QT软件的使用 1&#xff09;创建文件 创建文件时&#xff0c;文件的路径一定是全英文 2&#xff09;修改编码 工具--->选项--->行为--->默认编码&#xff1a;system 【2】C和C的区别 C又叫C plus plus&#xff0c;C是对C的扩充&…

Ubuntu18.04 交叉编译curl-7.61.0

下载 官方网址是&#xff1a;curl 安装依赖库 如果需要curl支持https协议&#xff0c;需要先交叉编译 openssl,编译流程如下&#xff1a; Ubuntu18.04 交叉编译openssl-1.1.1_我是谁&#xff1f;&#xff1f;的博客-CSDN博客 解压 # 解压&#xff1a; $tar -xzvf curl-7.61.…

机器学习——KNN算法

1、&#xff1a;前提知识 KNN算法是机器学习算法中用于分类或者回归的算法&#xff0c;KNN全称为K nearest neighbour&#xff08;又称为K-近邻算法&#xff09; 原理&#xff1a;K-近邻算法采用测量不同特征值之间的距离的方法进行分类。 优点&#xff1a;精度高 缺点&…

【Eclipse】汉化简体中文教程(官方汉化包,IDE自带软件安装功能),图文详情

目录 0.环境 1.步骤 1&#xff09;查看eclipse的版本 2&#xff09;在官网找语言包&#xff0c;并复制链接 3&#xff09;将链接复制到eclipse中 4&#xff09;汉化完成 0.环境 windows11&#xff0c;64位&#xff1b; eclipse 2021-6版本 1.步骤 思路&#xff1a;在官网找…

LabVIEW利用线性压缩弹簧开发重量测量系统

LabVIEW利用线性压缩弹簧开发重量测量系统 柔性传感器的曲率半径相对于指定重量的变化特性可用作力测量方法。在许多应用中&#xff0c;例如&#xff1a;汽车和工业控制&#xff0c;计算机外围设备&#xff0c;操纵杆和测量设备&#xff0c;带有压缩弹簧和柔性传感器的重量测量…

python中以 _ _ 开头的属性 和方法

在Python中&#xff0c;以下划线 (_) 开头的属性和方法通常被视为内部使用或私有的。而以双下划线 (__&#xff09;开头并且不以双下划线结尾的属性和方法叫做“名称修饰&#xff08;name mangling&#xff09;”。 以单下划线 (_) 开头的属性和方法&#xff1a; 这种命名约定暗…

MVSNet (pytorch版) 搭建环境 运行dtu数据集重建 实操教程(图文并茂、超详细)

文章目录 1 准备工作1.1 下载源码1.2 测试集下载2 配置环境3 dtu数据集 重建演示3.1 重建效果查看4 补充解释4.1 bash 脚本文件超参数解释4.2 lists/dtu解释5 Meshlab查看三维点云时 ,使用技巧总结1 Meshlab查看三维点云时 ,换背景颜色2 Meshlab查看三维点云时,点云颜色很暗…

咸鱼之王俱乐部网站开发

我的俱乐部 最新兑换码 *注意区分大小写&#xff0c;中间不能有空格&#xff01; APP666 HAPPY666 QQ888 QQXY888 vip666 VIP666 XY888 app666 bdvip666 douyin666 douyin777 douyin888 happy666 huhushengwei888 taptap666 周活动 宝箱周 宝箱说明 1.木质宝箱开启1个…

电容器件选型与应用案例

关注参数&#xff08;1&#xff09;容量和误差 实际电容量和标称电容量允许的最大偏差范围。在选型上注意精度等级&#xff0c;用字母表示&#xff1a;D—0.5%、F—1%、G—2%、J—5%、K—10%、M—20% &#xff08;2&#xff09;额定工作电压 电容器在电路中能够长期稳定、可靠工…

lintcode 1132 · 合法的三角数【中等】

题目链接&#xff0c;描述 https://www.lintcode.com/problem/1132 给定一个包含非负整数的数组&#xff0c;你的任务是计算从数组中选出的可以制作三角形的三元组数目&#xff0c;如果我们把它们作为三角形的边长。给定数组的长度不会超过 1000. 给定数组内的整数在 [0, 100…

2023SpringMvc和spring之八股文——面试题

概述 什么是Spring MVC&#xff1f;简单介绍下你对Spring MVC的理解&#xff1f; Spring MVC是一个基于Java的实现了MVC设计模式的请求驱动类型的轻量级 Web框架&#xff0c;通过把模型-视图-控制器分离&#xff0c;将web层进行职责解耦&#xff0c;把复杂的 web应用分成逻辑…

【C++入门到精通】C++入门 —— deque(STL)

阅读导航 前言一、deque简介1. 概念2. 特点 二、deque使用1. 基本操作&#xff08;增、删、查、改&#xff09;2. 底层结构 三、deque的缺陷四、 为什么选择deque作为stack和queue的底层默认容器总结温馨提示 前言 文章绑定了VS平台下std::deque的源码&#xff0c;大家可以下载…

【C/C++】探索内存对齐的奥秘与优势

目录 一&#xff0c;前言 二&#xff0c;什么是内存对齐&#xff1f; 三&#xff0c;内存对齐的原理 四&#xff0c;内存对齐的优势 五&#xff0c;如何实现内存对齐&#xff1f;&#xff08;看这节就行&#xff09; 1.使用 #pragma pack 来实现内存对齐的示例 七&#…

R包开发-2.2:在RStudio中使用Rcpp制作R-Package(更新于2023.8.23)

目录 4-添加C函数 5-编辑元数据 6-启用Roxygen&#xff0c;执行文档化。 7-单元测试 8-在自己的计算机上安装R包&#xff1a; 9-程序发布 参考&#xff1a; 为什么要写这篇文章的更新日期&#xff1f;因为R语言发展很快&#xff0c;很多函数或者方式&#xff0c;现在可以使…

Yolo系列-yolov1

YOLO-V1 经典的one-stage方法 YouOnlyLookOnce&#xff0c;名字就已经说明了一切&#xff01;把检测问题转化成回归问题&#xff0c;一个CNN就搞定了&#xff01;可以对视频进行实时检测&#xff0c;应用领域非常广&#xff01; 核心思想&#xff1a; Yolov1的核心思想是将对象…