WebIDE won't open

Hey
I have an Gitlab 11.2.3 (06cbee3) server running in Docker behind an Apache Revers proxy,
but when I try to open Web-IDE in projects i get

Error while loading the project data. Please try again.

Do some one know how to fix this or can help me debug why this happend?

1 Like

Hello,
Can you place the nginx configuration? Are you using proxy_pass?
at the moment that gitlab sends that error, what error appears in the ngnix log?

1 Like

Do you mean Apache config? and if you want Gitlab Nginx config, where do I find it?
If you mean Apache, her you go

<VirtualHost *:80>
        ServerAdmin help@example.org
        ServerName git.example.org

        RewriteEngine On
        RewriteCond %{HTTPS} !=on
        RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

</VirtualHost>

<VirtualHost *:443>
        ServerAdmin help@example.org
        ServerName git.example.org

        # 503 request gets send to local server                                                                                                                                                                    
        DocumentRoot /var/www/gitlab/
        ProxyPass /error/ !
        ErrorDocument 503 /error/503.html

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/git.example.org/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/git.example.org/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

        <Proxy *>
            Require all granted
        </Proxy>

        SSLProxyEngine on
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off
        ProxyRequests Off

        ProxyPass / https://192.168.1.20/
        ProxyPassReverse / https://192.168.1.20/

        Header edit Location ^http://git.example.org/ https://git.example.org/
        RequestHeader set X-Forwarded-Proto "https"
</VirtualHost>

And when i opens the Web-IDE the gitlab Nginx Log puts out

192.168.1.50 - - [02/Sep/2018:20:40:18 +0000] "GET /-/ide/project/xaner4/Homepage/edit/master/-/index.html HTTP/1.1" 200 5143 "https://git.example.org/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.50 - - [02/Sep/2018:20:40:19 +0000] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 0 "https://git.example.org/-/ide/project/xaner4/Homepage/edit/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
1 Like

Yes, sorry, I was referring to Apache.
If you try to navigate the source code?, see the contents of a file in the project.

In my case it happened that I wanted to see a file code.java and tried to show it but it sent me that error, the fact was that when doing proxy_pass in the gitlab the path/location that was used was not found.

Possibly you can see it in the apache log.

I have the same issue with my installation.

I have not figured out the best way to debug this yet

I hope we find a clue

Lance

I have tried looking in the log files for both my apache reverse proxy and for the Gitlab Nginx and haven’t found any thing useful information on why it happens yet

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:19 +0200] "GET /xaner4/Homepage/blob/master/index.html HTTP/1.1" 200 10538

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:19 +0200] "GET /xaner4/Homepage/blob/master/index.html HTTP/1.1" 200 11484 "https://git.example.com/xaner4/Homepage/tree/master" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:19 +0200] "GET /xaner4/Homepage/blob/master/index.html HTTP/1.1" 200 11484 "https://git.example.com/xaner4/Homepage/tree/master" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:20 +0200] "GET /xaner4/Homepage/commits/51fb9500e2dh74lko3445kodc77c73/signatures HTTP/1.1" 304 -

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:20 +0200] "GET /xaner4/Homepage/commits/51fb9500e2dh74lko3445kodc77c73/signatures HTTP/1.1" 304 414 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:20 +0200] "GET /xaner4/Homepage/commits/51fb9500e2dh74lko3445kodc77c73/signatures HTTP/1.1" 304 414 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:20 +0200] "GET /xaner4/Homepage/blob/master/index.html?format=json&viewer=simple HTTP/1.1" 304 -

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:20 +0200] "GET /xaner4/Homepage/blob/master/index.html?format=json&viewer=simple HTTP/1.1" 304 414 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:20 +0200] "GET /xaner4/Homepage/blob/master/index.html?format=json&viewer=simple HTTP/1.1" 304 414 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:21 +0200] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 -

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:21 +0200] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 370 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:21 +0200] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 370 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:24 +0200] "GET /-/ide/project/xaner4/Homepage/edit/master/-/index.html HTTP/1.1" 200 5127

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:24 +0200] "GET /-/ide/project/xaner4/Homepage/edit/master/-/index.html HTTP/1.1" 200 5826 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:24 +0200] "GET /-/ide/project/xaner4/Homepage/edit/master/-/index.html HTTP/1.1" 200 5826 "https://git.example.com/xaner4/Homepage/blob/master/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:25 +0200] "GET /api/v4/projects/xaner4%2FHomepage HTTP/1.1" 404 314

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:25 +0200] "GET /api/v4/projects/xaner4%2FHomepage HTTP/1.1" 404 559 "https://git.example.com/-/ide/project/xaner4/Homepage/edit/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:25 +0200] "GET /api/v4/projects/xaner4%2FHomepage HTTP/1.1" 404 559 "https://git.example.com/-/ide/project/xaner4/Homepage/edit/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com_forwarded.log <==
- - - [06/Sep/2018:10:10:25 +0200] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 -

==> /var/log/apache2/git.example.com_access.log <==
0.0.0.0 - - [06/Sep/2018:10:10:25 +0200] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 217 "https://git.example.com/-/ide/project/xaner4/Homepage/edit/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

==> /var/log/apache2/git.example.com.log <==
0.0.0.0 - - [06/Sep/2018:10:10:25 +0200] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/1.1" 304 217 "https://git.example.com/-/ide/project/xaner4/Homepage/edit/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

a question, if you access directly in the second url, without using the reverse proxy, does it work?

1 Like

When I try to open the WebIDE without using the reverse proxy it works fine.

GitLab NGINX LOG

==> nginx/gitlab_access.log <==
127.0.0.1 - - [09/Sep/2018:17:52:49 +0000] "GET /help HTTP/1.1" 200 35652 "" "curl/7.59.0"
192.168.1.194 - - [09/Sep/2018:17:52:50 +0000] "GET /-/ide/project/xaner4/Homepage/edit/master HTTP/2.0" 200 5134 "https://git.exempel.com/xaner4/Homepage" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:52 +0000] "GET /uploads/-/system/appearance/header_logo/1/2480x512.png HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/edit/master/-/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:52 +0000] "GET /api/v4/projects/xaner4%2FHomepage HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/edit/master/-/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:52 +0000] "GET /xaner4/Homepage/files/master?format=json HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/edit/master/-/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:52 +0000] "GET /api/v4/projects/xaner4%2FHomepage/repository/branches/master HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/edit/master/-/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:52 +0000] "GET /xaner4/Homepage/commit/a651f20f517b067fbafe4e9de76e4c2163c565f9/pipelines HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/edit/master/-/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:55 +0000] "GET /xaner4/Homepage/blob/master/index.html?format=json&viewer=none HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/blob/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:56 +0000] "GET /xaner4/Homepage/raw/master/index.html HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/blob/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:52:56 +0000] "GET /assets/webpack/editor.worker.js HTTP/2.0" 200 28073 "https://git.exempel.com/-/ide/project/xaner4/Homepage/blob/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
192.168.1.194 - - [09/Sep/2018:17:53:03 +0000] "GET /xaner4/Homepage/commit/a651f20f517b067fbafe4e9de76e4c2163c565f9/pipelines HTTP/2.0" 304 0 "https://git.exempel.com/-/ide/project/xaner4/Homepage/blob/master/-/index.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

And for the "/api/v4/projects/xaner4%2FHomepage " It works also fine without the proxy

192.168.1.194 - - [09/Sep/2018:18:00:11 +0000] "GET /api/v4/projects/xaner4%2FHomepage HTTP/2.0" 304 0 "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"

Do some one have some ideas to fix this?

sorry for delay.

Can you try to eliminate the backslash of the end?

ProxyPass / https://192.168.1.20/

ProxyPass / https://192.168.1.20

it’s okay I have been too busy myself to test it anyway

I tried to eliminate the backslash of the ProxyPass but than I just got this message

# Proxy Error

The proxy server received an invalid response from an upstream server.
 The proxy server could not handle the request *[GET /users/sign_in](https://git.example.com/users/sign_in)* .

Reason: **DNS lookup failure for: 192.168.1.20users**

Can you apply the suggestion?

1 Like

Thanks, @ariel.barria that fixed it :smiley:

Wow after all this time at it was that easy :joy:
Just needed to add nocanon at the end of proxypass and AllowEncodedSlashes NoDecode like this

   ProxyPass / https://192.168.1.20/ nocanon
   AllowEncodedSlashes NoDecode
3 Likes

Hello,
I have the same issue on my docker machine.
I have a apache config:

ProxyPass http://127.0.0.1:9001/
ProxyPassReverse http://127.0.0.1:9001/
RequestHeader set X-Forwarded-Proto “https”

The
nocanon
AllowEncodedSlashes NoDecode
Options I tried without success…

Here is my current, NOT WORKING code…

ProxyPass http://127.0.0.1:9001/ nocanon
ProxyPassReverse http://127.0.0.1:9001/ nocanon
AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Proto "https"

Anyone an idea to fix?

sorry for the super late answer @Sh4d0w , can you send the complete Apache virtualhost config file?
I will have a look and test out your config when I have time to test it and see if i can find a solution for you

Hello @xaner4,

thanks for your answer.

I have installed Docker and the Gitlab inside on my productive webserver with an apache.

I can open Gitlab first with my IP and Port f.e. 1.2.3.4:9001 and second via the vhost and a subdomain like gitlab.mydomain.de.

BOTH runs into an error, so the trouble is not only the vhost. BUT the errors are different.

This is my current vhost:

ProxyPass http://127.0.0.1:9001/
ProxyPassReverse http://127.0.0.1:9001/
RequestHeader set X-Forwarded-Proto “https”

But also with the nocanon and AllowEncodedSlashes NoDecode things found in web it is not working.

Hello,

in new 13.0.0 the WebIDE works if I browse only IP:PORT

But not with my Apache Vhost. Same error and I think its only a redirect/header thing in the vhost:


ProxyPass http://127.0.0.1:9001/ nocanon
ProxyPassReverse http://127.0.0.1:9001/ nocanon
AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Proto “https”

Hello,

the following config works for me:

RequestHeader set Host “[gitlab-host]”
RequestHeader add X-Forwarded-Ssl on
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}e
RequestHeader set X-Forwarded-Proto “https”

ProxyPreserveHost On
ProxyPass / http://localhost:[PORT]/ nocanon
ProxyPassReverse / http://localhost:[PORT]/
AllowEncodedSlashes NoDecode