cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.27k stars 2.95k forks source link

Cannot import annotations on remote server #6461

Open Hegelim opened 1 year ago

Hegelim commented 1 year ago

My actions before raising this issue

Have read the doc and searched all related issues #6078, #6309, #6219 The issue is pretty much the same. I followed the instructions to install CVAT on a EC2 AWS server, everything works except importing annotations. Whenever I click "import", it shows something like Screenshot from 2023-07-11 17-35-37 Looks like it does not go to the correct public domain address (for privacy reason I can't share it). Instead, it goes to localhost: 8080 If I replace this address with the intended public domain address, then I will go to this page image

Steps to Reproduce (for bugs)

Mainly, just followed the installation steps here https://opencv.github.io/cvat/docs/administration/basics/installation/#ubuntu-1804-x86_64amd64 Additionally, I configured nginx such that proxy_pass=http://localhost:8080/; export $CVAT_HOST = localhost everything else is the same

Expected Behaviour

Importing annotations should work without errors

Current Behaviour

See attached image above

Possible Solution

Can't find a solution so far, been stuck on this for a long time.

Context

Your Environment

MechanoPixel commented 1 year ago

Can you check the inspect element network tab to see what's gone wrong with the request? (CORS error etc.)

Additionally, make sure that you have proper forwarding headers set in your nginx config. Here's what my config looks like, as an example:

  location / {
    proxy_pass         http://cvat_upstream:8080/;

    proxy_set_header   Host              $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-Proto $scheme;
    proxy_set_header    X-Forwarded-Host    $host:$server_port;
    proxy_set_header    X-Forwarded-Port    $server_port;
    proxy_max_temp_file_size 0;
    client_max_body_size 0;

    proxy_set_header   Connection        $http_connection;
    proxy_set_header   Upgrade           $http_upgrade;

    proxy_buffering off;
    proxy_request_buffering off;
  }
Hegelim commented 1 year ago

Thanks! I will try that. Here's the logs from the inspection image (I am trying another way so the ip address is 127.0.0.1 instead of localhost but all the errors are the same)

Hegelim commented 1 year ago

I also noticed if I create a new task and upload more than 3 images, it will give me the same error image (again the ip is 127.0.0.1 because I am doing a slightly different experiment, but all errors are the same)

sunxiangkang commented 9 months ago

I also noticed if I create a new task and upload more than 3 images, it will give me the same error image (again the ip is 127.0.0.1 because I am doing a slightly different experiment, but all errors are the same)

I have the same question.Did you solve it? Thanks!