Error initializing data sink

This is one of a long list of errors I am seeing while either writing tag values, or refreshing devices.

Is this a db issue on my end, as I see it reference MySQLConn1.backup and .data

I noticed this because I am getting timeout errors when writing to tags.

[quote]com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: error in script file line: 20 file input/output errorerror file input/output error C:\PROGRA~2\INDUCT~1\Ignition\contexts\main\datacache\MySQLConn1\MySQLConn1.data (The requested operation cannot be performed on a file with a user-mapped section open) C:\PROGRA~2\INDUCT~1\Ignition\contexts\main\datacache/MySQLConn1/MySQLConn1.backup opening file - file C:\PROGRA~2\INDUCT~1\Ignition\contexts\main\datacache/MySQLConn1/MySQLConn1.data
org.hsqldb.jdbc.Util.sqlException(Util.java:363)
org.hsqldb.jdbc.Util.sqlException(Util.java:103)
org.hsqldb.jdbc.JDBCConnection.(JDBCConnection.java:3233)
org.hsqldb.jdbc.JDBCDriver.getConnection(JDBCDriver.java:285)
org.hsqldb.jdbc.JDBCDriver.connect(JDBCDriver.java:245)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.inductiveautomation.ignition.gateway.history.stores.HSQLDataStore.createInitialDatabase(HSQLDataStore.java:124)
com.inductiveautomation.ignition.gateway.history.stores.HSQLDataStore.initialize(HSQLDataStore.java:54)
com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:81)
com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:98)
com.inductiveautomation.ignition.gateway.history.ForwarderThread.run(ForwarderThread.java:74)
com.inductiveautomation.ignition.gateway.web.pages.config.systemconsole.LogViewer$SerializableLoggingEvent$ClonedThrowable: error in script file line: 20 file input/output errorerror file input/output error C:\PROGRA~2\INDUCT~1\Ignition\contexts\main\datacache\MySQLConn1\MySQLConn1.data (The requested operation cannot be performed on a file with a user-mapped section open) C:\PROGRA~2\INDUCT~1\Ignition\contexts\main\datacache/MySQLConn1/MySQLConn1.backup opening file - file C:\PROGRA~2\INDUCT~1\Ignition\contexts\main\datacache/MySQLConn1/MySQLConn1.data
org.hsqldb.error.Error.error(Error.java:112)
org.hsqldb.scriptio.ScriptReaderText.readDDL(ScriptReaderText.java:129)
org.hsqldb.scriptio.ScriptReaderBase.readAll(ScriptReaderBase.java:65)
org.hsqldb.persist.Log.processScript(Log.java:786)
org.hsqldb.persist.Log.open(Log.java:223)
org.hsqldb.persist.Logger.openPersistence(Logger.java:233)
org.hsqldb.Database.reopen(Database.java:265)
org.hsqldb.Database.open(Database.java:237)
org.hsqldb.DatabaseManager.getDatabase(DatabaseManager.java:225)
org.hsqldb.DatabaseManager.newSession(DatabaseManager.java:148)
org.hsqldb.jdbc.JDBCConnection.(JDBCConnection.java:3216)
org.hsqldb.jdbc.JDBCDriver.getConnection(JDBCDriver.java:285)
org.hsqldb.jdbc.JDBCDriver.connect(JDBCDriver.java:245)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.inductiveautomation.ignition.gateway.history.stores.HSQLDataStore.createInitialDatabase(HSQLDataStore.java:124)
com.inductiveautomation.ignition.gateway.history.stores.HSQLDataStore.initialize(HSQLDataStore.java:54)
com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:81)
com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:98)
com.inductiveautomation.ignition.gateway.history.ForwarderThread.run(ForwarderThread.java:74)[/quote]

No, this is an issue with the datacache system’s persistent storage. It looks like it was corrupted. You’ll need to delete all of the folders under %Install_Dir%/contexts/main/datacache and restart your Gateway.

There is currently a problem in the soft-restart system (which is used by actions like restoring a gateway backup) that can cause this problem. We will have it resolved soon.

That did the trick!!! Thank you very much!

Is it possible that writing too many tag values at one time could also corrupt this?

I am loading tag values with one button click:

[code]if valid:
# Selects the machineNumber, and writes the values to the corresponding tag

value = event.source.parent.getComponent('mb_select').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/mb_select' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('drum_spd_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Drum_SPD' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('trav_fast_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Fast' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('trav_slow_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Slow' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('trav_slow_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Slow_SP' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('trav_slow_val 1').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Trav_Slow_2_SP' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Total_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/TTMW' %(machineNumber)
system.tag.writeToTag(tagPath, value)

# Slow pass count goes to PassCountSlow.PRE, and Body 1 Slow Cycle -- (Multibody Functionality)
value = event.source.parent.getComponent('slow_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Pass_Count_Slow' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('slow_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_1_Slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

# Fast Pass count goes to PassCountFast.PRE, and Body 1 Fast Cycle -- (Multibody Functionality)
value = event.source.parent.getComponent('fast_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Pass_Count_Fast' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('fast_cyc_val').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_1_Fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('slow_cyc_val 1').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_Slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('fast_cyc_val 1').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('slow_cyc_val 2').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_3_slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('fast_cyc_val 2').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_3_fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('slow_cyc_val 3').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_4_slow_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('fast_cyc_val 3').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_4_fast_Cycle' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Body1_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body' %(machineNumber)
system.tag.writeToTag(tagPath, value)
	
value = event.source.parent.getComponent('Body2_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Body3_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_3_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Body4_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_4_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.parent.getComponent('PCODE_Display').getComponent('Label').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/STRING' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Body1_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/b_weight1' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Body2_Weight').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Body_2_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Begin_Weight 1').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Beginning_Fast' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('End_Weight 1').value
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Ending_Fast_Weight' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Color_ID').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/CLR_Select' %(machineNumber)
system.tag.writeToTag(tagPath, value)

value = event.source.parent.getComponent('Color_Percent_Value').text
machineNumber = event.source.parent.parent.getComponent('DropDown_UnitSelect').selectedValue
tagPath = 'Unit%s/Color_Percent' %(machineNumber)
system.tag.writeToTag(tagPath, value)

fpmi.gui.messageBox("Data Loaded To Controller")[/code]

When I click on the load button, I get:

Once I get the write timed out error, I can no longer write tag values to the controller until the gateway is restarted. When the gateway is simply restarted, however, it still will not work, and the errors mentioned in the beginning of this post start. The only way to get it running again is to stop the gateway, delete the data cache, and then restart.
Also, when this occurs, the gateway takes quite some time to actually stop, and generates the following message:

My guess is that too many values are trying to be written at one time, causing corruption of the data cache... ?

To test this theory, I split up the tag load by placing the following in two places:

import time
time.sleep(1)

I thought that by doing this, it would allow a group of tags to be written before sending the next batch.

This does work, and all the tag values are being written. Unfortunately, this has caused a new problem. Now when I click the load button to write the tag values, I get to error messages, but they do not contain any information. Basically, just blank error messages. I would assume that I am way off base by using the time.sleep and that is the reason why these error messages appear.

If you can shed any light on this, it would be greatly appreciated.

Added:

I see that there is an output to the console associated with this blank error message:

[quote]ERROR [ClientTagUtilities$WriteListener-AWT-EventQueue-0]
[/quote]

Thanks for the detailed report. I don’t think that the writing of tags has anything to do with the datacache corruption - I think the datacache is getting corrupted when you do the restart to try and fix the blockage caused by the bulk tag write.

We will investigate the bulk tag write problem on our end and let you know what we find.

Can you describe what kind of PLC you’re using, and what OPC Server (if not Ignition OPC-UA)

CompactLogix L35E and Ignition OPC-UA

What version of Ignition are you running, and what are the settings on your device (write timeouts, etc)

Ignition Version 7.0.4 (b4594)

Browse Timeout - 30000
Read Timeout - 30000
Write Timeout - 30000

Communication Timeout - 2000
Browse Cache Timeout - 0

We have identified the problem with the bulk tag writing, and it has been fixed for the upcoming 7.0.5 release.

The sink-corruption problem is totally separate, and has to do with the soft-restarts.

Thank you Carl.

Do you have an ETA for the 7.0.5 release?

This afternoon if all goes well.

Got the new version, and the bulk tag write works perfect. Thank you guys!