plankanban / planka

The realtime kanban board for workgroups built with React and Redux.
https://planka.app
GNU Affero General Public License v3.0
7.92k stars 736 forks source link

[Bug]: Node error.The js application does not want to run completely. #914

Open saher228 opened 5 days ago

saher228 commented 5 days ago

Where is the problem occurring?

I encountered the problem while interacting with the server (Backend)

What browsers are you seeing the problem on?

Other

Current behaviour

Node.js v18.20.4
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
Error: getaddrinfo ENOTFOUND 7gLz5Wg
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '7gLz5Wg'
}

image

image

Desired behaviour

No response

Steps to reproduce

I've tried everything from reinstalling to configuring, I did it according to the instructions

Other information

No response

meltyshev commented 5 days ago

Hi! Could you please provide your docker-compose.yml file? It seems there might be a misconfiguration, as the error indicates that the hostname 7gLz5Wg can't be resolved to an IP address.

saher228 commented 4 days ago

Hi! Could you please provide your docker-compose.yml file? It seems there might be a misconfiguration, as the error indicates that the hostname 7gLz5Wg can't be resolved to an IP address.

OK, here's the file itself, I was only able to put the instance in a zip

docker-compose.zip

meltyshev commented 3 days ago

Everything appears to be configured correctly. I’ve checked our Portainer, and the only difference is that we specify networks for each service:

version: '3'

services:
  planka:
    # ...
    networks:
      - "default"
      - "web"

  postgres:
    # ...
    networks:
      - "default"

# ...

networks:
  default:
  web:
    external: true
saher228 commented 3 days ago

Thanks, it almost worked, but not completely . I changed the YAML a bit, since Postgres 15 was already available in Portainer . I just created a planka database, everything is connected, and I don't see any errors . However, for some reason, the page is empty, or maybe I changed the YAML incorrectly.

instance in a zip docker-compose.zip

image image image

Everything appears to be configured correctly. I’ve checked our Portainer, and the only difference is that we specify networks for each service:

version: '3'

services:
  planka:
    # ...
    networks:
      - "default"
      - "web"

  postgres:
    # ...
    networks:
      - "default"

# ...

networks:
  default:
  web:
    external: true
meltyshev commented 3 days ago

The white screen issue could be due to an incorrect BASE_URL configuration, it should be set to http://192.168.0.43:3000 in your case, the same as what you'd enter in the browser.

saher228 commented 3 days ago

Thank you very much. Everything works almost perfectly, but there is a problem with the proxy server. I specified the subdomain in BASE_URL and proxied HTTP://192.168.0.43:3000 to a subdomain, but when you try to log in, an endless download begins, if you do not proxy and use only IP, then everything is fine.

image image image

The white screen issue could be due to an incorrect BASE_URL configuration, it should be set to http://192.168.0.43:3000 in your case, the same as what you'd enter in the browser.

meltyshev commented 2 days ago

Please try setting the TRUST_PROXY=1 environment variable and then restart the container.

saher228 commented 2 days ago

image

image

image

Пожалуйста, попробуйте установить TRUST_PROXY=1 переменную окружения, а затем перезапустите контейнер.

meltyshev commented 2 days ago

Based on the first error in the console, the server is returning an HTML page instead of a JSON response for some reason. I'm not entirely sure of the cause, as I'm not very familiar with proxy servers and their configurations. Additionally, I noticed that on your website there's a slash at the end of the BASE_URL which is causing an endless redirect loop.

saher228 commented 2 days ago

It's difficult, maybe it's Nginx, so I'll try to deploy Nginx proxy, but I'm not sure, it's strange that an extra slash doesn't come from somewhere.

And so thank you so much for being able to help!


   server 192.168.0.43:1337;
   keepalive 32;
}
server {

    server_name crm.inzeworld.ru;
    access_log /var/log/nginx/planka-access.log;
    error_log  /var/log/nginx/planka-error.log error;

        location ~* \.io {
        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://192.168.0.43:3000;
    }

    location / {
        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://192.168.0.43:3000;
    }```

> Based on the first error in the console, the server is returning an HTML page instead of a JSON response for some reason. I'm not entirely sure of the cause, as I'm not very familiar with proxy servers and their configurations. Additionally, I noticed that on your website there's a slash at the end of the BASE_URL which is causing an endless redirect loop.