当前位置: 首页 > news >正文

启动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的时候就正常了

相关文章:

启动metastore服务报错

启动Metastore的时候报错&#xff1a; 简略的报错信息&#xff1a; MetaException(message:Error creating transactional connection factory)Caused by: MetaException(message:Error creating transactional connection factory)Caused by: javax.jdo.JDOFatalInternalExce…...

c 语言 算法 技巧 之 用移位来代替乘除

除法 当你需要计算一个数的一半时&#xff0c;通常我们会考虑使用除法运算&#xff08;/&#xff09;来实现。然而&#xff0c;计算机内部的运算中&#xff0c;除法通常比加法和乘法运算慢得多&#xff0c;因为除法需要更多的处理步骤。 位运算在这种情况下可以提供一个快速的…...

python爬虫实战零基础(3)——某云音乐

爬取某些云网页音乐&#xff0c;无需app 分析网页第二种方式批量爬取 声明&#xff1a;仅供参考学习&#xff0c;参考&#xff0c;若有不足&#xff0c;欢迎指正 你是不是遇到过这种情况&#xff0c;在pc端上音乐无法下载&#xff0c;必须下载客户端才能下载&#xff1f; 那么&…...

渗透测试漏洞原理之---【XSS 跨站脚本攻击】

文章目录 1、跨站 脚本攻击1.1、漏洞描述1.2、漏洞原理1.3、漏洞危害1.4、漏洞验证1.5、漏洞分类1.5.1、反射性XSS1.5.2、存储型XSS1.5.3、DOM型XSS 2、XSS攻防2.1、XSS构造2.1.1、利用<>2.1.2、JavaScript伪协议2.1.3、时间响应 2.2、XSS变形方式2.2.1、大小写转换2.2.2…...

【浮点数二分】

数的三次方根 #include<iostream> using namespace std;double n;int main(){cin>>n;double l -10000;double r 10000;while((r-l)>1e-8){double mid (lr)/2;if((mid*mid*mid)>n) r mid;else l mid;}printf("%lf",l);return 0; }...

基于FPGA的FIR低通滤波器实现(附工程源码),matlab+vivado19.2+simulation

基于FPGA的FIR低通滤波器实现(附工程源码) 文章目录 基于FPGA的FIR低通滤波器实现(附工程源码)前言一、matlab设计FIR滤波器&#xff0c;生成正弦波1.设计FIR滤波器1.生成正弦波.coe 二、vivado1.fir滤波器IP核2.正弦波生成IP核3.时钟IP核设置4.顶层文件/测试文件代码 三.simul…...

c++ qt--事件(第六部分)

c qt–事件&#xff08;第六部分&#xff09; 一.编辑伙伴&#xff0c;编辑顺序&#xff08;按TAB进行切换&#xff09; 1.编辑伙伴 此功能在设计界面如下的位置 1.设置伙伴关系 鼠标左键长按一个Label组件然后把鼠标移到另一个组件上 2.伙伴关系的作用 伙伴关系的作用就是…...

嵌入式系统入门实战:探索基本概念和应用领域

嵌入式系统是一种专用的计算机系统,它是为了满足特定任务而设计的。这些系统通常具有较低的硬件资源(如处理器速度、内存容量和存储容量),但具有较高的可靠性和实时性。嵌入式系统广泛应用于各种领域,如家用电器、汽车、工业控制、医疗设备等。 嵌入式系统的基本概念 微控…...

关于hive sql进行调优的理解

这是一个面试经常面的问题&#xff0c;很不幸&#xff0c;在没有准备的时候&#xff0c;我面到了这个题目&#xff0c;反思了下&#xff0c;将这部分的内容进行总结&#xff0c;给大家一点分享。 hive其实是基于hadoop的数据库管理工具&#xff0c;底层是基于MapReduce实现的&a…...

十大排序算法

一、冒泡排序 冒泡排序&#xff08;Bubble Sort&#xff09;是一种简单直观的排序算法。它重复地走访要排序的数列&#xff0c;一次比 较两个元素&#xff0c;如果他们的顺序错误就把他们交换过来。走访数列的工作是重复地进行直到没有再需要交换&#xff0c;也就是说该数列已经…...

PIP 常用操作汇总

1. 升级 python -m pip install --upgrade pip2. 列出所有安装包 pip list3. 查找特定包 pip list | findstr xxx4. 查看特定包 pip show xxx5. 安装软件包 pip install pyzmq24.0.16. 卸载软件包 pip uninstall -y pyzmq7. 查看配置 # 生效的配置&#xff08;global -&…...

线性代数的本质笔记(3B1B课程)

文章目录 前言向量矩阵行列式线性方程非方阵点积叉积基变换特征向量与特征值抽象向量空间 前言 最近在复习线代&#xff0c;李永乐的基础课我刷了一下&#xff0c;感觉讲的不够透彻&#xff0c;和我当年学线代的感觉一样&#xff0c;就是不够形象。 比如&#xff0c;行列式为…...

快速掌握MQ消息中间件rabbitmq

快速掌握MQ消息中间件rabbitmq 目录概述需求&#xff1a; 设计思路实现思路分析1.video 参考资料和推荐阅读 Survive by day and develop by night. talk for import biz , show your perfect code,full busy&#xff0c;skip hardness,make a better result,wait for change,c…...

Git push拦截

遇到的问题 今天想提交代码到gitee&#xff0c;结果发现被拦截了&#xff0c;有段提示“forbidden by xxxx”… 我记得xxxx好像是公司的一个防泄密的东西… 这个东西是怎么实现的呢&#xff1f; 解决 原来git提供很多hook&#xff0c;push命令就有一个pre-push的hook&#x…...

拼多多anti-token分析

前言&#xff1a;拼多多charles抓包分析发现跟商品相关的请求头里都带了一个anti-token的字段且每次都不一样,那么下面的操作就从分析anti-token开始了 1.jadx反编译直接搜索 选中跟http相关的类对这个方法进行打印堆栈 结合堆栈方法调用的情况找到具体anti-token是由拦截器类f…...

基于微信小程序的中医体质辨识文体活动的设计与实现(Java+spring boot+MySQL)

获取源码或者论文请私信博主 演示视频&#xff1a; 基于微信小程序的中医体质辨识文体活动的设计与实现&#xff08;Javaspring bootMySQL&#xff09; 使用技术&#xff1a; 前端&#xff1a;html css javascript jQuery ajax thymeleaf 微信小程序 后端&#xff1a;Java s…...

4.16 TCP 协议有什么缺陷?

目录 升级 TCP 的工作很困难 TCP 建立连接的延迟 TCP 存在队头阻塞问题 网络迁移需要重新建立 TCP 连接 升级 TCP 的工作很困难&#xff1b;TCP 建立连接的延迟&#xff1b;TCP 存在队头阻塞问题&#xff1b;网络迁移需要重新建立 TCP 连接&#xff1b; 升级 TCP 的工作很…...

VMware 修改ip地址 虚拟机静态ip设置 centos动态ip修改为静态ip地址 centos静态ip地址 vmware修改ip地址

虚拟机的centos服务器经常变换ip&#xff0c;测试起来有些麻烦&#xff0c;故将动态ip修改为静态ip 1. 查看vmware 虚拟机网络配置&#xff1a; 点击编辑&#xff0c;打开虚拟网络配置 2. 选中nat模式&#xff0c;点击nat设置&#xff0c;最终获取网关ip: 192.168.164.2 3. 进…...

Deepin添加Ubuntu源

升级Deepin V23后&#xff0c;无法安装Zeal了&#xff0c;后面发现可以通过ubuntu源来安装。参考了以下两个文档。 添加Ubuntu源1 添加Ubuntu源2 1.添加ubuntu.list sudo vim /etc/apt/sources.list.d/ubuntu.list 2.添加中科大Ubuntu源 deb http://mirrors.ustc.edu.cn/…...

Mysql的多表查询和索引

MySQL 多表查询 当两个表查询时&#xff0c;从第一张表中取出一行和第二张表的每一行进行组合 返回结果含有两张表的所有列&#xff0c;一共返回的记录数第一张表行数*第二张表的行数&#xff08;笛卡尔积&#xff09; -- ?显示雇员名,雇员工资及所在部门的名字 【笛卡尔集…...

C++初阶-list的底层

目录 1.std::list实现的所有代码 2.list的简单介绍 2.1实现list的类 2.2_list_iterator的实现 2.2.1_list_iterator实现的原因和好处 2.2.2_list_iterator实现 2.3_list_node的实现 2.3.1. 避免递归的模板依赖 2.3.2. 内存布局一致性 2.3.3. 类型安全的替代方案 2.3.…...

智慧医疗能源事业线深度画像分析(上)

引言 医疗行业作为现代社会的关键基础设施,其能源消耗与环境影响正日益受到关注。随着全球"双碳"目标的推进和可持续发展理念的深入,智慧医疗能源事业线应运而生,致力于通过创新技术与管理方案,重构医疗领域的能源使用模式。这一事业线融合了能源管理、可持续发…...

linux 错误码总结

1,错误码的概念与作用 在Linux系统中,错误码是系统调用或库函数在执行失败时返回的特定数值,用于指示具体的错误类型。这些错误码通过全局变量errno来存储和传递,errno由操作系统维护,保存最近一次发生的错误信息。值得注意的是,errno的值在每次系统调用或函数调用失败时…...

第 86 场周赛:矩阵中的幻方、钥匙和房间、将数组拆分成斐波那契序列、猜猜这个单词

Q1、[中等] 矩阵中的幻方 1、题目描述 3 x 3 的幻方是一个填充有 从 1 到 9 的不同数字的 3 x 3 矩阵&#xff0c;其中每行&#xff0c;每列以及两条对角线上的各数之和都相等。 给定一个由整数组成的row x col 的 grid&#xff0c;其中有多少个 3 3 的 “幻方” 子矩阵&am…...

VM虚拟机网络配置(ubuntu24桥接模式):配置静态IP

编辑-虚拟网络编辑器-更改设置 选择桥接模式&#xff0c;然后找到相应的网卡&#xff08;可以查看自己本机的网络连接&#xff09; windows连接的网络点击查看属性 编辑虚拟机设置更改网络配置&#xff0c;选择刚才配置的桥接模式 静态ip设置&#xff1a; 我用的ubuntu24桌…...

【JavaSE】多线程基础学习笔记

多线程基础 -线程相关概念 程序&#xff08;Program&#xff09; 是为完成特定任务、用某种语言编写的一组指令的集合简单的说:就是我们写的代码 进程 进程是指运行中的程序&#xff0c;比如我们使用QQ&#xff0c;就启动了一个进程&#xff0c;操作系统就会为该进程分配内存…...

uniapp 开发ios, xcode 提交app store connect 和 testflight内测

uniapp 中配置 配置manifest 文档&#xff1a;manifest.json 应用配置 | uni-app官网 hbuilderx中本地打包 下载IOS最新SDK 开发环境 | uni小程序SDK hbulderx 版本号&#xff1a;4.66 对应的sdk版本 4.66 两者必须一致 本地打包的资源导入到SDK 导入资源 | uni小程序SDK …...

PostgreSQL——环境搭建

一、Linux # 安装 PostgreSQL 15 仓库 sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-$(rpm -E %{rhel})-x86_64/pgdg-redhat-repo-latest.noarch.rpm# 安装之前先确认是否已经存在PostgreSQL rpm -qa | grep postgres# 如果存在&#xff0…...

Ubuntu Cursor升级成v1.0

0. 当前版本低 使用当前 Cursor v0.50时 GitHub Copilot Chat 打不开&#xff0c;快捷键也不好用&#xff0c;当看到 Cursor 升级后&#xff0c;还是蛮高兴的 1. 下载 Cursor 下载地址&#xff1a;https://www.cursor.com/cn/downloads 点击下载 Linux (x64) &#xff0c;…...

【前端异常】JavaScript错误处理:分析 Uncaught (in promise) error

在前端开发中&#xff0c;JavaScript 异常是不可避免的。随着现代前端应用越来越多地使用异步操作&#xff08;如 Promise、async/await 等&#xff09;&#xff0c;开发者常常会遇到 Uncaught (in promise) error 错误。这个错误是由于未正确处理 Promise 的拒绝&#xff08;r…...