Instance Synchroniser question

Ron28
Mega Sage

I've set up Instance Synchroniser (By Tom Hauri - link) )in our DEV instance to copy a table from another instance. When starting a copy job I always end up with a -106 Config not found error.

This is the object I put in the JSON Configuration "configuration" column:

var oCfg = {
	    job: {
			bLog: true,
			sQuery: 'u_stackISNOTEMPTY^u_phase=DES',
			aTables: ['cmdb_ci_kubernetes_namespace'],
			sTableJSONPrefix: 'TestSync_'
		},
		config: {
			bLog: true,
			sTargetTable: 'cmdb_ci_kubernetes_namespace',
			sErrorReturnType: 'full',
			bDoAction: true,
			sAction: 'update',
			oError: 'errorDetail'
		}
	};

I can see outbound REST calls to the remote instance that work, instance synch looks to get the number of records to copy first so it knows the number of 'chunks' to create. I can see from that I have 36 matching records but the copy itself fails with a -106 error.

The error seems clear but I don't understand what config and where it thinks it is missing. Has anyone else used this before and can help?

Thanks
Ron

1 ACCEPTED SOLUTION

Tom Hauri
ServiceNow Employee
ServiceNow Employee

Hi Ron,
Sorry, I did not get notified of this, maybe next time write me a comment on the post itself. As in my DM to you, I suggest you try the following configuration: 

var oCfg = {
	job: {
		bLog: true,
		oTables: {
			cmdb_ci_kubernetes_namespace: {
				sQuery: 'u_stackISNOTEMPTY^u_phase=DES',
			}, // kubernetes
		}, // minimal table config
		oScheduleCfg: {
			sRunStartTime: '15:10',
		}, // scheduler
	}, // job
	config: {
		bLog: true,
		//bKeepSysId: true,
		oErrorHandling: {
			oFieldType: {
				reference: {
					oByReferenceTable: {
						sys_user: 'warn',
					} // user table
				}, // ref type
				choice: {
					sErrorHandling: 'mapping',
				},
			} // field type
		}, // error handling
		sAction: 'save', // use update only if you really only want to make updates
	}
}; // config

Please let me know if this is solving your problem, happy to answer follow up in DM.
Thanks!
Tom

View solution in original post

3 REPLIES 3

Tom Hauri
ServiceNow Employee
ServiceNow Employee

Hi Ron,
Sorry, I did not get notified of this, maybe next time write me a comment on the post itself. As in my DM to you, I suggest you try the following configuration: 

var oCfg = {
	job: {
		bLog: true,
		oTables: {
			cmdb_ci_kubernetes_namespace: {
				sQuery: 'u_stackISNOTEMPTY^u_phase=DES',
			}, // kubernetes
		}, // minimal table config
		oScheduleCfg: {
			sRunStartTime: '15:10',
		}, // scheduler
	}, // job
	config: {
		bLog: true,
		//bKeepSysId: true,
		oErrorHandling: {
			oFieldType: {
				reference: {
					oByReferenceTable: {
						sys_user: 'warn',
					} // user table
				}, // ref type
				choice: {
					sErrorHandling: 'mapping',
				},
			} // field type
		}, // error handling
		sAction: 'save', // use update only if you really only want to make updates
	}
}; // config

Please let me know if this is solving your problem, happy to answer follow up in DM.
Thanks!
Tom

Ron28
Mega Sage

Thanks Tom, that stopped the -106 errors. I still have some relating to table data but I'm confident I can resolve those.

 

Regards

Ron

GraceBishop
Giga Contributor

Hi Ron, the -106 Config not found error typically indicates an issue with the configuration object in your JSON. Ensure it's properly defined and matches the required format. Use JSON.stringify to store the object and validate table accessibility and permissions on both instances. Simplify the configuration to test functionality, then reintroduce additional fields. I used 

https://ukwritings.com/coursework-service coursework service for the first time and was thoroughly impressed. The writer assigned to my coursework was highly knowledgeable in the subject and delivered exceptional work.