container won't start after upgrade to 12.0.4 (OD-2517)
Stephane Bourdeaud opened 5 months ago

I run onedev on docker as such:

docker run --name onedev -d --restart always -v /var/run/docker.sock:/var/run/docker.sock -v onedev-data:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server:latest

I use watchtower to upgrade my containers. After yesterday's upgrade, noticed that onedev was down.

When I try to restart the container and looking at the logs, I get:

--> Wrapper Started as Console
Java Service Wrapper Standard Edition 64-bit 3.5.51
  Copyright (C) 1999-2022 Tanuki Software, Ltd. All Rights Reserved.
    http://wrapper.tanukisoftware.com
  Licensed to OneDev for Service Wrapping

Launching a JVM...
WrapperManager: Initializing...
INFO  - Launching application from '/app'...
INFO  - Starting application...
INFO  - Upgrading /opt/onedev...
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  - Backing up old program files as /opt/onedev/site/program-backup/2025-08-06_10-47-45...
ERROR - Error upgrading '/opt/onedev'
java.lang.RuntimeException: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/opt/onedev/@Recently-Snapshot/GMT+01_2025-07-31_0100'
        at io.onedev.server.commandhandler.Upgrade$3.call(Upgrade.java:317)
        at io.onedev.server.commandhandler.Upgrade.start(Upgrade.java:516)
        at io.onedev.commons.loader.DefaultPluginManager.start(DefaultPluginManager.java:44)
        at io.onedev.commons.loader.AppLoader.start(AppLoader.java:74)
        at io.onedev.commons.bootstrap.Bootstrap.main(Bootstrap.java:200)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:349)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.FileNotFoundException: File system element for parameter 'source' does not exist: '/opt/onedev/@Recently-Snapshot/GMT+01_2025-07-31_0100'
        at org.apache.commons.io.FileUtils.requireExistsChecked(FileUtils.java:2802)
        at org.apache.commons.io.FileUtils.requireFileCopy(FileUtils.java:2833)
        at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:799)
        at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1304)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:684)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:615)
        at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:516)
        at org.apache.commons.io.FileUtils.copyDirectoryToDirectory(FileUtils.java:715)
        at io.onedev.server.commandhandler.Upgrade$3.call(Upgrade.java:313)
        ... 10 common frames omitted
INFO  - *** After solving the problem, please restart container with correct image ***
TERM trapped.  Shutting down.
INFO  - Stopping application...
<-- Wrapper Stopped

Contents of /opt/onedev:

3rdparty-licenses  agent  bin  boot  conf  incompatibilities  IN_DOCKER  internaldb  lib  license.txt  logs  readme.txt  release.properties  site  temp  test
  • Robin Shen commented 5 months ago

    There is an odd directory @Recently-Snapshot inside /opt/onedev at time of upgrading. Google search indicates that this might be a NAS backup or something similar, please make sure that directory is removed, and try the upgrade again.

  • Stephane Bourdeaud commented 5 months ago

    the docker volume is serviced out of a QNAP NAS. I'm researching how to get rid of this directory...

  • Stephane Bourdeaud commented 5 months ago

    Disabled snapshots on shared folders and that folder went away. The container is now starting fine. Thank you for the help.

  • Stephane Bourdeaud commented 5 months ago

    Disabled snapshot on this QNAP shared folder and problem went away.

  • Stephane Bourdeaud changed state to 'Closed' 5 months ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
12.0.4
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2517
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover