Background: I manually installed the latest code via https://hopsworks.readthedocs.io/en/latest/getting_started/installation_guide/hops-manual-installation-guide.html
ndb_mgm: 172.31.36.217:1186
MySQL server: 172.31.36.217:3306
database name: hops
If I use the following command line, it works well:
mysql -u root -p -h 172.31.36.217 --port=3306 -D hops
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
Server version: 8.0.20-cluster MySQL Cluster Community Server - GPL
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
However, if I format filesystem via ./bin/hdfs namenode -format
, then I got some errors:
************************************************************/
20/06/05 14:40:20 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
20/06/05 14:40:20 INFO namenode.NameNode: createNameNode [-format]
20/06/05 14:40:20 INFO resolvingcache.Cache: starting Resolving Cache [InMemoryCache]
20/06/05 14:40:20 INFO ndb.ClusterjConnector: Database connect string: 172.31.36.217:1186
20/06/05 14:40:20 INFO ndb.ClusterjConnector: Database name: hops
20/06/05 14:40:20 INFO ndb.ClusterjConnector: Max Transactions: 1024
20/06/05 14:40:20 INFO ndb.DBSessionProvider: Database connect string: 172.31.36.217:1186
20/06/05 14:40:20 INFO ndb.DBSessionProvider: Database name: hops
20/06/05 14:40:20 INFO ndb.DBSessionProvider: Max Transactions: 1024
20/06/05 14:40:20 ERROR namenode.NameNode: Failed to start namenode.
io.hops.exception.StorageInitializtionException: Error getting connection to cluster
at io.hops.metadata.ndb.NdbStorageFactory.setConfiguration(NdbStorageFactory.java:72)
at io.hops.metadata.HdfsStorageFactory.setConfiguration(HdfsStorageFactory.java:204)
at org.apache.hadoop.hdfs.server.namenode.NameNode.formatHdfs(NameNode.java:936)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1163)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1229)
20/06/05 14:40:20 INFO util.ExitUtil: Exiting with status 1: io.hops.exception.StorageInitializtionException: Error getting connection to cluster
20/06/05 14:40:20 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ip-172-31-41-79.ec2.internal/172.31.41.79
************************************************************/