该问题一般由刷机完成后,并创建了Appliance,再去修改时区,ilom以及操作系统,使用了hwclock -w
错误信息如下:
run: cmd= '[/opt/oracle/dcs/mysql/etc/getodamysqlport.sh]'
2022-09-14 15:13:41,110 DEBUG [Thread-6] [] c.o.d.c.u.CommonsUtils: Output :
mysqladmin: connect to server at 'localhost' failed
2022-09-14 15:13:41,110 DEBUG [Thread-6] [] c.o.d.c.u.CommonsUtils: Output :
error: 'SSL connection error: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed'
2022-09-14 15:13:41,111 DEBUG [Thread-6] [] c.o.d.c.u.CommonsUtils: Output :
ODA MySQL is not running
2022-09-14 15:13:41,111 DEBUG [main] [] c.o.d.c.u.c.DCSProcessBuilder: Return code: 1
2022-09-14 15:13:41,111 DEBUG [main] [] c.o.d.c.u.c.CommandExecutor: Return code: 1
2022-09-14 15:13:41,111 ERROR [main] [] c.o.d.c.u.CommonsUtils: MySQL for ODA is not running
2022-09-14 15:13:41,118 DEBUG [main] [] c.o.d.c.n.MessageUtil: load locale as en_US
2022-09-14 15:13:41,121 ERROR [main] [] i.m.r.Micronaut: Error starting Micronaut server: DCS-10001:Internal error encountered: MySQL for ODA is not running.
com.oracle.dcs.commons.exception.DcsException: DCS-10001:Internal error encountered: MySQL for ODA is not running.
解决办法:
1、部分客户使用了重新image,该办法比较耗时,如果你的时间充足则去干吧(使用clean.sh -f不能解决)
2、重新做认证,针对19.10以上版本,ODA dcs使用了mysql数据库,执行如下命令即可解决
# systemctl stop initdcsagent
# systemctl stop oda-mysql
# cd /opt/oracle/dcs/mysql/cert/
# rm -rf /opt/oracle/dcs/odamysqlcert/
# sh gencerts.sh
# systemctl start oda-mysql
# systemctl start initdcsagent
这些命令不影响生产数据库正常使用
3、针对19.10以下版本,则需执行以下命令
1. - Stop dcs-agent --ALL nodes
#systemctl stop initdcsagent
2 - Stop Zookeeper (--ALL nodes
#/opt/zookeeper/bin/zkServer.sh stop
3.- Clean up version-2 folder (--ALL nodes
#mv /opt/zookeeper/data/version-2 /opt/zookeeper/data/version-2bak
4.Start zookeeper on both the nodes and check the status. It should be running properly. #/opt/zookeeper/bin/zkServer.sh status
5. Connect to the derby database on both the nodes and update the sync_entity table.
5.1 Download the Derby Client for Java 1.8. ( There are different clients for different versions.) Apache Derby 10.14.2.0 Release
5.2 Copy these jars to /tmp/ on all ODA Servers:
>> Below Db-derby_client/db-derby-10.14.2.0-bin/lib/ (from db-derby-10.14.2.0-bin.zip above)
derby.jar
derbyclient.jar
derbytools.jar
On all ODA Servers:
5.3 Backup the Derby database:
For example:
- From ODA node 0.
-- As root:
cd /tmp
mkdir derby_bak_20190610/
cd /tmp/derby_bak_20190610
cp -R /opt/oracle/dcs/repo .
-- Repeat the same steps above to backup the Derby Database on other ODA nodes.
5.4. Connect to Derby database and run sql commands to query/remove the rows in the metadata tables.
cd /opt/oracle/dcs/repo;
/opt/oracle/dcs/java/1.8.0_251/bin/java -cp /opt/oracle/dcs/repo/derby.jar:/opt/oracle/dcs/repo/derbytools.jar org.apache.derby.tools.ij ---
#java -cp /tmp/derby.jar:/[actual path of the derbytools.jar in that machine]/derbytools.jar org.apache.derby.tools.ij
ij version 10.11
ij> connect 'jdbc:derby:/opt/oracle/dcs/repo/node_0';
connect 'jdbc:derby:/opt/oracle/dcs/repo/node_1';
/opt/oracle/dcs/java/1.8.0_261/bin/java -cp /u01/db-derby-10.14.2.0-lib/lib/derby.jar:/u01/db-derby-10.14.2.0-lib/lib/derbytools.jar org.apache.derby.tools.ij
5.5
> show tables;
> update sync_entity set syncTimestamp=CURRENT_TIMESTAMP;
> commit;
6.Start dcs-agent
#systemctl start initdcsagent
完美解决