[SOLVED] Thruk doesn't start : 404 page not found.

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Hello,
    I'm trying to use Thruk 1.85 with Shinken 2.03 on my Debian 7.6 virtual machine.
    I've followed the tutorial to install Thruk (with Shinken) but the Thruk UI Webpage is not displayed and when I try to start with the following command :
    root@srvshinken:/# thruk start -v


    Thruk failed starting.
    Here is the log I see on screen :


    [Mon Jul 28 11:36:18 2014][DEBUG] reading secret file: /var/lib/thruk/secret.key
    [Mon Jul 28 11:36:18 2014][DEBUG] _run(): $VAR1 = {
    [Mon Jul 28 11:36:18 2014][DEBUG] 'yes' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'verbose' => 2,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'listbackends' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'remoteurl_specified' => 0,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'local' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'all_inclusive' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'auth' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'backends' => [],
    [Mon Jul 28 11:36:18 2014][DEBUG] 'remoteurl' => 'http://localhost/thruk/cgi-bin/remote.cgi',
    [Mon Jul 28 11:36:18 2014][DEBUG] 'url' => [
    [Mon Jul 28 11:36:18 2014][DEBUG] 'start'
    [Mon Jul 28 11:36:18 2014][DEBUG] ],
    [Mon Jul 28 11:36:18 2014][DEBUG] 'help' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'quiet' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'version' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'force' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'action' => undef,
    [Mon Jul 28 11:36:18 2014][DEBUG] 'credential' => '8dc5c6392122bcf7bdeca37b8371be5b',
    [Mon Jul 28 11:36:18 2014][DEBUG] 'start' => undef
    [Mon Jul 28 11:36:18 2014][DEBUG] };
    [Mon Jul 28 11:36:18 2014][DEBUG] _request(http://localhost/thruk/cgi-bin/remote.cgi)
    [Mon Jul 28 11:36:19 2014][DEBUG] -> success
    [Mon Jul 28 11:36:19 2014][DEBUG] -> $VAR1 = bless( {
    [Mon Jul 28 11:36:19 2014][DEBUG] '_msg' => 'OK',
    [Mon Jul 28 11:36:19 2014][DEBUG] '_content' => '{"rc":1,"output":"request failed: 404 - Page not found\\n"}',
    [Mon Jul 28 11:36:19 2014][DEBUG] '_protocol' => 'HTTP/1.1',
    [Mon Jul 28 11:36:19 2014][DEBUG] '_headers' => bless( {
    [Mon Jul 28 11:36:19 2014][DEBUG] 'connection' => 'close',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'client-response-num' => 1,
    [Mon Jul 28 11:36:19 2014][DEBUG] 'date' => 'Mon, 28 Jul 2014 09:36:18 GMT',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'vary' => 'Accept-Encoding',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'client-peer' => '127.0.0.1:80',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'content-length' => '58',
    [Mon Jul 28 11:36:19 2014][DEBUG] '::std_case' => {
    [Mon Jul 28 11:36:19 2014][DEBUG] 'client-date' => 'Client-Date',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'client-response-num' => 'Client-Response-Num',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'client-peer' => 'Client-Peer'
    [Mon Jul 28 11:36:19 2014][DEBUG] },
    [Mon Jul 28 11:36:19 2014][DEBUG] 'client-date' => 'Mon, 28 Jul 2014 09:36:19 GMT',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'content-type' => 'text/html; charset=utf-8',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'server' => 'Apache/2.2.22 (Debian)'
    [Mon Jul 28 11:36:19 2014][DEBUG] }, 'HTTP::Headers' ),
    [Mon Jul 28 11:36:19 2014][DEBUG] '_rc' => 200,
    [Mon Jul 28 11:36:19 2014][DEBUG] '_request' => bless( {
    [Mon Jul 28 11:36:19 2014][DEBUG] '_content' => 'data=%7B%22options%22%3A%7B%22yes%22%3Anull%2C%22verbose%22%3A2%2C%22listbackends%22%3Anull%2C%22remoteurl_specified%22%3A0%2C%22local%22%3Anull%2C%22all_inclusive%22%3Anull%2C%22auth%22%3Anull%2C%22backends%22%3A%5B%5D%2C%22remoteurl%22%3A%22http%3A%2F%2Flocalhost%2Fthruk%2Fcgi-bin%2Fremote.cgi%22%2C%22url%22%3A%5B%22start%22%5D%2C%22help%22%3Anull%2C%22quiet%22%3Anull%2C%22version%22%3Anull%2C%22force%22%3Anull%2C%22action%22%3Anull%2C%22credential%22%3A%228dc5c6392122bcf7bdeca37b8371be5b%22%2C%22start%22%3Anull%7D%2C%22credential%22%3A%228dc5c6392122bcf7bdeca37b8371be5b%22%7D',
    [Mon Jul 28 11:36:19 2014][DEBUG] '_uri' => bless( do{\(my $o = 'http://localhost/thruk/cgi-bin/remote.cgi')}, 'URI::http' ),
    [Mon Jul 28 11:36:19 2014][DEBUG] '_headers' => bless( {
    [Mon Jul 28 11:36:19 2014][DEBUG] 'user-agent' => 'thruk_cli',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'content-type' => 'application/x-www-form-urlencoded',
    [Mon Jul 28 11:36:19 2014][DEBUG] 'content-length' => 585
    [Mon Jul 28 11:36:19 2014][DEBUG] }, 'HTTP::Headers' ),
    [Mon Jul 28 11:36:19 2014][DEBUG] '_method' => 'POST',
    [Mon Jul 28 11:36:19 2014][DEBUG] '_uri_canonical' => $VAR1->{'_request'}{'_uri'}
    [Mon Jul 28 11:36:19 2014][DEBUG] }, 'HTTP::Request' )
    [Mon Jul 28 11:36:19 2014][DEBUG] }, 'HTTP::Response' );
    [Mon Jul 28 11:36:19 2014][DEBUG] -> $VAR1 = {
    [Mon Jul 28 11:36:19 2014][DEBUG] 'rc' => 1,
    [Mon Jul 28 11:36:19 2014][DEBUG] 'output' => 'request failed: 404 - Page not found
    [Mon Jul 28 11:36:19 2014][DEBUG] '
    [Mon Jul 28 11:36:19 2014][DEBUG] };
    request failed: 404 - Page not found

    The post was edited 2 times, last by Tera-Two ().

  • Many thanks for your answers !
    Yes, of course, i've got a thruk.conf in /etc/apache2/conf.d, here it is :


    And here is my apache2.conf


    I also did a

    Code
    1. shinken@srvshinken:/root$ sudo service apache2 restart
    2. [ ok ] Restarting web server: apache2 ... waiting ....
  • I've just cleared apache2 logs and restarted it and I have :


    Code
    1. root@srvshinken:/var/log/apache2# tail error.log
    2. [Tue Jul 29 15:36:08 2014] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 configured -- resuming normal operations
    3. root@srvshinken:/var/log/apache2#


    Should I suppose fcgi is OK ?

  • I think you are near the solution...
    I tried to access from my PC to


    http://192.168.100.45/thruk -> 404 not found
    http://192.168.100.45:50000 -> Invalid GET request, no such table'/HTTP/1.1'
    http://192.168.100.45/thruk:50000 -> 404 not found


    But now, when I tail apache error.log, I see :
    [Tue Jul 29 16:57:10 2014] [error] [client 192.168.100.2] File does not exist: /var/www/thruk
    [Tue Jul 29 16:57:17 2014] [error] [client 192.168.100.2] File does not exist: /var/www/thruk:50000


    Perhaps another useful information : to link Thruk with Shinken I use the livestatus module which is configured this way :

  • Thanks for the time you give me...
    Thus, results are not good...


    http://192.168.100.45/thruk/ gives an Internal server error...


    and apache error log gives a big fail...


    Code
    1. [Tue Jul 29 18:10:57 2014] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 configured -- resuming normal operations
    2. please specify a logger object when using verbose mode at lib/Monitoring/Livestatus/Class/Lite.pm line 89
    3. BEGIN failed--compilation aborted at /usr/share/thruk/script/thruk_fastcgi.pl line 17.
    4. [Tue Jul 29 18:11:32 2014] [warn] [client 192.168.100.2] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
    5. [Tue Jul 29 18:11:32 2014] [error] [client 192.168.100.2] Premature end of script headers: fcgid_env.sh


    Really sorry...

  • Thanks again for your answer.


    Do not remember having changed something in files except thruk_local.conf but...
    perhaps in owners or rights on files. Ouuuups...
    Do you think something's wrong in permission on theses files ?

  • You are THE BEST !
    You did a good job.
    Now, it works !
    But I don't really know why...
    It was difficult for me to uninstall completely Thruk before re-installing it.
    Finally it has been completely uninstalled by "Gestionnaire de paquets Synaptic"
    And Then I reinstall it using "Installeur de paquets GDebi"
    I found those tools in the Gnome GUI...


    The only thing I did another way is :
    I did not modifiy the thruk_local.conf in a text editor (shinken user do not have rights on it).
    So I configure the backend at the first access of Thruk Webui.
    I'm very new to monitoring, and Linux is very new for me.
    I will be glad to help you on evrything on Windows, up to Windows 2012, active directory...
    I still have a lot of job to monitor my IT but it's so exiting.
    Thanks again !