叶子枫
大佬们哪位能给个Platform的指导手册呀?有偿,谢谢!
Title
Coverity does not start after improper shutdown
Details
Coverity does not start correctly after an outage on the server.
$cov-im-ctl maint
Stopping Coverity Connect Application ... [ERROR] Caught at top level: null
See log file for details.
java.io.EOFException
at java.base/java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
at com.coverity.ces.launcher.CIMDaemonClient.command(CIMDaemonClient.java:96)
at com.coverity.ces.launcher.CovImCtl.go(CovImCtl.java:251)
at com.coverity.ces.launcher.CovImCtl.main(CovImCtl.java:343)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)
at install4j.com.coverity.ces.launcher.CovImCtl3320932810.main(Unknown Source)
Solution
If the issue is caused by database corruption, you may need to re-install Coverity Connect and restore the database from a backup achieve.
The easiest solution is to re-install Coverity Connect.
1. Generate a backup file if not already:
$cov-admin-db maint
$cov-admin-db backup /path/to/<backup_file>
2. Turn off the old Coverity Connect:
$cov-im-ctl stop
3. Launch the installer and choose "Fresh Installation". You may pick the same ports as the existing Coverity Connect.
4. After the installation finished, restore the backup:
$<new_CC>/bin/cov-admin-db maint
$<new_CC>/bin/cov-admin-db restore /path/to/<backup_file>
5. After the restore finishes, try to start the new Coverity Connect:
$<new_CC>/bin/cov-im-ctl start
6. If you have SSO, keystore configured, please copy the related settings to the new installation. If not, please ignore this step.
7. If the new installation worked great, you now can uninstall the old Coverity Connect.
If not, you can try to manually start the DB server to bypass the daemon:
$<Coverity_connect_dir>/bin/postgres/pg_ctl -o "-F -p <DB_port>" -D "<Coverity_connect_dir>/database" -N localhost -U coverity -P <DB_password> start
Please replace:
-<Coverity_connect_dir> as the path of your Coverity Connect installation directory
-<DB_port> is "maindb.password" listed in <Coverity_connect_dir>/config/cim.properties
If the command succeeds, below command will let you know that the database is already running:
$cov-im-ctl maint
Then you can start Coverity Connect using:
$cov-im-ctl start