Migration Errors


Migration Errors

Below are some of the errors you might encounter when manually migrating a FIN 4.5 project to FIN 5. We'll discuss what they mean and how to resolve them if applicable or if they can be ignored. The manual migration will also create a couple migration log files every time migration is run. The user will be able to check these files and check what occurred during that particular migration. These files are created and stored in the bin folder of the FIN directory. The path to them looks something like this: C:\Program Files (x86)\FIN Framework\FIN Framework 5.0.3.2725\bin. They can be deleted or moved after migration if not needed anymore. It doesn't hurt to leave them there either.

There are two files and the names are schemed like below:

demo-migrate-20200124-145320 - projName-migrate-date-time. This contains the logs of what occurred in the command prompt when the migration ran. So whatever you see in the command prompt, it will be logged here.

demo-his-migrate-20200124-145323 - projName-his-migrate-date-time. This contains the full stack trace errors for the histories if any. There will be references in the above file to this one for more detailed errors if any.

Folio Migration Errors

Below are the folio migration errors.

1) Brand Error

If you get the below error, then it can be ignored.

Error: Brand error: sys::Err: Mismatched products: FinStack != SkySpark

2) Ext not found

The below error can be ignored as well as that ext is no longer used/required. There could be other extensions if you have custom extensions. You'll need to migrate those to FIN 5 if you haven't already or find the vendor and see if they already migrated it for FIN 5.

Error: [err] [demo] Ext not found: stackhubTools. Possible Reasons: 1) Not deployed, 2) Not properly migrated to 3.0

DB Migration Errors, Warnings and Info Comments

Below are the DB migration errors, warnings and info comments.

1) History verification: FAILED

This means that there were substantial his errors that were logged and should be checked before continuing.

Comment: [info] [demo] History verification: FAILED

How to resolve: Looks at the his errors below and see how they can be resolved.

2) Could not migrate his for <pointId>. Not Found: <hisIdPath>

This error means it could not find the his record for that particular point id referenced in the error. Every history has a corresponding location on disk (as mentioned in the file location in the error). For this particular point that directory is missing, so there is no data to migrate for this point. 

Error: [err] [demo] Could not migrate his for 1eeb15ac-070181f7. Not Found: file:/C:/Program Files (x86)/FIN Stack/FIN Stack 4.5.851/db/demo/data/his/b0/h014/

How to resolve: Can't be fixed so the user would skip this one. When the hisCollectInterval is triggered again, a new his record would be created for that point and the point would then get a new hisId to match it.

3) His verification for <pointId> failed with x errors

This error can mean different things depending on what the error is returned for it in the his migrate file. Below are couple error types we have encountered and how to resolve them.

His verification error type 1: Mismatched value type

This error means that the history for that point apparently changed type in FIN 4.5 at some point. For example, the full stack trace error below it says "Bool" != "Number". You would have to go back to the FIN 4.5 database and fix it.

Error: [err] [demo] His verification for 1eeb0050-0c624660 failed with 8 errors. See demo-his-migrate-20200124-145323.log

How to resolve: If we look at the his migrate log file like it mentions on the error, below is the full stack trace for this particular error that occurred 8 times. We copy the id in the error on the migrate file and do a search on the his migrate file to find that id. It would be found 8 times in this case.

  1. Run and open FIN 4.5 database

  2. Look at the error and copy the hisId

  3. Open legacy folio and query for: readAll(hisId=="pasteHisIdHere") example readAll(hisId=="0.001")

  4. See if multiple records are returned, if yes, then its likely that that point had its hisId value changed to something that already exists in the database and is conflicting with one that is a numeric hence the mismatch value of history and vice versa.

  5. First, we'll check if there are any orphaned histories that might belong to that point.

  6. Copy the id of the boolean point (in our example its the id of our Occ Mode point since that was in the error. The id is found in the error as well)

  7. Query this in legacy folio with the id of point: lint().findAll r=> r->msg.contains("@1eeb0050-0c624660")

  8. If one is returned, then that hisId should be applied to that point hisId value field.

  9. If none are returned, then a new hisId for that point should be generated. You can delete the hisId tag of that point and it would automatically get added when a new hisCollectInterval is triggered.

  10. If no orphaned histories were returned in step 7, then do step 9.

  11. After completing these, the database should be clean of all these errors.

[15:12:09 24-Jan-20] [err] [demo-his] [0.008] 1eeaff69-30d84ee5 Occ Mode: 2020 Feb folio::HisWriteErr: Mismatched value type, rec kind "Bool" != item type "haystack::Number" [@p:demo:r:1eeb0050-0c624660 "p:demo:r:1eeaff69-30d84ee5 Occ Mode"] folio::FolioUtil.hisWriteCheck (FolioUtil.fan:322) folio3::HisMgr.write (HisMgr.fan:59) folio3::HisMgr.write (HisMgr.fan) migrate::HisMigrate.run (HisMigrate.fan:75) migrate::YearIndex.eachMonth (HisIndex.fan:393) migrate::DataIndex.eachMonth (HisIndex.fan:277) migrate::HisMigrate.run (HisMigrate.fan:56) migrate::FolioMigrate.migrateHistories (FolioMigrate.fan:326) fan.sys.List.each (List.java:613) migrate::FolioMigrate.migrateHistories (FolioMigrate.fan:321) migrate::FolioMigrate.migrateRecs (FolioMigrate.fan:190) migrate::FolioMigrate.run (FolioMigrate.fan:37) migrate::MigrateTo_3_0.migrate (MigrateTo_3_0.fan:59) migrate::Migrate.migrateProj (MigrateMain.fan:240) fan.sys.List.each (List.java:608) migrate::Migrate.migrateProj (MigrateMain.fan:233) migrate::Migrate.migrate (MigrateMain.fan:224) fan.sys.List.each (List.java:608) migrate::Migrate.migrate (MigrateMain.fan:224) migrate::Migrate.run (MigrateMain.fan:63) migrate::Main.main (Main.fan:17) java.lang.reflect.Method.invoke (Method.java:498) fan.sys.Method.invoke (Method.java:573) fan.sys.Method$MethodFunc.callList (Method.java:212) fan.sys.Method.callList (Method.java:138) 5 More...

His verification error type 2: Invalid 'unit' tag

This error means that the point has a unit that is not found in the 3.0 unit database and/or unit is not configured correctly in the FIN 4.5 database. Its usually the latter.

Error: [err] [demo] His verification for 1eeb159a-a7c41ba0 failed with 8 errors. See demo-his-migrate-20200124-145323.log

How to resolve: If we look at the his migrate log file like it mentions on the error, below is the full stack trace for this particular error that occurred 8 times.

  1. We copy the id in the error on the migrate file and do a search on the his migrate file to find that id. It would be found 8 times in this case since it mentions that it occurred 8 times.

  2. Look at the error and if its this type, we run and open FIN 4.5 database

  3. Open legacy folio and query for: readAll(unit=="")

  4. If any records are returned, then you need to look if any points actually need a unit or not on numerics only (the ones with purple icon). 

    1. If yes, then select point and edit it to add unit

  5. If none need a unit, then select all points and Edit all

  6. Then delete the unit tag and apply

[15:12:09 24-Jan-20] [err] [demo-his] [0.059] 23e24987-d5c2e20c Control State: 2020 Jan folio::HisConfigErr: Invalid 'unit' tag: [@p:demo:r:23e24987-28d05b6c "p:demo:r:23e24987-d5c2e20c Control State"] folio::FolioUtil.hisUnit (FolioUtil.fan:224) folio::FolioUtil.hisUnit (FolioUtil.fan) folio::FolioUtil.hisWriteCheck (FolioUtil.fan:288) folio3::HisMgr.write (HisMgr.fan:59) folio3::HisMgr.write (HisMgr.fan) migrate::HisMigrate.run (HisMigrate.fan:75) migrate::YearIndex.eachMonth (HisIndex.fan:392) migrate::DataIndex.eachMonth (HisIndex.fan:277) migrate::HisMigrate.run (HisMigrate.fan:56) migrate::FolioMigrate.migrateHistories (FolioMigrate.fan:331) fan.sys.List.each (List.java:613) migrate::FolioMigrate.migrateHistories (FolioMigrate.fan:326) migrate::FolioMigrate.migrateRecs (FolioMigrate.fan:191) migrate::FolioMigrate.run (FolioMigrate.fan:37) migrate::MigrateTo_3_0.migrate (MigrateTo_3_0.fan:63) migrate::Migrate.migrateProj (MigrateMain.fan:253) fan.sys.List.each (List.java:608) migrate::Migrate.migrateProj (MigrateMain.fan:246) migrate::Migrate.migrate (MigrateMain.fan:237) fan.sys.List.each (List.java:608) migrate::Migrate.migrate (MigrateMain.fan:237) migrate::Migrate.run (MigrateMain.fan:64) migrate::Main.main (Main.fan:17) java.lang.reflect.Method.invoke (Method.java:498) fan.sys.Method.invoke (Method.java:573) 7 More...

4) [<hisId>] <pointId> OPCODE missing 'point' tag. Skipping

This warning is saying that point has a "his" tag but doesn't have the "point" tag. So it is skipped when migrating. 

Warning: [warn] [demo] [13.279] 1a477318-f3c060c5 OPCODE missing 'point' tag. Skipping

How to resolve: If needed, go back to FIN 4.5 database and find points that have the his tag but don't have the point tag, then add the "point" tag to them if they are supposed to be point records.

  1. Run and open the FIN 4.5 database

  2. Open legacy folio and query for: readAll(his and not point)

  3. Select all records that are returned if any

  4. Then select Edit to edit all of them and add point marker tag

5) Failed to migrate his for <pointId>

This NullErr error is happening because that point has an invalid "hisId" tag in FIN 4.5 and so it is failing to parse the history bucket.

Error: [err] [demo] Failed to migrate his for 22ff4a9e-b259c67c

How to resolve: From experience, its likely that there is a hisId tag on the point with no value id in the value field. It should automatically generate a new hisId. If not, there might be some other issue.

Checking history orphans if you want to see if you can recover previous history:

  1. Run and open FIN 4.5 database

  2. Open legacy folio and query for: lint().findAll r=> r->msg.contains("Orphaned his")

  3. If any are returned, look at the id next to the hisId in the "msg" column and copy it (this hisId was once associated with that id record)

  4. Then query for the in folio to see if that point id exists in the database: read(id==@idOfPoint)

  5. If a point is returned, then whatever that hisId was, belonged to that point. You can copy and paste that hisId in the hisId value field on the point.

  6. If no point is returned, that point no longer exists and that hisId is no longer needed and can be ignored/removed.

  7. To remove that hisId, the user would have to go to FIN directory and find that file. Path is something like this: C:\Program Files (x86)\FIN Stack\FIN Stack 4.5.851\db\demo\data\his

  8. User would need to look at the hisId and depending on that, look inside the proper folder to delete the file.

Generating new hisId (Note: previous history will be lost since new hisId is being generated):

  1. In legacy folio query for: readAll(hisId=="")

  2. Select the records returned and delete the hisId tag

  3. This will automatically generate a new hisId on the points when the next hisCollectInterval is triggered

  4. After hisCollectInterval should have been triggered, check points to make sure new hisId was generated

  5. If yes, then you're fine. If not, your his collect isn't working.

  6. See if there are an errors on the point if not, retoggle hisCollect and see if that does it.

[15:12:09 24-Jan-20] [err] [demo] Failed to migrate his for 22ff4a9e-b259c67c. sys::NullErr: java.lang.NullPointerException migrate::HisMigrate.findHis (HisMigrate.fan:103) migrate::HisMigrate.run (HisMigrate.fan:53) migrate::FolioMigrate.migrateHistories (FolioMigrate.fan:331) fan.sys.List.each (List.java:607) migrate::FolioMigrate.migrateHistories (FolioMigrate.fan:326) migrate::FolioMigrate.migrateRecs (FolioMigrate.fan:191) migrate::FolioMigrate.run (FolioMigrate.fan:37) migrate::MigrateTo_3_0.migrate (MigrateTo_3_0.fan:63) migrate::Migrate.migrateProj (MigrateMain.fan:240) fan.sys.List.each (List.java:602) migrate::Migrate.migrateProj (MigrateMain.fan:233) migrate::Migrate.migrate (MigrateMain.fan:224) fan.sys.List.each (List.java:602) migrate::Migrate.migrate (MigrateMain.fan:224) migrate::Migrate.run (MigrateMain.fan:63) migrate::Main.main (Main.fan:17) java.lang.reflect.Method.invoke (Unknown) fan.sys.Method.invoke (Method.java:573) fan.sys.Method$MethodFunc.callList (Method.java:212) fan.sys.Method.callList (Method.java:138) fanx.tools.Fan.callMain (Fan.java:183) fanx.tools.Fan.executeType (Fan.java:147) fanx.tools.Fan.execute (Fan.java:41) fanx.tools.Fan.run (Fan.java:308) fanx.tools.Fan.main (Fan.java:346) 1 More...

6) [<hisId>] <pointId> <pointName>: <year> <month>

This is saying that this point is logging history at a high frequency and so migration could not store it as it exceeded 1MB. The Folio Historian defaults to a history page size of 10day chunks. Each page has a 1MB size limit. This provides optimized performance for typical usage. Since this point is configured at high frequency, you would need to tune this default to ensure your chunks are less than 1MB.

Error: [err] [demo-his] [74.749] 1e381d7a-334efb2a HTG-O: 2020 Jan
folioStore::StoreErr: Data size exceeds limit: 1422565 > 1MB

How to resolve: The user would have to use an extra parameter in the migrate command. Look below to compare current command vs the new command to run when migrating. The "5day" can be a range between 2-10 with 10 being the default. We recommend trying halving from the default (10day) until it works. So maybe try first with 5day, then 2day, then 1day. If none of those work we'll need to understand the project data better.

  • current migrate command: migrate db -proj "C:\Program Files (x86)\FIN Stack\FIN Stack 4.5.851\db\demo"

  • new migrate command: migrate db -proj "C:\Program Files (x86)\FIN Stack\FIN Stack 4.5.851\db\demo" --3.0.0 -hisPageSize 5day

7) History missing index file: x

This means that the history is corrupt because the index file is missing.

Error: [err] [demo] History missing index file: 2.778 (2 data files)

How to resolve: Since the history index file is missing, there is no way to recover this.