shirosaidev/diskover-web

Problem when opening the tool

theman480 opened this issue · 8 comments

I changed the Host on Constants.php with my server ip then I start the application with PHP -S ip:8000 and I'm getting the following error:

[Wed Sep  4 14:13:30 2019] PHP Fatal error:  Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51
Stack trace:
#0 /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(72): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection()
#1 /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(90): Elasticsearch\Transport->getConnection()
#2 /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(256): Elasticsearch\Transport->performRequest('HEAD', '/', Array, NULL, Array)
#3 /home/tito/Downloads/diskover-web/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array)
#4 /home/tito/Downloads/diskover-web/vendor/guzzlehttp/ringphp/src/Fu in /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51
[Wed Sep  4 14:13:30 2019] 189.73.67.165:48042 [500]: / - Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51
Stack trace:
#0 /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(72): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection()
#1 /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(90): Elasticsearch\Transport->getConnection()
#2 /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(256): Elasticsearch\Transport->performRequest('HEAD', '/', Array, NULL, Array)
#3 /home/tito/Downloads/diskover-web/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array)
#4 /home/tito/Downloads/diskover-web/vendor/guzzlehttp/ringphp/src/Fu in /home/tito/Downloads/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51

Anyone can help me?

Anyone?

Is Elasticsearch server running and set correctly to hostname/ip for ES_HOST in Constants.php ? Try checking your es host with http://<eshost>:9200/

Is Elasticsearch server running and set correctly to hostname/ip for ES_HOST in Constants.php ? Try checking your es host with http://<eshost>:9200/

Yes everything is ok with the Constants.php, the funny thing is the first time i started this was working then I edit the Constants.php to add login details and I'm getting this error now, I already tried to reinstall with composer, I tried with the default Constants.php with only my dedicated server ip changed on "ESHOST" but I keep getting this error:

[Sat Sep 14 17:19:59 2019] PHP Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51 Stack trace: #0 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(72): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(90): Elasticsearch\Transport->getConnection() #2 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(256): Elasticsearch\Transport->performRequest('HEAD', '/', Array, NULL, Array) #3 /srv/diskover-web/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array) #4 /srv/diskover-web/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, N in /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51

What does your Constants.php look like? If you open a web browser and go to http://<eshost>:9200/ does it work?

What does your Constants.php look like? If you open a web browser and go to http://<eshost>:9200/ does it work?

With 9200 port I have the same error:

PHP Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51 Stack trace: #0 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(72): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(90): Elasticsearch\Transport->getConnection() #2 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(256): Elasticsearch\Transport->performRequest('HEAD', '/', Array, NULL, Array) #3 /srv/diskover-web/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array) #4 /srv/diskover-web/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, N in /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51 [Wed Sep 18 20:49:15 2019] 200.101.213.153:58296 [500]: / - Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51 Stack trace: #0 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(72): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(90): Elasticsearch\Transport->getConnection() #2 /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(256): Elasticsearch\Transport->performRequest('HEAD', '/', Array, NULL, Array) #3 /srv/diskover-web/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array) #4 /srv/diskover-web/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, N in /srv/diskover-web/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51

Constants.php file:

<?php
/*
Copyright (C) Chris Park 2017
diskover is released under the Apache 2.0 license. See
LICENSE for the full license text.
 */

namespace diskover;

class Constants {
    // set to your Elasticsearch host or ip, if you are using AWS set to your endpoint without http:// or https://
    const ES_HOST = 'MyServerIP';
    // set to your Elasticsearch port, default 9200, if you are using AWS set to 443 or 80
    const ES_PORT = 9200;
    // set to TRUE if using AWS ES
    const AWS = FALSE;
    // set to TRUE if using AWS ES and HTTPS, FALSE FOR HTTP
    const AWS_HTTPS = FALSE;
    // set following two lines if using X-Pack http-auth
    const ES_USER = '';
    const ES_PASS = '';
    // login auth for diskover-web
    const LOGIN_REQUIRED = FALSE;
    const DISKOVER_USER = 'diskover';
    const DISKOVER_PASS = 'darkdata';
    // diskover.py socket listener server
    const ENABLE_SOCKET_CLIENT = FALSE;
    const SOCKET_LISTENER_HOST = '127.0.0.1';
    const SOCKET_LISTENER_PORT = 9999;
    // default min file size (bytes) filter
    const FILTER = 1;
    // default mtime filter
    const MTIME = 0;
    // default maxdepth filter
    const MAXDEPTH = 2;
    // default don't use count (use size)
    const USE_COUNT = 0;
    // default show files on analytics pages
    const SHOW_FILES = 1;
    // default hide threshhold filter
    const HIDE_THRESH = 0.9;
    // default results per search page
    const SEARCH_RESULTS = 50;
}

Anyone, please?

Hello @theman480 . Are you sure that your elasticsearch cluster is up and running?
can you please paste the result of the following command:

curl MyServerIP:9200

@theman480 did you get it working?