I have an issue upgrading my onedev instance from 8.2.8 to 8.3.0.
INFO - Updating program files...
INFO - Restoring database with new program...
ERROR - >>> Picked up JAVA_TOOL_OPTIONS: -Xmx2g
INFO - >>> INFO - Launching application from '/opt/onedev'...
INFO - >>> INFO - Cleaning temp directory...
INFO - >>> INFO - Starting application...
INFO - >>> INFO - Restoring database from /opt/onedev/site/db-backup/2023-05-30_16-43-31.zip...
INFO - >>> INFO - Waiting for server to stop...
INFO - >>> INFO - Validating data file 'Roles.xml'...
INFO - >>> INFO - Validating data file 'ProjectLastEventDates.xml'...
INFO - >>> INFO - Validating data file 'Projects.xml'...
INFO - >>> ERROR - Error booting application
INFO - >>> java.lang.RuntimeException: Error validating entity (entity class: class io.onedev.server.model.Project, entity id: 158, entity property: name, error message: Should start with alphanumeric or underscore, and contains only alphanumeric, underscore, dash, or dot)
INFO - >>> at io.onedev.server.persistence.DefaultPersistenceManager.reportError(DefaultPersistenceManager.java:504)
INFO - >>> at io.onedev.server.persistence.DefaultPersistenceManager.validateData(DefaultPersistenceManager.java:491)
INFO - >>> at io.onedev.server.commandhandler.RestoreDatabase.doRestore(RestoreDatabase.java:108)
INFO - >>> at io.onedev.server.commandhandler.RestoreDatabase.lambda$start$0(RestoreDatabase.java:79)
INFO - >>> at io.onedev.server.commandhandler.CommandHandler.doMaintenance(CommandHandler.java:31)
INFO - >>> at io.onedev.server.commandhandler.RestoreDatabase.start(RestoreDatabase.java:72)
INFO - >>> at io.onedev.commons.loader.DefaultPluginManager.start(DefaultPluginManager.java:44)
INFO - >>> at io.onedev.commons.loader.AppLoader.start(AppLoader.java:60)
INFO - >>> at io.onedev.commons.bootstrap.Bootstrap.main(Bootstrap.java:196)
INFO - >>> INFO - Stopping application...
ERROR - Failed to upgrade /opt/onedev
ERROR - >>> Picked up JAVA_TOOL_OPTIONS: -Xmx2g
INFO - >>> INFO - Launching application from '/opt/onedev'...
INFO - >>> INFO - Cleaning temp directory...
INFO - >>> INFO - Starting application...
INFO - >>> INFO - Waiting for server to stop...
INFO - >>> INFO - Stopping application...
INFO - Restoring old program files...
INFO - Old program files restored
INFO - Restoring old database...
ERROR - >>> Picked up JAVA_TOOL_OPTIONS: -Xmx2g
INFO - >>> INFO - Launching application from '/opt/onedev'...
INFO - >>> INFO - Cleaning temp directory...
INFO - >>> INFO - Starting application...
INFO - >>> INFO - Restoring database from /opt/onedev/site/db-backup/2023-05-30_16-43-31.zip...
INFO - >>> INFO - Waiting for server to stop...
INFO - >>> INFO - Creating tables...
INFO - >>> INFO - Importing data into database...
INFO - >>> INFO - Importing from data file 'Roles.xml'...
INFO - >>> INFO - Importing from data file 'ProjectLastEventDates.xml'...
INFO - >>> INFO - Importing from data file 'Projects.xml'...
INFO - >>> INFO - Importing from data file 'Users.xml'...
INFO - >>> INFO - Importing from data file 'AgentLastUsedDates.xml'...
INFO - >>> INFO - Importing from data file 'AgentTokens.xml'...
INFO - >>> INFO - Importing from data file 'Agents.xml'...
INFO - >>> INFO - Importing from data file 'AgentAttributes.xml'...
INFO - >>> INFO - Importing from data file 'SshKeys.xml'...
INFO - >>> INFO - Importing from data file 'Builds.xml'...
INFO - >>> INFO - Importing from data file 'LinkSpecs.xml'...
INFO - >>> INFO - Importing from data file 'ModelVersions.xml'...
INFO - >>> INFO - Importing from data file 'EmailAddresss.xml'...
INFO - >>> INFO - Importing from data file 'Settings.xml'...
INFO - >>> INFO - Importing from data file 'UserAuthorizations.xml'...
INFO - >>> INFO - Applying foreign key constraints...
INFO - >>> INFO - Database is successfully restored from /opt/onedev/site/db-backup/2023-05-30_16-43-31.zip
INFO - >>> INFO - Stopping application...
INFO - Old database restored
ERROR - !! Failed to upgrade /opt/onedev
INFO - Stopping application...
<-- Wrapper Stopped
Robin Shen commented 11 months ago
Seems that name of the project (id: 158) is invalid. Not sure why it exists in OneDev the first place.
Please fix it and upgrade again. You may query the database to find the actual project with that id for table QB_PROEJCT and column QB_ID
Andreas Wachter commented 11 months ago
It is solved now
Andreas Wachterchanged state to 'Closed'11 months ago
I have an issue upgrading my onedev instance from 8.2.8 to 8.3.0.