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

[Bug]: Postiz 502 error during first signup and [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled. #4376

Open
mredodos opened this issue Nov 22, 2024 · 2 comments · Fixed by #4393 · May be fixed by #4418
Labels
🐞 Confirmed Bug Verified issues that have been reproduced by the team. ✅ Done Issues that are fixed and a PR is ready to be merged.

Comments

@mredodos
Copy link

Error Message and Logs

i have this in the log i cant sign in for first start account i not have change anything

[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.

{"level":"error","ts":1732317953.0425525,"logger":"http.log.error","msg":"dial tcp [::1]:3000: connect: connection refused","request":{"remote_ip":"172.24.0.5","remote_port":"52534","client_ip":"172.24.0.5","proto":"HTTP/1.1","method":"POST","host":"postiz-lc4okosgkocsgsgksow84kwo.app.rewamp.it","uri":"/api/auth/register","headers":{"Content-Length":["137"],"Content-Type":["application/json"],"Sec-Ch-Ua-Mobile":["?0"],"Sec-Fetch-Site":["same-origin"],"Cdn-Loop":["cloudflare; loops=1"],"Sec-Ch-Ua":["\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"Not?A_Brand\";v=\"99\""],"Accept-Language":["it-CH,it-IT;q=0.9,it;q=0.8,en-US;q=0.7,en;q=0.6,de;q=0.5"],"Priority":["u=1, i"],"Referer":["https://postiz-lc4okosgkocsgsgksow84kwo.app.rewamp.it/auth"],"Sec-Fetch-Dest":["empty"],"X-Forwarded-For":["172.71.102.93"],"X-Forwarded-Proto":["https"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cookie":[],"X-Forwarded-Server":["b31664a621ad"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"],"Origin":["https://postiz-lc4okosgkocsgsgksow84kwo.app.rewamp.it"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Sec-Fetch-Mode":["cors"],"X-Real-Ip":["172.71.102.93"],"Cf-Ray":["8e6cae660faab927-AMS"],"X-Forwarded-Port":["443"],"Accept":["application/json"],"Accept-Encoding":["gzip, br"],"Cf-Connecting-Ip":["178.39.46.67"],"Cf-Ipcountry":["CH"],"X-Forwarded-Host":["postiz-lc4okosgkocsgsgksow84kwo.app.rewamp.it"]}},"duration":0.001028088,"status":502,"err_id":"i1f0f00dj","err_trace":"reverseproxy.statusError (reverseproxy.go:1267)"}

Steps to Reproduce

1.install postiz in a server with wildcard (handled via cloduflare)
2. try to register

Example Repository URL

No response

Coolify Version

v4.0.0-beta.372

Are you using Coolify Cloud?

Yes (Coolify Cloud)

Operating System and Version (self-hosted)

No response

Additional Information

No response

@mredodos mredodos added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Nov 22, 2024
@mredodos
Copy link
Author

mredodos commented Nov 23, 2024

a user drdiffi from postiz discord in a support ticket

paste this compose and it seems to solve the 502 errors i don't understand why…maybe some env missing on the coolify template?

services:
  postiz:
    image: 'ghcr.io/gitroomhq/postiz-app:latest'
    environment:
      # Required Settings
      - SERVICE_FQDN_POSTIZ_5000
      - 'MAIN_URL=${SERVICE_FQDN_POSTIZ}'
      - 'FRONTEND_URL=${SERVICE_FQDN_POSTIZ}'
      - 'NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZ}/api'
      - 'DATABASE_URL=postgresql://${SERVICE_USER_POSTGRESQL}:${SERVICE_PASSWORD_POSTGRESQL}@postgres:5432/${POSTGRESQL_DATABASE:-postiz-db}'
      - 'REDIS_URL=redis://${SERVICE_USER_REDIS}:${SERVICE_PASSWORD_REDIS}@redis:6379'
      - 'JWT_SECRET=${SERVICE_PASSWORD_JWTSECRET}'
      - 'BACKEND_INTERNAL_URL=http://localhost:3000'
      
      # Cloudflare R2 Settings
      - 'CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID}'
      - 'CLOUDFLARE_ACCESS_KEY=${CLOUDFLARE_ACCESS_KEY}'
      - 'CLOUDFLARE_SECRET_ACCESS_KEY=${CLOUDFLARE_SECRET_ACCESS_KEY}'
      - 'CLOUDFLARE_BUCKETNAME=${CLOUDFLARE_BUCKETNAME}'
      - 'CLOUDFLARE_BUCKET_URL=${CLOUDFLARE_BUCKET_URL}'
      - 'CLOUDFLARE_REGION=${CLOUDFLARE_REGION}'
      
      # Storage Settings
      - 'STORAGE_PROVIDER=${STORAGE_PROVIDER:-local}'
      - 'UPLOAD_DIRECTORY=${UPLOAD_DIRECTORY:-/uploads}'
      - 'NEXT_PUBLIC_UPLOAD_DIRECTORY=${NEXT_PUBLIC_UPLOAD_DIRECTORY:-/uploads}'
      - 'NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=${NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY}'
      
      # Email Settings
      - 'RESEND_API_KEY=${RESEND_API_KEY}'
      - 'EMAIL_FROM_ADDRESS=${EMAIL_FROM_ADDRESS}'
      - 'EMAIL_FROM_NAME=${EMAIL_FROM_NAME}'
      - 'EMAIL_PROVIDER:${EMAIL_PROVIDER}'
      - 'EMAIL_HOST:${EMAIL_HOST}'
      - 'EMAIL_PORT:${EMAIL_PORT}'
      - 'EMAIL_SECURE:${EMAIL_SECURE}'
      - 'EMAIL_USER:${EMAIL_USER}'
      
      # Social Media API Settings
      - 'X_API_KEY=${SERVICE_X_API}'
      - 'X_API_SECRET=${SERVICE_X_SECRET}'
      - 'LINKEDIN_CLIENT_ID=${SERVICE_LINKEDIN_ID}'
      - 'LINKEDIN_CLIENT_SECRET=${SERVICE_LINKEDIN_SECRET}'
      - 'REDDIT_CLIENT_ID=${SERVICE_REDDIT_API}'
      - 'REDDIT_CLIENT_SECRET=${SERVICE_REDDIT_SECRET}'
      - 'GITHUB_CLIENT_ID=${SERVICE_GITHUB_ID}'
      - 'GITHUB_CLIENT_SECRET=${SERVICE_GITHUB_SECRET}'
      - 'THREADS_APP_ID=${SERVICE_THREADS_ID}'
      - 'THREADS_APP_SECRET=${SERVICE_THREADS_SECRET}'
      - 'FACEBOOK_APP_ID=${SERVICE_FACEBOOK_ID}'
      - 'FACEBOOK_APP_SECRET=${SERVICE_FACEBOOK_SECRET}'
      - 'YOUTUBE_CLIENT_ID=${SERVICE_YOUTUBE_ID}'
      - 'YOUTUBE_CLIENT_SECRET=${SERVICE_YOUTUBE_SECRET}'
      - 'TIKTOK_CLIENT_ID=${SERVICE_TIKTOK_ID}'
      - 'TIKTOK_CLIENT_SECRET=${SERVICE_TIKTOK_SECRET}'
      - 'PINTEREST_CLIENT_ID=${SERVICE_PINTEREST_ID}'
      - 'PINTEREST_CLIENT_SECRET=${SERVICE_PINTEREST_SECRET}'
      - 'DRIBBBLE_CLIENT_ID=${SERVICE_DRIBBLE_ID}'
      - 'DRIBBBLE_CLIENT_SECRET=${SERVICE_DRIBBLE_SECRET}'
      - 'DISCORD_CLIENT_ID=${SERVICE_DISCORD_ID}'
      - 'DISCORD_CLIENT_SECRET=${SERVICE_DISCORD_SECRET}'
      - 'DISCORD_BOT_TOKEN_ID=${SERVICE_DISCORD_TOKEN}'
      - 'SLACK_ID=${SERVICE_SLACK_ID}'
      - 'SLACK_SECRET=${SERVICE_SLACK_SECRET}'
      - 'SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET}'
      - 'MASTODON_CLIENT_ID=${SERVICE_MASTODON_ID}'
      - 'MASTODON_CLIENT_SECRET=${SERVICE_MASTODON_SECRET}'
      
      # Integration APIs
      - 'BEEHIIVE_API_KEY=${SERVICE_BEEHIIVE_KEY}'
      - 'BEEHIIVE_PUBLICATION_ID=${SERVICE_BEEHIIVE_PUBID}'
      - 'OPENAI_API_KEY=${SERVICE_OPENAI_KEY}'
      
      # Misc Settings
      - 'NEXT_PUBLIC_DISCORD_SUPPORT=${NEXT_PUBLIC_DISCORD_SUPPORT}'
      - 'NEXT_PUBLIC_POLOTNO=${NEXT_PUBLIC_POLOTNO}'
      - 'IS_GENERAL=${IS_GENERAL:-true}'
      - 'NX_ADD_PLUGINS=${NX_ADD_PLUGINS:-false}'
      
      # Payment Settings
      - 'FEE_AMOUNT=${FEE_AMOUNT:-0.05}'
      - 'STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}'
      - 'STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}'
      - 'STRIPE_SIGNING_KEY=${STRIPE_SIGNING_KEY}'
      - 'STRIPE_SIGNING_KEY_CONNECT=${STRIPE_SIGNING_KEY_CONNECT}'

    volumes:
      - 'postiz_config:/config/'
      - 'postiz_uploads:/uploads/'
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    healthcheck:
      test:
        - CMD-SHELL
        - 'wget -qO- http://127.0.0.1:5000/'
      interval: 5s
      timeout: 20s
      retries: 10

  postgres:
    image: 'postgres:14.5'
    volumes:
      - 'postiz_postgresql_data:/var/lib/postgresql/data'
    environment:
      - 'POSTGRES_USER=${SERVICE_USER_POSTGRESQL}'
      - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}'
      - 'POSTGRES_DB=${POSTGRESQL_DATABASE:-postiz-db}'
    healthcheck:
      test:
        - CMD-SHELL
        - 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
      interval: 5s
      timeout: 20s
      retries: 10

  redis:
    image: 'redis:7.2'
    command: >
      redis-server
      --port 6379
      --save 60 1
      --loglevel warning
      --protected-mode yes
      --aclfile /data/users.acl
    volumes:
      - 'postiz_redis_data:/data'
      - type: tmpfs
        target: /tmp
    healthcheck:
      test:
        - CMD
        - redis-cli
        - '-u'
        - 'redis://${SERVICE_USER_REDIS}:${SERVICE_PASSWORD_REDIS}@localhost:6379'
        - ping
      interval: 5s
      timeout: 10s
      retries: 20
    deploy:
      resources:
        limits:
          memory: 256M
    entrypoint: >
      sh -c "
      echo 'user default off' > /data/users.acl &&
      echo 'user ${SERVICE_USER_REDIS} on >${SERVICE_PASSWORD_REDIS} ~* &* +@all' >> /data/users.acl &&
      redis-server --aclfile /data/users.acl
      "

@peaklabs-dev
Copy link
Member

Can you please try this updated compose file as it should fix the bug: https://github.com/coollabsio/coolify/blob/next/templates/compose/postiz.yaml.

@peaklabs-dev peaklabs-dev removed the 🔍 Triage Issues that need assessment and prioritization. label Nov 25, 2024
@peaklabs-dev peaklabs-dev added this to the v4.0.0 Stable Release milestone Nov 25, 2024
@github-actions github-actions bot removed the 🐛 Bug Reported issues that need to be reproduced by the team. label Nov 26, 2024
@peaklabs-dev peaklabs-dev reopened this Nov 27, 2024
@peaklabs-dev peaklabs-dev linked a pull request Nov 27, 2024 that will close this issue
@peaklabs-dev peaklabs-dev added 🐞 Confirmed Bug Verified issues that have been reproduced by the team. ✅ Done Issues that are fixed and a PR is ready to be merged. labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Confirmed Bug Verified issues that have been reproduced by the team. ✅ Done Issues that are fixed and a PR is ready to be merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants