NFA 9.5 Harvester mysql_upgrade: Got error: 2003

Document ID : KB000111672
Last Modified Date : 20/08/2018
Show Technical Document Details
Issue:
Upgrading to Network Flow Analysis 9.5.

During upgrading a Linux Harvester from 9.3.8 to 9.5 the error below was seen:
MySQL Upgrade has failed. Please see /CA/NFA/MySql_Upgrade_Log.log for more information.

EXECUTE_STDERR =

mysql_upgrade: Got error: 2003: Can't connect to MySQL server on 'localhost' (111) while connecting to the MySQL server
Upgrade process encountered error and will not continue.


EXECUTE_EXITCODE = 11

=======================================================================================

MySQL Upgrade Failure -  Required Next Steps

1) Contact CA Support for assistance
2) Resolve the issue preventing mysql_upgrade from completing successfully (see log output above)
3) Run mysql_upgrade for each instance that failed (see log output above)
4) Restart both the "CA MySQL" and "NetQoS NQMySql" services
5) Run the schema migrator:
        Windows: cmd /C cscript /CA/NFA/migrator/runMigrator.vbs
        Linux: /CA/NFA/migrator/runMigrator.sh
6) Restart the system
Resolution:
1. Check to see if the nfa_mysqlCSE service is running by running:
service nfa_mysqlCSE status

If it is running it will have an output like below:
MySQL CSE running (10765)                                  [  OK  ]
 
2. Make note of the process ID. In the example above it is 10765

3. Kill the nfa_mysqlCSE process by running:
kill -9 10765

4. Start the nfa_mysqlCSE service by running:
service nfa_mysqlCSE start

5. Run the mysql_upgrade manually by running:
mysql_upgrade -P3307 -h 127.0.0.1

6. Change directory to /opt/CA/NFA/migrator and run:
./runMigrator.sh

7. Check the output or the migrator.log to see if it ends with "Exiting with code 0'. If so the database upgrade is complete.
If there is an error search Support.ca.com for the error, or contact CA Support and provide the migrator.log file.

8. Start all CA NFA services.
service mysql start
service nfa_collpollws start
service nfa_dataretention start
service nfa_filewebservice start
service nfa_harvester start
service nfa_mysqlCSE start
service nfa_poller start
service nfa_proxies start
service nfa_reaper start

9. Continue on with the NFA Console upgrade and verify that data is being received.