linuxserver / docker-jackett

GNU General Public License v3.0
395 stars 95 forks source link

HTTP 400 on every post request from the UI #63

Closed LennyPenny closed 5 years ago

LennyPenny commented 5 years ago

Every post request sent to jackett results in a 400 error with an empty response. I can't even turn on the enhanced logging as the post request to update the settings fails as well.

There are no logs after Jacketts successful start and loading of the indexers.

I also checked all file permissions, they are correctly being set to 1000 on the host.

Here's my docker-compose for it:

jackett:
    container_name: jackett
    image: "linuxserver/jackett"
    restart: always
    networks:
      - torrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    ports:
      - 9117:9117
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ~/gits/sonarr/config:/config
      - ~/rtorrent/torrents:/downloads

Some logs about the used versions:

12-13 22:36:50 Info Starting Jackett v0.10.504.0
12-13 22:36:50 Info Environment version: 4.0.30319.42000 (/usr/lib/mono/4.5)
12-13 22:36:50 Info OS version: Unix 4.9.0.8 (64bit OS) (64bit process)
12-13 22:36:50 Info ThreadPool MaxThreads: 800 workerThreads, 200 completionPortThreads
12-13 22:36:50 Info App config/log directory: /config/Jackett
12-13 22:36:50 Info issue: Ubuntu 16.04.5 LTS \n \l
12-13 22:36:50 Info mono version: 5.16.0.220 (tarball Mon Nov 26 17:22:46 UTC 2018)

Here's a screenshot of the failed request to enable enhanced logging: https://vgy.me/JoVApx.png

Do you have any idea what might be going wrong?

j0nnymoe commented 5 years ago

just tested here and working ok. Only thing I notice with your docker-compose is I would use full paths for the volumes.

LennyPenny commented 5 years ago

Is there any way I can enable the enhanced logging via an environment variable or something? There must be a way to get some more detailed info as to whats going on

ghost commented 5 years ago

Does is still happen when hit jackett directly i.e not through a reverse proxy?

scatat commented 5 years ago

Bump - I have this issue as well.... not sure how to make the POST directly. Can try if someone can give me a curl command to throw at the container

scatat commented 5 years ago

Alright - my issue appears to be because the nginx reverse proxy I'm using is configuring: proxy_set_header Connection "upgrade" - ie https://github.com/dperson/nginx/blob/master/nginx.sh#L460-L461

and this isn't something Jackett can handle as per: https://github.com/Jackett/Jackett/issues/3712

I tested Jackett with a reverse proxy config leaving out the Connection config and we don't get a 400 when posting.

thelamer commented 5 years ago

@LennyPenny see @scatat comment regarding reverse proxy configuration.

LennyPenny commented 5 years ago

oki awesome, thank you all! Sadly I lost that setup but jackett is running greatly on my new one :+1:

JRascagneres commented 5 years ago

Alright - my issue appears to be because the nginx reverse proxy I'm using is configuring: proxy_set_header Connection "upgrade" - ie dperson/nginx:nginx.sh@master#L460-L461

and this isn't something Jackett can handle as per: Jackett/Jackett#3712

I tested Jackett with a reverse proxy config leaving out the Connection config and we don't get a 400 when posting.

@scatat Hey! I'm hitting the exact issue you did with the nginx proxy. Can you explain how you resolved it exactly?