NFA 9.5 Harvester mysql_upgrade: Got error: 2003


Article ID: 111672


Updated On:


CA Network Flow Analysis (NetQos / NFA)


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.


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.



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/
6) Restart the system


Release: MSPNFA99000-9.5-Network Flow Analysis-MSP


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

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

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 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.