Neuer Firefox-Syncserver (Rust) in Docker mit MariaDB-Datenbank

Habe folgendes durchgeführt:

docker exec -it firefox_mariadb mysql -u root -p
-> dann kam:
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

-> ohne -p hat es dann geklappt (mit Putty über SSH)
docker exec -it firefox_mariadb mysql -u root
CREATE DATABASE IF NOT EXISTS syncstorage_rs;
CREATE DATABASE IF NOT EXISTS tokenserver_rs;
CREATE USER sync@"172.%" IDENTIFIED BY 'syncpass';
GRANT ALL PRIVILEGES ON syncstorage_rs.* TO sync@"172.%";
GRANT ALL PRIVILEGES ON tokenserver_rs.* TO sync@"172.%";
quit

mariadb-log:

Code:
───────────────────────────────────────

GID/UID

───────────────────────────────────────

User UID:    911

User GID:    911

───────────────────────────────────────

Linuxserver.io version: 11.4.5-r0-ls177

Build-date: 2025-03-11T07:42:29+00:00

───────────────────────────────────────

  

[custom-init] No custom files found, skipping...

250320 20:03:22 mysqld_safe Logging to '/config/log/mysql/mariadb-error.log'.

250320 20:03:22 mysqld_safe Starting mariadbd daemon with databases from /config/databases

Connection to localhost (127.0.0.1) 3306 port [tcp/mysql] succeeded!

Logrotate is enabled

[ls.io-init] done.


syncserver-log:
Code:
Could not connect to database via `mysql://sync:syncpass@firefox_mariadb:3306/syncstorage_rs`: Can't connect to server on 'firefox_mariadb' (115)

Could not connect to database via `mysql://sync:syncpass@firefox_mariadb:3306/tokenserver_rs`: Can't connect to server on 'firefox_mariadb' (115)

ERROR 2002 (HY000): Can't connect to server on 'firefox_mariadb' (115)

Could not connect to database via `mysql://sync:syncpass@firefox_mariadb:3306/syncstorage_rs`: Can't connect to server on 'firefox_mariadb' (115)

Could not connect to database via `mysql://sync:syncpass@firefox_mariadb:3306/tokenserver_rs`: Can't connect to server on 'firefox_mariadb' (115)

ERROR 2002 (HY000): Can't connect to server on 'firefox_mariadb' (115)

thread 'main' panicked at syncserver/src/main.rs:61:55:

called `Result::unwrap()` on an `Err` value: ApiError { kind: Db(DbError { kind: Mysql(SqlError { kind: DieselConnection(BadConnection("Can't connect to server on 'firefox_mariadb' (115)")), status: 500, backtrace:    0: <syncserver_db_common::error::SqlError as core::convert::From<syncserver_db_common::error::SqlErrorKind>>::from

             at /app/syncserver-db-common/src/error.rs:37:24

      <T as core::convert::Into<U>>::into

             at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/convert/mod.rs:761:9

      <syncserver_db_common::error::SqlError as core::convert::From<diesel::result::ConnectionError>>::from

             at /app/syncserver-common/src/lib.rs:50:33

   1: <syncstorage_mysql::error::DbError as core::convert::From<diesel::result::ConnectionError>>::from::{{closure}}

             at /app/syncstorage-mysql/src/error.rs:148:79

      <syncstorage_mysql::error::DbError as core::convert::From<diesel::result::ConnectionError>>::from

             at /app/syncserver-common/src/lib.rs:50:17

      <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual

             at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/result.rs:2014:27

      syncstorage_mysql::pool::run_embedded_migrations

             at /app/syncstorage-mysql/src/pool.rs:33:16

      syncstorage_mysql::pool::MysqlDbPool::new

             at /app/syncstorage-mysql/src/pool.rs:65:9

   2: syncserver::server::Server::with_settings::{{closure}}

             at /app/syncserver/src/server/mod.rs:271:23

      syncserver::main::{{closure}}

             at /app/syncserver/src/main.rs:61:49

   3: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::{{closure}}

             at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.38.0/src/task/local.rs:978:42

      tokio::task::local::LocalSet::with::{{closure}}

             at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.38.0/src/task/local.rs:730:13

      std::thread::local::LocalKey<T>::try_with

             at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/std/src/thread/local.rs:308:12

      std::thread::local::LocalKey<T>::with

             at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/std/src/thread/local.rs:272:9

      tokio::task::local::LocalSet::with

             at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.38.0/src/task/local.rs:728:17

      <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll

             at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.38.0/src/task/local.rs:968:22

   4: tokio::task::local::LocalSet::run_until::{{closure}}

             at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.38.0/src/task/local.rs:635:19

      <core::pin::Pin<P> as core::future::future::Future>::poll

             at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/future/future.rs:124:9

      tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}

             at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:659:57

      tokio::runtime::coop::with_budget

Also irgendwas scheint noch nicht zu passen.

docker compose:
Code:
services:
  firefox_mariadb:
    container_name: firefox_mariadb
    image: linuxserver/mariadb:latest
    volumes:
      - /volume1/docker/syncstorage/config:/config
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: rootpass

      MYSQL_DATABASE: syncstorage
      MYSQL_USER: sync
      MYSQL_PASSWORD: syncpass


  syncserver:
    container_name: firefox_syncserver
    image: syncstorage-rs:0.18.2
    labels:
      com.centurylinklabs.watchtower.enable: "false"
    restart: unless-stopped
    ports:
      - "1050:8000"
    depends_on:
      - firefox_mariadb
    environment:
      LOGLEVEL: info
      SYNC_URL: https://syncstorage.beispiel.dynv6.net
      SYNC_CAPACITY: 5
      SYNC_MASTER_SECRET: mastersecret
      METRICS_HASH_SECRET: metricssecret
      SYNC_SYNCSTORAGE_DATABASE_URL: mysql://sync:syncpass@firefox_mariadb:3306/syncstorage_rs
      SYNC_TOKENSERVER_DATABASE_URL: mysql://sync:syncpass@firefox_mariadb:3306/tokenserver_rs

Als ich gerade noch die Firewall in Synology deaktiviert habe kommt folgendes:
Code:
Could not connect to database via `mysql://sync:syncpass@firefox_mariadb:3306/syncstorage_rs`: Access denied for user 'sync'@'%' to database 'syncstorage_rs'
Could not connect to database via `mysql://sync:syncpass@firefox_mariadb:3306/tokenserver_rs`: Access denied for user 'sync'@'%' to database 'tokenserver_rs'
ERROR 1044 (42000): Access denied for user 'sync'@'%' to database 'tokenserver_rs'
 

Anhänge

  • portainer.png
    portainer.png
    32 KB · Aufrufe: 2
Zuletzt bearbeitet:
image: syncstorage-rs:0.18.2
Das kann mit dem Image nicht funktionieren, das enthält keine MySQL-Unterstützung mehr sondern nur noch Spanner. Du musst entweder das Image selber builden oder 0.13.7 nehmen...
 
doch zu früh gefreut. Bekomme dieses log:

Code:
1742590189178    Sync.LogManager    DEBUG    Flushing file log
1742590189190    Sync.LogManager    DEBUG    Log cleanup threshold time: 1741726189190
1742590189192    Sync.LogManager    DEBUG    Done deleting files.
1742590190175    FirefoxAccounts    INFO    Polling device commands.
1742590190175    Sync.Service    DEBUG    User-Agent: Firefox/136.0.2 (Windows NT 10.0; Win64; x64) FxSync/1.138.0.20250317120031.desktop
1742590190175    Sync.Service    INFO    Starting sync at 2025-03-21 21:49:50 in browser session 3PSMX63RUVI6
1742590190175    Sync.Service    DEBUG    In sync: should login.
1742590190175    Sync.Service    INFO    User logged in successfully - verifying login.
1742590190176    FirefoxAccounts    TRACE    not checking freshness of profile as it remains recent
1742590190176    Sync.SyncAuthManager    DEBUG    unlockAndVerifyAuthState already has (or can fetch) sync keys
1742590190176    Sync.Status    DEBUG    Status.login: error.login.reason.network => success.status_ok
1742590190176    Sync.Status    DEBUG    Status.service: error.login.failed => error.login.failed
1742590190176    Sync.Service    DEBUG    Fetching unlocked auth state returned success.status_ok
1742590190177    FirefoxAccounts    TRACE    not checking freshness of profile as it remains recent
1742590190180    Services.Common.RESTRequest    DEBUG    GET request to https://api.accounts.firefox.com/v1/account/device/commands?index=0
1742590190186    Sync.Resource    WARN    GET request to https://syncstorage.beispiel.dyvn6.net/1.5/4/info/collections failed: [Exception... "The lookup of the hostname failed"  nsresult: "0x804b001e (NS_ERROR_UNKNOWN_HOST)"  location: "<unknown>"  data: no] No traceback available
1742590190186    Sync.Service    DEBUG    verifyLogin failed: [Exception... "The lookup of the hostname failed"  nsresult: "0x804b001e (NS_ERROR_UNKNOWN_HOST)"  location: "<unknown>"  data: no] No traceback available
1742590190186    Sync.Status    DEBUG    Status.login: success.status_ok => error.login.reason.network
1742590190186    Sync.Status    DEBUG    Status.service: error.login.failed => error.login.failed
1742590190186    Sync.Status    DEBUG    Status.login: error.login.reason.network => error.login.reason.network
1742590190186    Sync.Status    DEBUG    Status.service: error.login.failed => error.login.failed
1742590190186    Sync.ErrorHandler    ERROR    Sync encountered a login error
1742590190187    Sync.SyncScheduler    DEBUG    Clearing sync triggers and the global score.
1742590190187    Sync.SyncScheduler    DEBUG    Next sync in 3600000 ms. (why=schedule)
1742590190188    Sync.Service    DEBUG    Exception calling WrappedLock: Error: Login failed: error.login.reason.network(resource://services-sync/service.sys.mjs:1041:15) JS Stack trace: onNotify@service.sys.mjs:1041:15
1742590190188    Sync.Service    DEBUG    Not syncing: login returned false.
1742590190189    FirefoxAccounts    TRACE    not checking freshness of profile as it remains recent
 

Additional post fields

 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat