Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from 0.13.7 to 0.14.0 crashes container #1482

Open
WAdama opened this issue Sep 26, 2023 · 9 comments
Open

Update from 0.13.7 to 0.14.0 crashes container #1482

WAdama opened this issue Sep 26, 2023 · 9 comments

Comments

@WAdama
Copy link

WAdama commented Sep 26, 2023

Hi all,

after updating the syncstorage-rs container from 0.13.7 to 0.14.0 the container crashes.

The log is filled with this messages you see in the attached log.
FirefoxSync_RS_logs.txt

┆Issue is synchronized with this Jira Task

@jrconlin
Copy link
Member

Looking at the log, I see that the problem is that there's an invalid database URL being specified. specifically:
SLaka5upLEa2RfW4XNMkUrRihKQNJKQFqAzR5McFSRpWcnrD7hcYRtxh37T9+@MariaDB:3306/syncstorage_rs
What's also curious is the fact that you've specified the db in settings as mysql:, but the code is trying to use spanner.

Are you compiling with --no-default-features --features=mysql?

@WAdama
Copy link
Author

WAdama commented Sep 27, 2023

Hi,

I'm just using the docker image you provide. This is my compose file and the env file:

--------------------- Start
version: "3.8"

services:
firefox-sync:
image: mozilla/syncstorage-rs:0.14.0
container_name: ${CONTAINER_NAME}
environment:
SYNC_HOST: 0.0.0.0
SYNC_HUMAN_LOGS: 1
SYNC_MASTER_SECRET: ${SYNC_MASTER_SECRET}
SYNC_SYNCSTORAGE__DATABASE_URL: mysql://${MYSQL_USER}:${MYSQL_PASS}@${DATABASE_SERVER}:${DATABASE_PORT}/${DATABASE_SYNC}
SYNC_TOKENSERVER__ENABLED: "true"
SYNC_TOKENSERVER__RUN_MIGRATIONS: "true"
SYNC_TOKENSERVER__NODE_TYPE: mysql
SYNC_TOKENSERVER__DATABASE_URL: mysql://${MYSQL_USER}:${MYSQL_PASS}@${DATABASE_SERVER}:${DATABASE_PORT}/${DATABASE_TOKEN}
SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN: api.accounts.firefox.com
SYNC_TOKENSERVER__FXA_OAUTH_SERVER_URL: https://oauth.accounts.firefox.com/v1
SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET: ${METRICS_HASH_SECRET}
SYNC_TOKENSERVER__ADDITIONAL_BLOCKING_THREADS_FOR_FXA_REQUESTS: 2
RUST_LOG: warn
volumes:
- /etc/localtime:/etc/localtime:ro

ports:
- ${EXTERNAL_PORT}:8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/heartbeat"]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
networks:
- mariadb

networks:
mariadb:
external: true
------------------------- End

------------------------- Start
COMPOSE_PROJECT_NAME=ffsync_rs
CONTAINER_NAME=FirefoxSync_RS
MYSQL_USER=sync_rs
MYSQL_PASS=
SYNC_MASTER_SECRET=
METRICS_HASH_SECRET=
DATABASE_SERVER=MariaDB
DATABASE_PORT=3306
DATABASE_SYNC=syncstorage_rs
DATABASE_TOKEN=tokenserver_rs
EXTERNAL_PORT=49997
------------------------ End

@WAdama
Copy link
Author

WAdama commented Oct 5, 2023

I've tried it again, after it's officially released. The error is the same.

What I've not registered before: The image for 0.14.0 is quite larger than for 0.13.7, 2.2 GB to 1.4 GB. Is that normal?

@jonasled
Copy link

jonasled commented Oct 6, 2023

I yesterday did also the update and I have the same problem, after updating the Container won't start anymore. I'm currently running the syncstorage on a Kubernetes cluster with this deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: syncstorage
  namespace: mozilla
  labels:
    app: syncstorage
spec:
  replicas: 1
  selector:
    matchLabels:
      app: syncstorage
  template:
    metadata:
      labels:
        app: syncstorage
    spec:
      containers:
        - name: syncstorage
          image: mozilla/syncstorage-rs:0.13.7
          ports:
            - containerPort: 8000
          env:
            - name: SYNC_HOST
              value: 0.0.0.0
            - name: SYNC_MASTER_SECRET
              valueFrom:
                secretKeyRef:
                  name: syncstorage
                  key: masterSecret
            - name: SYNC_SYNCSTORAGE__DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: syncstorage
                  key: syncstorageDatabaseUrl
            - name: SYNC_RUN_MIGRATIONS
              value: "true"

            - name: SYNC_TOKENSERVER__ENABLED
              value: "true"
            - name: SYNC_TOKENSERVER__RUN_MIGRATIONS
              value: "true"
            - name: SYNC_TOKENSERVER__NODE_TYPE
              value: "mysql"
            - name: SYNC_TOKENSERVER__DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: syncstorage
                  key: tokenserverDatabaseUrl
            - name: SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN
              value: "api.accounts.firefox.com"
            - name: SYNC_TOKENSERVER__FXA_OAUTH_SERVER_URL
              value: "https://oauth.accounts.firefox.com/v1"
            - name: SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET
              valueFrom:
                secretKeyRef:
                  name: syncstorage
                  key: fxaMetricsHashSecret
            - name: SYNC_TOKENSERVER__ADDITIONAL_BLOCKING_THREADS_FOR_FXA_REQUESTS
              value: "2"
      tolerations:
        - key: "architecture"
          operator: "Equal"
          value: "x86"
          effect: "NoExecute"
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                - amd64

@ironashram
Copy link

last night i finally got tired of the issues with this project and decided to move to vaultwarden instead, couldn't be happier so far

@WAdama
Copy link
Author

WAdama commented Oct 7, 2023

And what has Vaultwarden to do with Firefox Sync? You're talking about two different products, which are doing different things...

@ironashram
Copy link

And what has Vaultwarden to do with Firefox Sync? You're talking about two different products, which are doing different things...

Not really, I used it to sync passwords which I don't want to be stored on Mozilla servers, for the other stuff like bookmarks and settings I really don't care if they are stored on Mozilla servers so for me that's all I need

@WAdama
Copy link
Author

WAdama commented Oct 7, 2023

But that's not the main goal of Firefox Sync. Otherwise Vaultwarden / Bitwarden is "only" a password safe.

And this helps not in this case.

@maboxx
Copy link

maboxx commented Oct 15, 2023

Hi all,
I have noticed the same thing. Update from 0.13.6 or even an update from 0.13.7 to 0.14.0 does not work. The container does not start anymore.
Is there any news in the topic? I think the problem will still hit many users when they want to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants