Cannot start docker when migate from old version
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I was using remotely on docker normarly before.
Today i was pull latest image from https://hub.docker.com/r/immybot/remotely.
I was re-write to update file docker-compose.yaml.
But when i running it, it's throw error: "SQLite Error 14: 'unable to open database file'"
This is details:
> [root@test-pc docker]# cat docker-compose.yaml
> remote:
> image: immybot/remotely:latest
> volumes:
> - ./remotely/Remotely.db:/app/Remotely.db
> - ./remotely/Remotely.db-shm:/app/Remotely.db-shm
> - ./remotely/Remotely.db-wal:/app/Remotely.db-wal
> - ./remotely/appsettings.json:/app/appsettings.json
> - ./remotely/logs:/app/AppData
> - ./remotely/recordings:/app/AppData
> - "/etc/localtime:/etc/localtime:ro"
> ports:
> - "5000:5000"
>
>
> [root@test-pc docker]# ls -ltr remotely
> total 484
> -rw-r--r-- 1 root root 483328 Feb 27 10:09 Remotely.db
> drwxr-xr-x 2 root root 4096 Mar 4 07:51 logs
> drwxr-xr-x 10 root root 150 Mar 4 08:38 recordings
> drwxr-xr-x 2 root root 6 Mar 4 16:59 Remotely.db-wal
> drwxr-xr-x 2 root root 6 Mar 4 16:59 Remotely.db-shm
> -rwxr-xr-x 1 root root 1535 Mar 4 17:04 appsettings.json.20240304
> -rwxr-xr-x 1 root root 1526 Mar 4 17:05 appsettings.json
>
>
> [root@test-pc docker]# docker-compose -f docker-compose.yaml up
> Starting docker_remote_1 ... done
> Attaching to docker_remote_1
> remote_1 | Unhandled exception. Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 14: 'unable to open database file'.
> remote_1 | at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
> remote_1 | at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
> remote_1 | at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
> remote_1 | at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
> remote_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
> remote_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
> remote_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteScalar()
> remote_1 | at System.Data.Common.DbCommand.ExecuteScalarAsync(CancellationToken cancellationToken)
> remote_1 | --- End of stack trace from previous location ---
> remote_1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteScalarAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
> remote_1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteScalarAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
> remote_1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteScalarAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
> remote_1 | at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.ExistsAsync(CancellationToken cancellationToken)
> remote_1 | at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
> remote_1 | at Program.$(String[] args) in D:\a\1\s\Server\Program.cs:line 90
> remote_1 | at Program.(String[] args)
> docker_remote_1 exited with code 139
>
> [root@test-pc docker]# docker --version
> Docker version 24.0.7, build afdd53b
>
> [root@test-pc docker]# docker-compose -v
> docker-compose version 1.23.2, build 1110ad01
> [root@test-pc docker]#
Pls help me to correct it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing docker-compose.yaml volume mounts, the referenced Remotely.db files, and Program.cs line 90 where migration startup fails. Reproduce the container startup and trace the SQLite error; done means the existing database can be opened and the service starts successfully after migration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker, docker-compose, sqlite
- Domain
- backend, databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100