-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Accessing CVAT from local network #3982
Comments
https://openvinotoolkit.github.io/cvat/docs/faq/#how-to-change-default-cvat-hostname-or-port |
Thank you but it only worked for like 10 minutes and I was not able to login with the admin user I created. What I did:
I also tried:
Am I doing something wrong? Envcontainers started with: $ git log -1
commit 2bb8643c1aba53b9ee4fd836b0955340f61d80ed (HEAD -> release-1.7.0, origin/release-1.7.0)
Author: Nikita Manovich <[email protected]>
Date: Tue Nov 9 09:23:15 2021 +0300
Updated release date, froze CHANGELOG
$ sudo docker version
Client: Docker Engine - Community
Version: 20.10.11
API version: 1.41
Go version: go1.16.9
Git commit: dea9396
Built: Thu Nov 18 00:37:06 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.11
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: 847da18
Built: Thu Nov 18 00:35:15 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ sudo docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019 A part from cvat server's log that may help:WARNINGS:
?: (urls.W005) URL namespace 'v1' isn't unique. You may not be able to reverse all URLs in this namespace
2021-12-03 08:53:14,200 DEBG 'runserver' stdout output:
Server URL : http://localhost:8080/
Server Root : /tmp/cvat-server
Server Conf : /tmp/cvat-server/httpd.conf
Error Log File : /dev/stderr (INFO)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : C.UTF-8
2021-12-03 08:53:14,237 DEBG 'runserver' stderr output:
[Fri Dec 03 08:53:14.236778 2021] [mpm_event:notice] [pid 16:tid 139813010869312] AH00489: Apache/2.4.41 (Ubuntu) mod_wsgi/4.7.1 Python/3.8 configured -- resuming normal operations
[Fri Dec 03 08:53:14.236849 2021] [mpm_event:info] [pid 16:tid 139813010869312] AH00490: Server built: 2021-10-14T16:24:43
[Fri Dec 03 08:53:14.236853 2021] [core:notice] [pid 16:tid 139813010869312] AH00094: Command line: 'apache2 (mod_wsgi-express) -f /tmp/cvat-server/httpd.conf -D MOD_WSGI_MPM_ENABLE_EVENT_MODULE -D MOD_WSGI_MPM_EXISTS_EVENT_MODULE -D MOD_WSGI_MPM_EXISTS_WORKER_MODULE -D MOD_WSGI_MPM_EXISTS_PREFORK_MODULE -D FOREGROUND'
2021-12-03 08:53:14,237 DEBG 'runserver' stderr output:
[Fri Dec 03 08:53:14.236932 2021] [wsgi:info] [pid 1731:tid 139813010869312] mod_wsgi (pid=1731): Starting process 'localhost:8080' with threads=5.
2021-12-03 08:53:14,237 DEBG 'runserver' stderr output:
[Fri Dec 03 08:53:14.237730 2021] [wsgi:info] [pid 1731:tid 139813010869312] mod_wsgi (pid=1731): Python home /opt/venv.
2021-12-03 08:53:14,238 DEBG 'runserver' stderr output:
[Fri Dec 03 08:53:14.237828 2021] [wsgi:info] [pid 1731:tid 139813010869312] mod_wsgi (pid=1731): Initializing Python.
2021-12-03 08:53:14,277 DEBG 'runserver' stderr output:
[Fri Dec 03 08:53:14.277291 2021] [wsgi:info] [pid 1731:tid 139813010869312] mod_wsgi (pid=1731): Attach interpreter ''.
2021-12-03 08:53:14,282 DEBG 'runserver' stderr output:
[Fri Dec 03 08:53:14.282239 2021] [wsgi:info] [pid 1731:tid 139813010869312] mod_wsgi (pid=1731): Imported 'mod_wsgi'.
[Fri Dec 03 08:53:14.282288 2021] [wsgi:info] [pid 1731:tid 139813010869312] mod_wsgi (pid=1731, process='localhost:8080', application=''): Loading Python script file '/tmp/cvat-server/handler.wsgi'. |
Definitely yes, if SERVER_IP has changed, you need to restart containers with new configuration, is it possible in your case to use hostname instead of IP? |
I have the same issue. The env variable CVAT_HOST was set to hostname or IP address but this still does not work. 👎🏻 |
What exactly is the http error code in your case? Make sure the output of |
In addition to setting the CVAT_HOST enviroment variable I also needed to modify the docker-compose.yml like so
|
It doesn't matter which internal port traefik is listening on, it is enough to change only the external (host) port for the traefik service as described here. https://openvinotoolkit.github.io/cvat/docs/faq/#how-to-change-default-cvat-hostname-or-port |
I did not get closer to the solution.
If I Host(`<SERVER_IP>`) && PathPrefix(`/api/`, `/git/`, `/opencv/`, `/analytics/`, `/static/`, `/admin`, `/documentation/`, `/django-rq`) And I'm no longer be able to reach the server on localhost, nor from outside, on any listed ports (80, 8080, 8090). If I omit the I also tried what @macimovic mentioned; what it did is that the traefik dashboard came up on all three ports. |
What is the exact http error code you are getting? Please attach output of |
From the server to the server:* Trying <SERVER_IP>:8080...
* connect to <SERVER_IP> port 8080 failed: Connection timed out
* Failed to connect to <SERVER_IP> port 8080: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to <SERVER_IP> port 8080: Connection timed out From server to localhost:$ curl -Lv localhost:8080
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.71.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Mon, 13 Dec 2021 08:51:27 GMT
< Content-Length: 19
<
404 page not found
* Connection #0 to host localhost left intact From another machine to the server:* Trying <SERVER_IP>:8080...
* TCP_NODELAY set
* connect to 10.224.83.26 port 8080 failed: Connection timed out
* Failed to connect to <SERVER_IP> port 8080: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to <SERVER_IP> port 8080: Connection timed out |
@D4nyi |
If anyone is interested, I found a way to access CVAT from any hostname. It is very useful for me because I can now access it with the machine IP, as localhost or even as a tunnel using ngrok. I've modified the traefik rules on the official docker-compose.yml file. |
Sorry for lack of response from our side. There are too many issues opened. I am trying to reduce them now and I will close this issue. Please, if the question is still relevant, let us know and do not hesitate to reopen. Generally, if you want to change default host/port, please try to follow the manual first: https://opencv.github.io/cvat/docs/faq/#how-to-change-default-cvat-hostname-or-port |
@D4nyi |
This solved it. Thanks! |
I messed up the cvat host, and I got 404 page not found. Then I was struggling to reset to default of the cvat host. export CVAT_HOST=localhost did not solve the issue. Luckily, after running curl -Lv localhost:8080, I can not see the login page from chrome. What I did:
|
My actions before raising this issue
Expected Behaviour
I would like to host a CVAT site from a server at my workplace to my colleagues, but I cannot acces it from outside of the machine (only localhost)
Current Behaviour
From outside - using the servers IP address - I only get a "404 page not found" error
I ran through install guide,
Steps to Reproduce (for bugs)
Your Environment
git log -1
):commit 9d21b20845e59863488c4a5bbd049721fe897610 (HEAD -> develop, origin/develop, origin/HEAD)
docker version
(e.g. Docker 17.0.05):Version: 20.10.11
No
Ubuntu Server 20.04.3 LTS
The text was updated successfully, but these errors were encountered: