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

Joplin server + S3 Error: Could not write content to storage: Region is missing #10924

Open
kamasylvia opened this issue Aug 23, 2024 · 0 comments
Labels
bug It's a bug

Comments

@kamasylvia
Copy link

kamasylvia commented Aug 23, 2024

Operating system

Linux

Joplin version

server-v3.0.1

Desktop version info

No response

Current behaviour

The error Error: Could not write content to storage: Region is missing occurs even Region is already configured in the docker-compose.yml file.

docker-compose.yml

version: '3'

services:
    joplin:
        image: joplin/server:latest
        container_name: joplin
        restart: unless-stopped
        network_mode: host
        extra_hosts:
            - "host.docker.internal:127.0.0.1"
        environment:
            - DB_CLIENT=pg
            - POSTGRES_PORT=5432
            - POSTGRES_USER=postgres
            - POSTGRES_PASSWORD=postgres
            - POSTGRES_DATABASE=joplin
            - POSTGRES_HOST=localhost
            - APP_PORT=22300
            - APP_BASE_URL=http://192.168.1.66:22300
            - STORAGE_DRIVER=Type=S3
            - Region=us-east-1 # Region is configured
            - Path=http://localhost:8010
            - Bucket=Joplin
            - STORAGE_DRIVER_FALLBACK=Type=Database
            - Mode=ReadAndClear
            - AccessKeyId=YOUR_ACCESS_KEY
            - SecretAccessKeyId=YOUR_SECRET_ACCESS_KEY

Expected behaviour

Since Region is already configured in docker-compose.yml, the error Error: Could not write content to storage: Region is missing should not occur in the log.

Logs

joplin  | 2024-08-23T05:18:06: PM2 log: App [app:0] starting in -fork mode-
joplin  | 05:18:06 PM2      | App [app:0] starting in -fork mode-
joplin  | 2024-08-23T05:18:06: PM2 log: App [app:0] online
joplin  | 05:18:06 PM2      | App [app:0] online
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Starting server v3.0.1 (prod) on port 22300 and PID 209...
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Checking for time drift using NTP server: pool.ntp.org:123
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: NTP time offset: -1582ms
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Running in Docker: true
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Public base URL: http://192.168.1.66:22300
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: API base URL: http://192.168.1.66:22300
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: User content base URL: http://192.168.1.66:22300
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Log dir: /home/joplin/packages/server/logs
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: DB Config: {
joplin  | 05:18:09 0|app    |   client: 'pg',
joplin  | 05:18:09 0|app    |   name: 'joplin',
joplin  | 05:18:09 0|app    |   slowQueryLogEnabled: false,
joplin  | 05:18:09 0|app    |   slowQueryLogMinDuration: 1000,
joplin  | 05:18:09 0|app    |   autoMigration: true,
joplin  | 05:18:09 0|app    |   user: 'postgres',
joplin  | 05:18:09 0|app    |   password: '********',
joplin  | 05:18:09 0|app    |   port: 5432,
joplin  | 05:18:09 0|app    |   host: 'host.docker.internal'
joplin  | 05:18:09 0|app    | }
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Mailer Config: {
joplin  | 05:18:09 0|app    |   enabled: false,
joplin  | 05:18:09 0|app    |   host: '',
joplin  | 05:18:09 0|app    |   port: 465,
joplin  | 05:18:09 0|app    |   security: 'tls',
joplin  | 05:18:09 0|app    |   authUser: '',
joplin  | 05:18:09 0|app    |   authPassword: '********',
joplin  | 05:18:09 0|app    |   noReplyName: '',
joplin  | 05:18:09 0|app    |   noReplyEmail: ''
joplin  | 05:18:09 0|app    | }
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Content driver: { type: 4 }
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Content driver (fallback): { type: 1 }
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Trying to connect to database...
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Connection check: {
joplin  | 05:18:09 0|app    |   latestMigration: { name: '20240413141308_changes_optimization.js', done: true },
joplin  | 05:18:09 0|app    |   isCreated: true,
joplin  | 05:18:09 0|app    |   error: null
joplin  | 05:18:09 0|app    | }
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Auto-migrating database...
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Latest migration: { name: '20240413141308_changes_optimization.js', done: true }
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: App: Not using database replication...
joplin  | 05:18:09 0|app    | 2024-08-23 05:18:09: EmailService: Service will be disabled because mailer config is not set or is explicitly disabled
joplin  | 05:18:10 0|app    | 2024-08-23 05:18:10: App: Performing main storage check...
joplin  | 05:18:11 0|app    | Error: Could not write content to storage: Region is missing
joplin  | 05:18:11 0|app    |     at default (/home/joplin/packages/server/node_modules/@aws-sdk/config-resolver/dist-cjs/regionConfig/config.js:10:15)
joplin  | 05:18:11 0|app    |     at /home/joplin/packages/server/node_modules/@aws-sdk/node-config-provider/dist-cjs/fromStatic.js:6:83
joplin  | 05:18:11 0|app    |     at /home/joplin/packages/server/node_modules/@aws-sdk/property-provider/dist-cjs/chain.js:11:28
joplin  | 05:18:11 0|app    |     at coalesceProvider (/home/joplin/packages/server/node_modules/@aws-sdk/property-provider/dist-cjs/memoize.js:14:24)
joplin  | 05:18:11 0|app    |     at /home/joplin/packages/server/node_modules/@aws-sdk/property-provider/dist-cjs/memoize.js:26:28
joplin  | 05:18:11 0|app    |     at useFipsEndpoint (/home/joplin/packages/server/node_modules/@aws-sdk/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js:21:74)
joplin  | 05:18:11 0|app    |     at resolveParams (/home/joplin/packages/server/node_modules/@aws-sdk/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js:29:40)
joplin  | 05:18:11 0|app    |     at getEndpointFromInstructions (/home/joplin/packages/server/node_modules/@aws-sdk/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js:7:28)
joplin  | 05:18:11 0|app    |     at /home/joplin/packages/server/node_modules/@aws-sdk/middleware-endpoint/dist-cjs/endpointMiddleware.js:8:26
joplin  | 05:18:11 0|app    |     at /home/joplin/packages/server/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26
joplin  | 2024-08-23T05:18:11: PM2 log: App [app:0] exited with code [1] via signal [SIGINT]
joplin  | 2024-08-23T05:18:11: PM2 log: App [app:0] will restart in 15000ms
joplin  | 05:18:11 PM2      | App [app:0] exited with code [1] via signal [SIGINT]
joplin  | 05:18:11 PM2      | App [app:0] will restart in 15000ms
@kamasylvia kamasylvia added the bug It's a bug label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

1 participant