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

Analytics feature doesn't work by default (closed 5000, 5601 ports) #522

Closed
nmanovic opened this issue Jun 26, 2019 · 31 comments
Closed

Analytics feature doesn't work by default (closed 5000, 5601 ports) #522

nmanovic opened this issue Jun 26, 2019 · 31 comments
Assignees
Labels
bug Something isn't working

Comments

@nmanovic
Copy link
Contributor

Some users complained that it is necessary to open a couple of ports to work with analytics component. At the same time it should work without opening extra ports. At list our internal server doesn't open any ports and the feature works fine. Need to investigate and fix.

Aaron N. Brock @AaronNBrock 11:34
Hey, how do I access the kibana dashboard? Port 5000 doesn't seem to be open? Do I need another docker-compose.override.yml?

Bill Heffelfinger @HeffRaleigh 13:55
@nmanovic Thanks Nikita!
Hey, how do I access the kibana dashboard? Port 5000 doesn't seem to be open? Do I need another docker-compose.override.yml?
I had to open port 9200. Worked fine when I did that.

Bill Heffelfinger @HeffRaleigh 14:52
Hey, how do I access the kibana dashboard? Port 5000 doesn't seem to be open? Do I need another docker-compose.override.yml?
I had to open port 9200. Worked fine when I did that.
Also...had to open 5601 in another install I'm helping with.

Nikita Manovich @nmanovic 15:24
@AaronNBrock , @HeffRaleigh , you don't need to open additional ports. In dashboard you should have a button for analytics. Use it to open kibana app. https://github.com/opencv/cvat/tree/develop/components/analytics
 

Bill Heffelfinger @HeffRaleigh 15:38
@AaronNBrock , @HeffRaleigh , you don't need to open additional ports. In dashboard you should have a button for analytics. Use it to open kibana app. https://github.com/opencv/cvat/tree/develop/components/analytics
@nmanovic True that Analytics button will be present, but data will not load without errors until you open ports. Happy to take this off-thread and hop on a video conference to demonstrate if you like.

Nikita Manovich @nmanovic 15:44
@HeffRaleigh , it is quite interesting. I have checked on our internal server and we don't open 5601 and 9200 ports. It works in our case. Could somebody post here errors which you can see when ports are closed.

Bill Heffelfinger @HeffRaleigh 15:49

Nothing loads after a long time for Kibana to start up.
This is when 5000 and 5601 aren't open.
Also...this is CVAT on EC2 Linux. Could have something to do with it.
When 9200 isn't open Kibana complains about not being able to access the service from what I recall. When I have time, I'll close 9200, start Kibana, and grab the error message.

Bill Heffelfinger @HeffRaleigh 16:09
Error when 9200 is shut down:
plugin:elasticsearch@6.4.0 Unable to connect to Elasticsearch at http://elasticsearch:9200/.
@nmanovic nmanovic added the bug Something isn't working label Jun 26, 2019
@nmanovic nmanovic added this to the 0.5.0 - Beta milestone Jun 26, 2019
@nmanovic nmanovic self-assigned this Jun 26, 2019
@HeffRaleigh
Copy link

Adding some color to the above thread.

I had no issues running Analytics up to the point where I went on PTO on 14 June. I shut down my dev server at that point - which was a t2-medium EC2 instance running Ubunutu 16.0.4.

When I returned to work on 20 June and started my EC2 instance it came up fine but when I went to start CVAT with Analytics, I got an insufficient memory error. This should have been my first indicator that something had changed with CVAT. I didn't address it and instead changed my EC2 instance to a t2-large. CVAT with Analytics started just fine.

While working with a client that is using CVAT, we had problems getting Kibana to run. I tried opening port 9200. No luck. We then opened ports 5000 and 5601. Analytics started working for them.

I saw the post to Gitter from another community member about Analytics not working for them which started me down this path.

To test, I removed my inbound port rules for ports 9200, 5601 and 5000. Ran Kibana which opened but couldn't find any data (see screen shot shared previously). I added port 9200. Same result. I added ports 5000 and 5601. Interestingly, Kibana started and data was present but I had a port 9200 error message - even though it was open to inbound traffic. I removed it and added it back. Now Kibana was back to reporting it couldn't find any data. Tried a server reboot. No difference. This is when Nikita filed the bug.

Let me know what I can do to help troubleshoot. I love Kibana and would like to get it back to a stable state.

@HeffRaleigh
Copy link

Quick update....I made a copy of an AMI I made of my CVAT with Analytics VM prior to leaving for PTO and launched it. When I started CVAT on that image, it started fine and Analytics, when I clicked on it, started up but I'm still getting this message plugin:elasticsearch@6.4.0 | Unable to connect to Elasticsearch at http://elasticsearch:9200/.

I refreshed Kibana and now I'm not getting any data. Same behavior as in the original VM post PTO.

Hope this helps!

@azhavoro
Copy link
Contributor

@HeffRaleigh Could you please post a output from docker info and docker-compose -f <YOUR SET> config commands?

@HeffRaleigh
Copy link

Another update. One of the clients I work with that uses CVAT is also experiencing this same behavior with Kibana.

Do we have an ETA on the bug fix?

@nmanovic
Copy link
Contributor Author

First of all we need to reproduce the issue on our side. I will run a clean version of CVAT and see what is going on. If you can help here it will be awesome.

@HeffRaleigh
Copy link

Docker Info:

Containers: 13
 Running: 6
 Paused: 0
 Stopped: 7
Images: 166
Server Version: 18.09.5
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-1085-aws
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.858GiB
Name: ip-172-31-39-116
ID: WKYR:ORBA:7KEV:MED2:5F5B:JLSV:EG5O:7QU7:VHCH:AJ55:YJUX:I3UJ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: heffelw
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No swap limit support

@HeffRaleigh
Copy link

@HeffRaleigh Could you please post a output from docker info and docker-compose -f <YOUR SET> config commands?

@nmanovic What do you mean by <YOUR SET>

@HeffRaleigh
Copy link

As an aside...the client I'm working with is running an EC2 instance that is Ubuntu 18.0.4.

@azhavoro
Copy link
Contributor

@HeffRaleigh Could you please post a output from docker info and docker-compose -f <YOUR SET> config commands?

@nmanovic What do you mean by <YOUR SET>

I mean the set of docker-compose files used to build CVAT, for example docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml config

@HeffRaleigh
Copy link

@HeffRaleigh Could you please post a output from docker info and docker-compose -f <YOUR SET> config commands?

@nmanovic What do you mean by <YOUR SET>

I mean the set of docker-compose files used to build CVAT, for example docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml config

Got it. Heading off to grab that now. Thx!

@HeffRaleigh
Copy link

Here you go. Output from docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml -f docker-compose.override.yml config:

WARNING: The no_proxy variable is not set. Defaulting to a blank string.
WARNING: The https_proxy variable is not set. Defaulting to a blank string.
WARNING: The http_proxy variable is not set. Defaulting to a blank string.
services:
  cvat:
    build:
      args:
        DJANGO_CONFIGURATION: production
        TF_ANNOTATION: "no"
        USER: django
        WITH_TESTS: "no"
        http_proxy: ''
        https_proxy: ''
        no_proxy: ''
        socks_proxy: ''
      context: /home/cvat
    container_name: cvat
    depends_on:
      cvat_db:
        condition: service_started
      cvat_redis:
        condition: service_started
    environment:
      ALLOWED_HOSTS: .amazonaws.com
      CVAT_SHARE_URL: Mounted from /mys3bucket
      DJANGO_LOG_SERVER_HOST: logstash
      DJANGO_LOG_SERVER_PORT: 5000
      DJANGO_LOG_VIEWER_HOST: kibana
      DJANGO_LOG_VIEWER_PORT: 5601
      DJANGO_MODWSGI_EXTRA_ARGS: ''
      no_proxy: kibana,logstash,
    image: cvat
    ports:
    - 8080:8080/tcp
    - 80:8080/tcp
    restart: always
    volumes:
    - cvat_data:/home/django/data:rw
    - cvat_keys:/home/django/keys:rw
    - cvat_logs:/home/django/logs:rw
    - cvat_models:/home/django/models:rw
    - cvat_share:/home/django/share:rw
  cvat_db:
    container_name: cvat_db
    environment:
      POSTGRES_DB: cvat
      POSTGRES_USER: root
    image: postgres:10.3-alpine
    networks:
      default:
        aliases:
        - db
    restart: always
    volumes:
    - cvat_db:/var/lib/postgresql/data:rw
  cvat_elasticsearch:
    build:
      args:
        ELK_VERSION: 6.4.0
      context: /home/cvat/components/analytics/elasticsearch
    container_name: cvat_elasticsearch
    image: cvat_elasticsearch
    networks:
      default:
        aliases:
        - elasticsearch
    restart: always
    volumes:
    - cvat_events:/usr/share/elasticsearch/data:rw
  cvat_kibana:
    build:
      args:
        ELK_VERSION: 6.4.0
      context: /home/cvat/components/analytics/kibana
    container_name: cvat_kibana
    depends_on:
      cvat_elasticsearch:
        condition: service_started
    image: cvat_kibana
    networks:
      default:
        aliases:
        - kibana
    restart: always
  cvat_kibana_setup:
    container_name: cvat_kibana_setup
    depends_on:
      cvat:
        condition: service_started
    entrypoint:
    - bash
    - wait-for-it.sh
    - elasticsearch:9200
    - -t
    - '0'
    - --
    - /bin/bash
    - wait-for-it.sh
    - kibana:5601
    - -t
    - '0'
    - --
    - /usr/bin/python3
    - kibana/setup.py
    - kibana/export.json
    environment:
      no_proxy: elasticsearch,kibana,
    image: cvat
    volumes:
    - /home/cvat/components/analytics/kibana:/home/django/kibana:ro
    working_dir: /home/django
  cvat_logstash:
    build:
      args:
        ELK_VERSION: 6.4.0
        http_proxy: ''
        https_proxy: ''
      context: /home/cvat/components/analytics/logstash
    container_name: cvat_logstash
    depends_on:
      cvat_elasticsearch:
        condition: service_started
    image: cvat_logstash
    networks:
      default:
        aliases:
        - logstash
    restart: always
  cvat_redis:
    container_name: cvat_redis
    image: redis:4.0.5-alpine
    networks:
      default:
        aliases:
        - redis
    restart: always
version: '2.3'
volumes:
  cvat_data: {}
  cvat_db: {}
  cvat_events: {}
  cvat_keys: {}
  cvat_logs: {}
  cvat_models: {}
  cvat_share:
    driver_opts:
      device: /mys3bucket
      o: bind
      type: none

@azhavoro
Copy link
Contributor

Thanks!

@HeffRaleigh
Copy link

HeffRaleigh commented Jun 27, 2019

You're welcome. I noticed yesterday but didn't mention that I now know why 9200 had to be opened for my initial Kibana install to work - elasticsearch needed it for some reason.

Let me know if you want me to share my AMI with you. Happy to make a copy and share it with your AWS account if you're willing to share your AWS account number with me.

@HeffRaleigh
Copy link

Hello all! Any progress with this bug? Thanks!

@HeffRaleigh
Copy link

Hello @nmanovic ! Any progress on fixing this bug? Thanks!

@nmanovic
Copy link
Contributor Author

nmanovic commented Jul 9, 2019

@HeffRaleigh , no progress so far. Our team is overloaded at the moment. Need help here for sure.

@HeffRaleigh
Copy link

Thanks for the update @nmanovic

Success is good. CVAT has made a big difference. I hope you get some additional help soon! I'm trying to do my part in helping on the forum. Hope that isn't hurting more than it is helping.

@HeffRaleigh
Copy link

HeffRaleigh commented Aug 7, 2019

@nmanovic Hello Nikita! I've been away from CVAT for a while working with commercial tooling partners. I'm back!

I just did a clean install of CVAT on EC2/Ubuntu 16.0.4 to see if I could figure out if the S3 mount was causing an issue. So...out of the box without the S3 mount, Kibana is still hosed.

Screen Shot 2019-08-07 at 11 56 46 AM

I saw the above image and thought it might mean something.

What dirs does Kibana use? Might be some permission setting that needs to be addressed.

Also...I don't have ports open other than 80:8080. Not getting port error messages, which is different than last time.

@nmanovic nmanovic modified the milestones: 0.5.0 - Release, 1.0.0 - Beta Sep 9, 2019
@nmanovic nmanovic removed this from the 1.0.0 - Beta milestone Nov 26, 2019
@nmanovic nmanovic added this to the 1.0.0 - Release milestone Nov 26, 2019
@nmanovic nmanovic modified the milestones: 1.0.0-release, 1.1.0-beta May 23, 2020
@nmanovic nmanovic modified the milestones: 1.1.0-beta, 1.1.0-release Jul 29, 2020
@fbrokanlou
Copy link

fbrokanlou commented Mar 22, 2021

@nmanovic the problem still exists with cvat 1.2. Even after fresh install (following the instructions at https://github.com/openvinotoolkit/cvat/blob/develop/components/analytics/README.md) Kibana still shows nothing at all. No tasks, no users ,.... It says "No results found".
In Kibana in Discover page, it shows all fields as "missing fields", as I can only see fields (like task, event, id, ...) after disabling " Hide missing fields" checkbox.
Accessing the monitoring and management dashboards result in: "Error in visualization, aggs is undefined"

root@srv-1:/cvat# docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml ps                                                                                                   
       Name                     Command               State                        Ports                                                                                                                          
-------------------------------------------------------------------------------------------------------------                                                                                                     
cvat                 /usr/bin/supervisord             Up       8080/tcp                                                                                                                                           
cvat_db              docker-entrypoint.sh postgres    Up       5432/tcp                                                                                                                                           
cvat_elasticsearch   /usr/local/bin/docker-entr ...   Up       0.0.0.0:9200->9200/tcp, 9300/tcp                                                                                                                   
cvat_kibana          /usr/local/bin/kibana-docker     Up       0.0.0.0:5000->5000/tcp, 0.0.0.0:5601->5601/tcp                                                                                                     
cvat_kibana_setup    bash wait-for-it.sh elasti ...   Exit 1                                                                                                                                                      
cvat_logstash        /usr/local/bin/docker-entr ...   Up       5044/tcp, 8080/tcp, 9600/tcp                                                                                                                       
cvat_proxy           /docker-entrypoint.sh /bin ...   Up       0.0.0.0:8080->80/tcp                                                                                                                               
cvat_redis           docker-entrypoint.sh redis ...   Up       6379/tcp                                                                                                                                           
cvat_ui              /docker-entrypoint.sh ngin ...   Up       80/tcp 

@azhavoro
Copy link
Contributor

@fbrokanlou
I suppose there is cause of your issue:
cvat_kibana_setup bash wait-for-it.sh elasti ... Exit 1

Please attach logs from this container docker logs cvat_kibana_setup > logs.txt

@AntonioKichaev
Copy link

AntonioKichaev commented Mar 24, 2021

i have the same problem
cvat_kibana_setup ... Exit 1
logs is

wait-for-it.sh: waiting for elasticsearch:9200 without a timeout
wait-for-it.sh: elasticsearch:9200 is available after 0 seconds
wait-for-it.sh: waiting for kibana:5601 without a timeout
wait-for-it.sh: kibana:5601 is available after 0 seconds
Updating dashboard named 7e8996e0-c23d-11e8-8e1b-758ef07f6de8
Updating visualization named d92524b0-c25c-11e8-8e1b-758ef07f6de8
Updating search named 9397f350-c23e-11e8-8e1b-758ef07f6de8
Updating visualization named 3ade53d0-c23e-11e8-8e1b-758ef07f6de8
Updating visualization named 1ec6a660-c244-11e8-8e1b-758ef07f6de8
Updating index-pattern named ec510550-c238-11e8-8e1b-758ef07f6de8
Updating visualization named 65918380-c244-11e8-8e1b-758ef07f6de8
Updating visualization named 543f6260-c25c-11e8-8e1b-758ef07f6de8
Updating visualization named 31ac2d60-c25b-11e8-8e1b-758ef07f6de8
Updating visualization named 7f637200-d068-11e8-9320-a3c87be2b433
Updating dashboard named 22250a40-c25d-11e8-8e1b-758ef07f6de8

i ran with command
docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml up -d from develop branch e41c301

@AntonioKichaev
Copy link

which version is stable in which the analytics works? can you give me commit?

@azhavoro
Copy link
Contributor

@antonioomsk I don't see any errors in your log and it looks ok. d33daa1669925c42c789cf4b786fa9c4453337cb works for our instances

@AntonioKichaev
Copy link

AntonioKichaev commented Mar 25, 2021

ok, i tested this commit, next command ran

docker-compose -f docker-compose.yml  -f .\components\analytics\docker-compose.analytics.yml down
docker-compose -f docker-compose.yml  -f .\components\analytics\docker-compose.analytics.yml up -d

cvat_kibana_stup container exited 0 logs looks ok as logs up.
image
but i didn't see any results
image

docke ps looks ok

docker ps
CONTAINER ID   IMAGE                  COMMAND                  CREATED             STATUS             PORTS                          NAMES
f5c51c5ec161   nginx:stable-alpine    "/docker-entrypoint.…"   About an hour ago   Up About an hour   0.0.0.0:8080->80/tcp           cvat_proxy
7938398a960b   openvino/cvat_ui       "/docker-entrypoint.…"   About an hour ago   Up About an hour   80/tcp                         cvat_ui7d84eb50d850   openvino/cvat_server   "/usr/bin/supervisord"   About an hour ago   Up About an hour   8080/tcp                       cvat
e7382d9af061   cvat_logstash          "/usr/local/bin/dock…"   About an hour ago   Up About an hour   5044/tcp, 8080/tcp, 9600/tcp   cvat_logstash
94c2bff1bbef   cvat_kibana            "/usr/local/bin/kiba…"   About an hour ago   Up About an hour   5601/tcp                       cvat_kibana
7a1d3d07d575   redis:4.0-alpine       "docker-entrypoint.s…"   About an hour ago   Up About an hour   6379/tcp                       cvat_redis
44105221ffa2   postgres:10-alpine     "docker-entrypoint.s…"   About an hour ago   Up About an hour   5432/tcp                       cvat_dbd6e066a5c178   cvat_elasticsearch     "/usr/local/bin/dock…"   About an hour ago   Up About an hour   9200/tcp, 9300/tcp             cvat_elasticsearch

@azhavoro
Copy link
Contributor

@antonioomsk I'll check on the clear Ubuntu

@AntonioKichaev
Copy link

@azhavoro i rebuilded last release 1.3
added build config in docker-compose because docker hub didn't find new version
docker-compose.yaml

  cvat:
    container_name: cvat
    image: openvino/cvat_server
    restart: always
    depends_on:
      - cvat_redis
      - cvat_db
    build:
        context: .
        args:
          http_proxy:
          https_proxy:
          no_proxy: nuclio,${no_proxy}
          socks_proxy:
          USER: 'django'
          DJANGO_CONFIGURATION: 'production'
          TZ: 'Etc/UTC'
          CLAM_AV: 'no'  

them i checked analitycs , and i saw metrics
look like
image
i think problem was localy, i didn't know wich kind problem.
Can you push docker image in docker hub release 1.3 ?

@omersefaozturk
Copy link

omersefaozturk commented May 7, 2021

@azhavoro I cant open kibana page. How can ı solve this problem?

The webpage at http://*****:5601/ might be temporarily down or it may have moved permanently to a new web address.

Screenshot from 2021-05-07 09-47-49

@azhavoro
Copy link
Contributor

azhavoro commented May 7, 2021

@azhavoro I cant open kibana page. How can ı solve this problem?

The webpage at http://*****:5601/ might be temporarily down or it may have moved permanently to a new web address.

Screenshot from 2021-05-07 09-47-49

@arcibiyo https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/documentation/user_guide.md#analytics

@omersefaozturk
Copy link

@azhavoro thanks :)

@victor-yudin
Copy link

Hi,

I have a similar problem.

After cvat upgrading to version 1.2 analytics doesn't work correctly.
Events that happened after the upgrading aren't displayed

What I tried to do:

  1. fixing of cvat_libana_setup configuration Fixed kibana startup initialization and documentation #2659 and then rebuilding
  2. upgrading to 1.3 and develop versions (2021-04-29)

When I deployed CVAT 1.3 on the other host, this problem isn't appear.

Link to the logs and error screenshots:
https://drive.google.com/drive/folders/1SDDRHJpO1Rnvj4H_xjvRTIwr5v2RBNdf?usp=sharing

@nmanovic
Copy link
Contributor Author

I don't see complains about analytics for a long time. I will close the issue as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants