Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx not configured #1264

Closed
samyhocine opened this issue Mar 15, 2020 · 23 comments
Closed

nginx not configured #1264

samyhocine opened this issue Mar 15, 2020 · 23 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@samyhocine
Copy link

Hi,

I'm on Win10 Home and I use docker Toolbox.

I've followed the installation guide but I'm facing an issue. Working on since two days but didn't find a way to solve it :/

When I connect to "http://192.168.99.100:8080" on Google Chrome I have the nginx homepage with this message:

"Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx."

So nothing has been configured and I can't access the login page.

How is it so ?

The build went well and everything is green "done" when doing docker-compose up -d

For information:

I've modified the file docker-compose.yml (because I'm using Docker Toolbox)

cvat_proxy:
...
    environment:
        CVAT_HOST: "192.168.99.100"

And also updated the cvat-ui/package.json file with:

"scripts": {
    "build": "webpack --max-old-space-size=8192 --config ./webpack.config.js",

To increase the available mem space because of an issue I had during the build: "JavaScript heap out of memory" (issue solved with this update)

Best regards,

Samy

@samyhocine
Copy link
Author

Is this a trivial problem ?

@azhavoro
Copy link
Contributor

@samyhocine Hi, sorry for the late response. We did't try to build and use CVAT with docker toolbox, but could you please run the following command and attach cvat_proxy.conf file?

docker cp cvat_proxy:/etc/nginx/conf.d/default.conf cvat_proxy.conf

@samyhocine
Copy link
Author

samyhocine commented Mar 16, 2020

@azhavoro thanks for your feedback.

This line didn't help unfortunately. I tried this command before a:

docker-compose up -d

And before a "rebuilt": docker-compose build

The cvat_proxy.conf file (markdown is a bit lost with the syntax analysis :/)

server { listen 80; server_name _ default; return 404; }

server { listen 80; server_name 192.168.99.100;

location ~* /api/.*|git/.*|tensorflow/.*|auto_annotation/.*|analytics/.*|static/.*|admin|admin/.*|documentation/.*|dextr/.*|reid/.*  {
    proxy_pass              http://cvat:8080;
    proxy_pass_header       X-CSRFToken;
    proxy_set_header        Host $http_host;
    proxy_pass_header       Set-Cookie;
}
location / {
    # workaround for match location by arguments
    error_page 418 = @annotation_ui;

    if ( $query_string ~ "^id=\d+.*" ) { return 418; }

    proxy_pass              http://cvat_ui;
    proxy_pass_header       X-CSRFToken;
    proxy_set_header        Host $http_host;
    proxy_pass_header       Set-Cookie;
}

# old annotation ui, will be removed in the future.
location @annotation_ui {
    proxy_pass              http://cvat:8080;
    proxy_pass_header       X-CSRFToken;
    proxy_set_header        Host $http_host;
    proxy_pass_header       Set-Cookie;
}

}`

@azhavoro
Copy link
Contributor

@samyhocine could you post output from docker-compose config and docker ps also?

@samyhocine
Copy link
Author

@azhavoro
Copy link
Contributor

It's very strange, everything looks ok ... nginx homepage points that it uses default config, but config is properly configured. Could you attach your docker-compose.yml? I'll try to reproduce the issue on windows.

@samyhocine
Copy link
Author

Thanks a lot :)

Attached docker-compose.yml (.txt for the upload)

docker-compose.yml.txt

@yohayonyon
Copy link

yohayonyon commented Mar 18, 2020

I have the same issue from Ubuntu 18.04 VM, so I follow...

@azhavoro azhavoro added the bug Something isn't working label Mar 18, 2020
@azhavoro azhavoro self-assigned this Mar 18, 2020
@azhavoro
Copy link
Contributor

azhavoro commented Mar 18, 2020

@samyhocine @yohayonyon Hi, could you please attach the output from the following commands
docker exec -it cvat_proxy -T and docker exec -it cvat_ui -T? Also docker logs cvat_proxy and docker logs cvat_ui may be helpful. Thanks.

@azhavoro
Copy link
Contributor

One more question: is the admin page http://192.168.99.100:8080/admin reachable?

@samyhocine
Copy link
Author

@azhavoro

docker_exec_it_cvat_proxy_T.txt

docker_exec_it_cvat_ui_T.txt

docker_logs_cvat_proxy.txt

docker logs cvat_ui returns Nothing

Yes, http://192.168.99.100:8080/admin is reachable. I can see the Django administration login panel.

@azhavoro
Copy link
Contributor

@samyhocine sorry, right command is docker exec -it cvat_proxy nginx -T and docker exec -it cvat_ui nginx -T

@samyhocine
Copy link
Author

Sorry @azhavoro

I've just switched on Windows 10 Pro.

Maybe @yohayonyon would like to continue

Thanks again @azhavoro for your time ;)

@azhavoro
Copy link
Contributor

azhavoro commented Mar 18, 2020

@samyhocine I think it's not related with docker toolbox, there is the same issue on ubuntu #1287. Looks like that cvat_ui not properly configured by some reason and returns default nginx page. Unfortunately I cannot reproduce the issue at the moment...

@samyhocine
Copy link
Author

samyhocine commented Mar 18, 2020

Oh ok :/

I will clone the git and try it on my Windows 10 Pro

@samyhocine
Copy link
Author

samyhocine commented Mar 18, 2020

@azhavoro I've installed cvat on Windows 10 Pro using Docker Desktop and it's working.

Maybe it's docker related and not cvat related ?
My processor (if it's useful): AMD Ryzen 5 2600

@yohayonyon for the next move ? :)

@yohayonyon
Copy link

  1. <machine_name>:8080/admin - django login screen was reached. I managed to log in with the superuser credentials that I had defined.

  2. docker exec -it cvat_proxy nginx -T - cvat_proxy.txt

  3. docker exec -it cvat_ui nginx -T - cvat_ui.txt

  4. docker exec -it cvat_ui cat /usr/share/nginx/html/index.html - index.html.txt

Seems similar to issue #1287.

@azhavoro
Copy link
Contributor

@yohayonyon thanks, yes it's the same issue, could you please rebuild cvat_ui image with the command docker-compose build --no-cache cvat_ui and attach full build log? Thanks.

@yohayonyon
Copy link

Screenshot from 2020-03-20 12-45-16

So far it is stuck there...

@nmanovic
Copy link
Contributor

#1261

@nmanovic , I have found two issues with the deployment:

  • nginx proxy cannot work by default with long domain names (e.g. ec2-x-xx-xx-xxxx.us-east-2.compute.amazonaws.com). Need to specify a directive to resolve the issue. If you have the problem it is easy do diagnose. Just run docker logs cvat_proxy and you will see the recommendation from nginx.
  • When cvat-ui is complied there is a problem with memory consumed by nodejs. Some problems can be solved by use NODE_OPTIONS=--max_old_space_size=200 environment variable. But webpack consumes too much memory. It leads to "JavaScript heap out of memory" problem (webpack/webpack#6389).

Our team will do the best to resolve the issue ASAP.

P.S. I tried to reproduce the issue on t2.micro with 1G RAM.

@nmanovic nmanovic assigned nmanovic and unassigned azhavoro Mar 25, 2020
@nmanovic nmanovic added this to the 0.6.1 - Release milestone Mar 25, 2020
@nmanovic nmanovic added the duplicate This issue or pull request already exists label Mar 25, 2020
@muhammadhusein
Copy link

I also have the same problem, I'm using ubuntu OS 18.04 ...
how do i fix it?
Please..

@lbj96347
Copy link

@muhammadhusein I have met the same issue when I install CVAT on Ubuntu OS 18.04. When I type curl http://localhost:8080/admin , I'm not able to reach django admin.

I realized that cvat_ui may not ready for using. So I ran docker-compose build --no-cache cvat_ui again. After that I try to run docker-compose up -d, it works now.

@luvwinnie
Copy link

it shows the same problem in macOS Catalina....., the root path goes to the Nginx default page.. Did anyone have the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

7 participants