We have seen a few situations where the Harvester upgrade from 9.0.161 to NFA 9.1.3 fails during the migrator stage of the upgrade with the same error.
The migrator is responsible for performing all of the mysql updates needed for each upgrade.
In this case the \Netqos\migrator\migrator.log file stated that it could not insert into poller.routers from harvester.routers and harvester.console_routers because the 'profileID' column did not allow a 'NULL' value.
The full error is:
FATAL TheSet::play() - Error playing back movie
com.ca.im.migrator.exceptions.MigratorException: Movie playback failed.
at com.ca.im.migrator.business.Projector.play(Unknown Source)
at com.ca.im.migrator.TheSet.play(Unknown Source)
at com.ca.im.migrator.TheSet.migrate(Unknown Source)
at com.ca.im.migrator.MigratorApp.main(Unknown Source)
Caused by: com.ca.im.migrator.exceptions.SqlActionExecutionException: SQL action failed
at com.ca.im.migrator.business.action.SqlAction.execute(Unknown Source)
... 4 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'ProfileID' cannot be null
Solution
This can be corrected by changing the "left join" in the scirpt that loads up the poller database with just an "inner join". The offending script file can be found at '\<install_dir>\Netflow\sql\poller\toVersion9_1_0\populate-poller.sql' however you will need to update the '\NETQOS\collector_movie.xml', which needs to be edited to change the 'left join' to just 'join' as 'join' defaults to using inner join'.
To apply the chnages:
1) Go to the '\NETQOS\' directory and find the exisitng file named '\NETQOS\collector_movie.xml' and make a backup of the file.
2)Search for "left join harvester.console_routers" and remove 'left' from the file so that the full insert statement looks like below and save the file:
insert into poller.routers (address, state, statetime, profileid, discoverytime, routerpolltime, interfacespolltime, mappedtime, refreshtime, snmpversion, snmpport, snmpretries, snmptimeout, snmpmaxrepetitions, updatedon) select distinct cast(inet_ntoa(ho.Router) as char), IF(rr.firstpollerror=0,'Mapped','InitialPoll'), 0, rr.profileid, lastdiscovery,unix_timestamp(), unix_timestamp(), unix_timestamp(), lastrefresh, rr.snmpversion, rr.snmpport, rr.snmpretry, rr.snmptimeout, rr.snmpmaxrows, unix_timestamp() from harvester.routers ho join harvester.console_routers rr on ho.Router=rr.routerAddress
3) Open the Command Prompt and rerun the \<Install_Dir>\migrator\runMigrator.vbs script and check then check the \<Install_Dir>\migrator\migrator.log file to see if the migrator completes with exit code 0.
**Note you will only see this problem on upgrades from 9.0.161*