no live upstreams while connecting to upstream #417

Closed
opened 2026-02-04 19:08:20 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @dielit66 on GitHub (Feb 20, 2024).

NGINX conf:

upstream planka {
   server localhost:1337;
   keepalive 32;
}
server {
        listen 80 default_server;
        listen [::]:80 default_server;
         server_name MY_DOMAIN.xyz www.MY_DOMAIN.xyz;
         location / {
                try_files $uri /index.html;
        }
location /kanban-planka {
        client_max_body_size 50M;
        proxy_set_header Connection "";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Frame-Options SAMEORIGIN;
        proxy_buffers 256 16k;
        proxy_buffer_size 16k;
        proxy_read_timeout 600s;
        proxy_cache_revalidate on;
        proxy_cache_min_uses 2;
        proxy_cache_use_stale timeout;
        proxy_cache_lock on;
        proxy_http_version 1.1;
        proxy_pass http://planka;
    }

.env planka

## Required

BASE_URL=http://MY_DOMAIN.xyz/kanban-planka
DATABASE_URL=postgresql://planka:****@localhost/planka
SECRET_KEY=****

## Optional

# TRUST_PROXY=0
TOKEN_EXPIRES_IN=365

# related: https://github.com/knex/knex/issues/2354
# As knex does not pass query parameters from the connection string we
# have to use environment variables in order to pass the desired values, e.g.
# PGSSLMODE=<value>

# Configure knex to accept SSL certificates
# KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false

 DEFAULT_ADMIN_EMAIL=****
 DEFAULT_ADMIN_PASSWORD=****
 DEFAULT_ADMIN_NAME=****
 DEFAULT_ADMIN_USERNAME=****

# OIDC_ISSUER=
# OIDC_CLIENT_ID=
# OIDC_CLIENT_SECRET=
# OIDC_SCOPES=openid email profile
# OIDC_ADMIN_ROLES=admin
# OIDC_ROLES_ATTRIBUTE=groups

## Do not edit this

TZ=UTC

When you go to https://MY_DOMAIN.xyz/kanban-planka link, the statics don't load...
I will be grateful for help!

image

Originally created by @dielit66 on GitHub (Feb 20, 2024). NGINX conf: ``` upstream planka { server localhost:1337; keepalive 32; } server { listen 80 default_server; listen [::]:80 default_server; server_name MY_DOMAIN.xyz www.MY_DOMAIN.xyz; location / { try_files $uri /index.html; } location /kanban-planka { client_max_body_size 50M; proxy_set_header Connection ""; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Frame-Options SAMEORIGIN; proxy_buffers 256 16k; proxy_buffer_size 16k; proxy_read_timeout 600s; proxy_cache_revalidate on; proxy_cache_min_uses 2; proxy_cache_use_stale timeout; proxy_cache_lock on; proxy_http_version 1.1; proxy_pass http://planka; } ``` .env planka ``` ## Required BASE_URL=http://MY_DOMAIN.xyz/kanban-planka DATABASE_URL=postgresql://planka:****@localhost/planka SECRET_KEY=**** ## Optional # TRUST_PROXY=0 TOKEN_EXPIRES_IN=365 # related: https://github.com/knex/knex/issues/2354 # As knex does not pass query parameters from the connection string we # have to use environment variables in order to pass the desired values, e.g. # PGSSLMODE=<value> # Configure knex to accept SSL certificates # KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false DEFAULT_ADMIN_EMAIL=**** DEFAULT_ADMIN_PASSWORD=**** DEFAULT_ADMIN_NAME=**** DEFAULT_ADMIN_USERNAME=**** # OIDC_ISSUER= # OIDC_CLIENT_ID= # OIDC_CLIENT_SECRET= # OIDC_SCOPES=openid email profile # OIDC_ADMIN_ROLES=admin # OIDC_ROLES_ATTRIBUTE=groups ## Do not edit this TZ=UTC ``` When you go to https://MY_DOMAIN.xyz/kanban-planka link, the statics don't load... I will be grateful for help! ![image](https://github.com/plankanban/planka/assets/32987720/1aa89f74-50aa-41aa-8394-606c1dae6903)
Author
Owner

@dielit66 commented on GitHub (Feb 20, 2024):

#576 this solution helped me
After successful authorization, socket connection problem
nginx error log -
2024/02/20 15:26:09 [error] 1065894#1065894: *223 no live upstreams while connecting to upstream, client: ****, server: MY_DOMAIN.xyz, request: "GET /planka/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket HTTP/1.1", upstream: "http://planka/planka/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket", host: "MY_DOMAIN.xyz"

@dielit66 commented on GitHub (Feb 20, 2024): #576 this solution helped me After successful authorization, socket connection problem nginx error log - `2024/02/20 15:26:09 [error] 1065894#1065894: *223 no live upstreams while connecting to upstream, client: ****, server: MY_DOMAIN.xyz, request: "GET /planka/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket HTTP/1.1", upstream: "http://planka/planka/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket", host: "MY_DOMAIN.xyz"`
Author
Owner

@dielit66 commented on GitHub (Feb 20, 2024):

just added rewrite ^/planka/socket.io/(.*)$ /socket.io/$1 break;
to

location ~* \.io {
        rewrite ^/planka/socket.io/(.*)$ /socket.io/$1 break;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        client_max_body_size 50M;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Frame-Options SAMEORIGIN;
        proxy_buffers 256 16k;
        proxy_buffer_size 16k;
        client_body_timeout 60;
        send_timeout 300;
        lingering_timeout 5;
        proxy_connect_timeout 1d;
        proxy_send_timeout 1d;
        proxy_read_timeout 1d;
        proxy_pass http://planka;
    }

And it worked!

@dielit66 commented on GitHub (Feb 20, 2024): just added `rewrite ^/planka/socket.io/(.*)$ /socket.io/$1 break;` to ``` location ~* \.io { rewrite ^/planka/socket.io/(.*)$ /socket.io/$1 break; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; client_max_body_size 50M; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Frame-Options SAMEORIGIN; proxy_buffers 256 16k; proxy_buffer_size 16k; client_body_timeout 60; send_timeout 300; lingering_timeout 5; proxy_connect_timeout 1d; proxy_send_timeout 1d; proxy_read_timeout 1d; proxy_pass http://planka; } ``` And it worked!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#417