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
11.74k stars 2.88k forks source link

404 Accessing from outside the network using RemoteIT #8063

Closed pedro-aguia closed 2 days ago

pedro-aguia commented 1 week ago

Actions before raising this issue

Steps to Reproduce

Good afternoon, I installed CVAT in a personal server to run on localhost. The initial idea is conecting to it from outside the local network using remote.it, however I cant manage to access it.

I installed CVAT following the documentation, to set it working on localhost:8080, tested it with curl:

~/cvat$ curl -I 127.0.0.1:8080
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 1265
Content-Type: text/html
Cross-Origin-Embedder-Policy: credentialless
Cross-Origin-Opener-Policy: same-origin
Date: Thu, 20 Jun 2024 15:32:40 GMT
Etag: "6672b9bd-4f1"
Expires: 0
Last-Modified: Wed, 19 Jun 2024 10:58:05 GMT
Pragma: no-cache
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: deny

Appears to be working properly, I set up the remote.it connection:

 90:00:00:00:00:xx:xx:xx| HTTP (7)          | connected    | 127.0.0.1:8080           | true

But when I try to connect from outside, like I do with other servers that I have running (with FastAPI), the website doesnt load stating 404 page not found.

I setted the log level to debug, and this is what I found:

{"ClientAddr":"172.25.0.1:43158","ClientHost":"172.25.0.1","ClientPort":"43158","ClientUsername":"-","DownstreamContentSize":19,"DownstreamStatus":404,"Duration":12552,"GzipRatio":0,"OriginContentSize":0,"OriginDuration":0,"OriginStatus":0,"Overhead":12552,"RequestAddr":"cvat.at.remote.it:33009","RequestContentSize":0,"RequestCount":1,"RequestHost":"cvat.at.remote.it","RequestMethod":"GET","RequestPath":"/","RequestPort":"33009","RequestProtocol":"HTTP/1.1","RequestScheme":"http","RetryAttempts":0,"StartLocal":"2024-06-20T11:39:59.448325222Z","StartUTC":"2024-06-20T11:39:59.448325222Z","entryPointName":"web","level":"info","msg":"","time":"2024-06-20T11:39:59Z"}

cvat.at.remote.it:33009 is the IP I use to connect from my local device, which then gets translated to 127.0.0.1:8080 with the remote.it service, but aparently its not working.

Any advise is welcome, thanks

Expected Behavior

No response

Possible Solution

No response

Context

No response

Environment

commit deb9681c6923d56768f82cd478dcd930553312c0 (HEAD -> develop, origin/gsoc/consensus-feature, origin/develop, origin/HEAD)
Author: Boris Sekachev <boris.sekachev@yandex.ru>
Date:   Thu Jun 20 14:02:10 2024 +0300

    cvat-core api fixes & refactoring (#8016)

Client: Docker Engine - Community
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:28:57 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:28:57 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
azhavoro commented 5 days ago

Most likely you just need to set a correct CVAT_HOST https://docs.cvat.ai/docs/faq/#how-to-change-default-cvat-hostname-or-port