ntoporcov / iQbit

GNU General Public License v3.0
575 stars 47 forks source link

Standalone Server: Request failed with status code 504 #75

Open simonbcn opened 1 year ago

simonbcn commented 1 year ago
qBittorrent v4.5.2
Linux NixOS 23.05
node v18.17.1

I have changed the file server/config/local_env.sh to point correctly to the qBittorrent port:

❯ cat server/config/local_env.sh
#!/usr/bin/env bash
export QBIT_HOST=http://localhost:9090
export STANDALONE_SERVER_PORT=8081
❯ npm run server-start

> iqbit@1.0.1 server-start
> cd server && npm run serve

> standalone-iqbit-server@1.0.0 serve
> pm2 start ecosystem.config.js

[PM2] Applying action restartProcessId on app [iQbit Standalone Server](ids: [ 0 ])
[PM2] [iQbit Standalone Server](0) ✓
┌─────┬────────────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name                       │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼────────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ iQbit Standalone Server    │ default     │ 1.0.0   │ fork    │ 50967    │ 0s     │ 1    │ online    │ 0%       │ 35.7mb   │ juan     │ disabled │
└─────┴────────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

But:

Captura de pantalla_área-de-selección_20231016143012

In fact, it should enter directly because I have whitelisted the LAN.

simonbcn commented 1 year ago

On the other hand in the wiki you make reference to the .env and .env.default files but I don't see them anywhere. The only thing that is similar is the server/config/local_env.sh file that I changed but that did not help.

sviperm commented 1 year ago

@simonbcn While solving my other problem I've also met this issue. No .env.default file. Even if I have .env file with different params than default - nothing happend. I found the only solution to change env vars manually in console like this

export QBIT_HOST=http://localhost:9090 && export STANDALONE_SERVER_PORT=8081 && npm run server-start

.env part should be described better or fixed

simonbcn commented 1 year ago

It would be a good idea to display the following information in the console when starting the server: QBIT_HOST and STANDALONE_SERVER_PORT.