INCOMPLETE_CHUNKED_ENCODING in subdirectory with docker and reverse proxy

I am running gitea (Version: 1.1.0) in a docker-container (/data mounted to my filesystem to /data/gitea) on a raspberry pi 3. I use nginx (also on docker) as a reverse proxy to let gitea run in a subdirectory (http://pi/gitea).

So far everything works fine with the exception that the GUI does not display correctly most of the times. Chrome displays “net::ERR_INCOMPLETE_CHUNKED_ENCODING” as a status of these three files:

  • /js/jquery-1.11.3.min.js
  • /css/semantic-2.2.10.min.css
  • /js/semantic-2.2.10.min.js

I already tried setting “sendfile off;” (nginx.conf: http) as described here: https://github.com/Varying-Vagrant-Vagrants/VVV/issues/324

Another solution that didn’t work for me was setting “fastcgi_buffering off;” (nginx.conf: http) described here: https://github.com/Microsoft/WSL/issues/2100

The same problem occures with gogs. And the really weird thing is, that sometimes it works, if i just refresh the page several times.

git pushing/pulling, user registration and repository managing works flawlessly (except that the gui is “broken”).

File /data/nginx/nginx.conf:

user nginx;
worker_processes auto;
pcre_jit on;
error_log /var/log/nginx/error.log warn;
include /etc/nginx/modules/*.conf;
events {
        worker_connections 1024;
}

http {
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
        server_tokens off;
        client_max_body_size 1m;
        keepalive_timeout 65;
        sendfile off;
        tcp_nodelay on;
        ssl_prefer_server_ciphers on;
        ssl_session_cache shared:SSL:2m;
        gzip on;
        gzip_vary on;
        log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';
        access_log /var/log/nginx/access.log main;
        include /etc/nginx/conf.d/*.conf;
        fastcgi_buffering off;
}

File /data/nginx/conf.d/default.conf:

upstream gitea {
        server 172.18.0.8:3000;
}
server {
        listen 80;
        server_name pi2;
        location /gitea/ {
                proxy_pass         http://gitea/;
                proxy_redirect     off;
                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-Host $server_name;
                client_max_body_size 100M;
                proxy_set_header Connection keep-alive;
        }
}

Hi @Johannes,

Are you able to connect directly to the Gitea daemon, and does it show the full UI?

Version 1.1.0 is an older version of Gitea, some debian packages report that version even for newer versions, is there a commit associated with the version as well?

Thanks,
@techknowlogick

Hello @techknowlogick
Thanks for your fast response!

Yes, as i understand it, i can connect to the Gitea daemon since i can create repositories, users and can git push/pull to/from them.
The UI is visible as well, it is only formated in a very bad/plain way.

I used the Dockerfile provided by ulm0 in this issue: https://github.com/go-gitea/gitea/issues/531
Sorry, but i don’t know exactly what you mean by “is there a commit associated”?

Hi @Johannes,

Please ignore my comment regarding commit as from your link I was able to answer that question. The Dockerfile you are using pulls the release file from GitHub which indeed confirms version 1.1.0.

Have you tried running Gitea without Docker to see if it is related to Docker?

Thanks,
@techknowlogick