diskoverdata / diskover-community

Diskover Community Edition - Open source file indexer, file search engine and data management and analytics powered by Elasticsearch
https://diskoverdata.com
Apache License 2.0
1.44k stars 161 forks source link

Can't select an index #101

Closed serkef closed 11 months ago

serkef commented 2 years ago

In the index selection screen, I get a message 4 indices found but I don't see any of them, so I can't pick them.

image

serkef commented 2 years ago

The page in general feels a bit buggy. The purple windows do not disappear when I click X on their top right corner. Also when I click on the gear icon on the top right corner nothing happens.

shirosaidev commented 2 years ago

@serkef please check that you don't have any browser settings/plugins that are blocking cookies/Javascript. Also check browser console for any warnings/errors.

serkef commented 2 years ago

There is no error in the console. image

I also tried this in a second browser (chrome 104.0.5112.101 with all add-ons disabled) and I get the same result.

serkef commented 2 years ago

Tried cleaning up my cookies and browsing data as well as following the other points here https://github.com/diskoverdata/diskover-community/wiki/Diskover-v2-Usage#troubleshoot-diskover-web

/var/log/nginx/error.log doesn't have anything

serkef commented 2 years ago

@shirosaidev any ideas about this?

shirosaidev commented 2 years ago

Check under Chrome inspect in the network tab, are all status 200?

shirosaidev commented 1 year ago

@serkef ?

serkef commented 1 year ago

I will check it again and post here - I'm away of my server atm. Thanks for your answer

serkef commented 1 year ago

@shirosaidev So I don't understand what's happening... now I'm getting a black page. and there's no error in the network tab image

serkef commented 1 year ago

@shirosaidev any idea how to debug this? This makes diskover unusable for me. Indexes are created without issues though.

shirosaidev commented 1 year ago

@serkef what is causing that 302 redirect? Are you using proxy? Have you tried without proxy and direct to nginx web server?

shirosaidev commented 1 year ago

it also looks like none of the .js (javascript) files are being loaded for selectindices.php page. Is there something blocking them?

shirosaidev commented 1 year ago

@serkef ?

serkef commented 1 year ago

no I don't use a proxy, I'm using the docker image from linuxserver. I have turned off all possible blockers.

serkef commented 1 year ago

I try this again on my localhost and it works: image

The same docker-compose on my server doesn't work: image

So I can rule a problem on the browser.

Is there something else that controls accepted hosts maybe?

here's my docker-compose:

version: '2'
services:
  diskover:
    image: lscr.io/linuxserver/diskover
    container_name: diskover
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - ES_HOST=elasticsearch
      - ES_PORT=9200
      - ES_USER=elastic
      - ES_PASS=password
    volumes:
      - ./config/:/config
      - ./data/:/data
    ports:
      - 8080:80
    mem_limit: 4096m
    restart: unless-stopped
    depends_on:
      - elasticsearch
  elasticsearch:
    container_name: elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=true
      - bootstrap.memory_lock=true
      - ELASTIC_PASSWORD=password
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./esdata/:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    depends_on:
      - elasticsearch-helper
    restart: unless-stopped
  elasticsearch-helper:
    image: alpine
    command: sh -c "sysctl -w vm.max_map_count=262144"
    privileged: true
serkef commented 1 year ago

On the sources dev panel, I see js is not loaded at all from my server image

image

What could be a reason for that?

shirosaidev commented 1 year ago

@serkef does the js directory exist on 192.168.178.102? It should be in public/ and have permissions for nginx user to r/x.

itsthejb commented 1 year ago

Hi,

Also having issues, but selecting an index. Haven't used Diskover for a while, just returning to it. It was previous working just fine.

In my case, I have see the index I want to select, but when I tried to select it, I get a 502.

I tried exposing a port and connecting to it directly. Same problem. Copied the cURL request:

curl 'http://100.96.174.86:5800/selectindices.php' \
  -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8' \
  -H 'Accept-Language: en-GB,en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Cookie: PHPSESSID=5sr1ommjvc48ak8kl1p99f43c5; sizefield=size; maxindex=250; newindexnotification=0; rootpath=%2Fdata; parentpath=%2Fdata; path=%2Fdata; sendanondata=1; usecache=1' \
  -H 'Origin: http://100.96.174.86:5800' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://100.96.174.86:5800/selectindices.php?noindex' \
  -H 'Sec-GPC: 1' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
  --data-raw 'indices-table_length=25&index=diskover-main' \
  --compressed \
  --insecure

Response:

<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

Edit: I rolled back to 2.0.7, and it now works ok. Seems to be a 2.1.0 issue

ChristopherHaws commented 1 year ago

I was having issues with this page as well and solved it by adding the following two lines to diskover's nginx config file (specifically config/nginx/site-confs/default.conf):

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

I added these lines to the php location config (location ~ ^(.+\.php)(.*)$)

itsthejb commented 1 year ago

@ChristopherHaws Thanks for that! Just tried it, and yes - it is a workaround

revokin commented 1 year ago

I was having issues with this page as well and solved it by adding the following two lines to diskover's nginx config file (specifically config/nginx/site-confs/default.conf):

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

I added these lines to the php location config (location ~ ^(.+\.php)(.*)$)

Ran into the issue when deploying on Unraid and this fixed the issue. Thanks!

shirosaidev commented 11 months ago

thank you all, closing this