io.hops.exception.StorageInitializtionException: Error getting connection to cluster

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
************************************************************/

my configuration file:

# cat etc/hadoop/ndb.props

com.mysql.clusterj.connectstring = 172.31.36.217:1186
com.mysql.clusterj.database = hops
com.mysql.clusterj.connection.pool.size = 1
com.mysql.clusterj.max.transactions = 1024

io.hops.metadata.ndb.mysqlserver.data_source_class_name = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
io.hops.metadata.ndb.mysqlserver.host = 172.31.36.217
io.hops.metadata.ndb.mysqlserver.port = 3306
io.hops.metadata.ndb.mysqlserver.username = root
io.hops.metadata.ndb.mysqlserver.password = xxxxx
io.hops.metadata.ndb.mysqlserver.connection_pool_size = 10

#size of the session pool. should be altreat as big as the number of active Tx in the system
io.hops.session.pool.size = 1000
#Session is reused n times and then it is GCed
io.hops.session.reuse.count = 5000

there is an space before the password. Try removing it. For exmaple

io.hops.metadata.ndb.mysqlserver.password =xxxxx