1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help in Kibana : not able to open kibana in browser

Discussion in 'Install Logstash and Kibana on a Windows server.' started by Lokesh Saini, Dec 10, 2015.

  1. Lokesh Saini

    Lokesh Saini New Member Member

    Hi ,

    When I start the Kibana service a message displays "HTTP Error 404.0 - Not Found" .

    I have attached two screen shot's.

    In second Second Screen shot i have created "loghost-saini1" web site.
    when i am trying to execute this web site in browser that time i am getting "HTTP Error 404.0 - Not Found" error.

    Please have a look into this and help me to fix it.

    Thanks,
    Lokesh
     

    Attached Files:

    Last edited: Dec 10, 2015
  2. sbagmeijer

    sbagmeijer Machine

    Which guide did you follow because it looks like you did not setup a reverse proxy?
     
  3. Lokesh Saini

    Lokesh Saini New Member Member

  4. sbagmeijer

    sbagmeijer Machine

    In that guide it looks like something did go wrong with "Step 10" I would suggest to redo that step.
     
  5. Lokesh Saini

    Lokesh Saini New Member Member

    I tried 3/4 time's but i am getting same error.
     
  6. Lokesh Saini

    Lokesh Saini New Member Member

    Hi,

    I have removed all the created website except default site. When I went to http://localhost/ I am "
    HTTP Error 502.3 - Bad Gateway A connection with the server could not be established". error.

    And I looked into nxlog.log files here i am getting below error "2015-12-11 17:10:24 ERROR couldn't connect to tcp socket on 127.0.0.1:5601; No connection could be made because the target machine actively refused it".

    All the windows service are running. below are the details of files:

    1). ** nxlog.conf **

    ## This is a sample configuration file. See the nxlog reference manual about the
    ## configuration options. It should be installed locally and is also available
    ## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html

    ## Please set the ROOT to the folder your nxlog was installed into,
    ## otherwise it will not start.

    #define ROOT C:\Program Files\nxlog
    define ROOT C:\Program Files (x86)\nxlog

    Moduledir %ROOT%\modules
    CacheDir %ROOT%\data
    Pidfile %ROOT%\data\nxlog.pid
    SpoolDir %ROOT%\data
    LogFile %ROOT%\data\nxlog.log

    <Extension json>
    Module xm_json
    </Extension>
    <Input iis_lokesh>
    Module im_file
    File "C:\inetpub\logs\LogFiles\W3SVC1\u_ex*.log"
    ReadFromLast True
    SavePos True
    Exec if $raw_event =~ /^#/ drop();
    </Input>
    <Output out_lokesh>
    Module om_tcp
    Host 127.0.0.1
    Port 5544
    OutputType LineBased
    </Output>

    <Route IIS>
    Path iis_lokesh => out_lokesh
    </Route>

    2)** nxlog.log ** Error
    015-12-11 17:17:06 INFO reconnecting in 200 seconds
    2015-12-11 17:17:06 ERROR couldn't connect to tcp socket on 127.0.0.1:5601; No connection could be made because the target machine actively refused it.

    3. ** logstash.conf **)

    input {
    tcp {
    port => 5544
    }
    }

    output {
    elasticsearch {
    hosts => ["localhost:9200"]
    protocol => "http"
    }
    }

    4. kibana.yml)

    # Kibana is served by a back end server. This controls which port to use.
    server.port: 5601

    # The host to bind the server to.
    server.host: "0.0.0.0"

    # The Elasticsearch instance to use for all your queries.
    # elasticsearch.url: "http://localhost:9200"

    # preserve_elasticsearch_host true will send the hostname specified in `elasticsearch`. If you set it to false,
    # then the host you use to connect to *this* Kibana instance will be sent.
    # elasticsearch.preserveHost: true

    # Kibana uses an index in Elasticsearch to store saved searches, visualizations
    # and dashboards. It will create a new index if it doesn't already exist.
    # kibana.index: ".kibana"

    # The default application to load.
    # kibana.defaultAppId: "discover"

    # If your Elasticsearch is protected with basic auth, this is the user credentials
    # used by the Kibana server to perform maintenance on the kibana_index at startup. Your Kibana
    # users will still need to authenticate with Elasticsearch (which is proxied through
    # the Kibana server)
    # elasticsearch.username: user
    # elasticsearch.password: pass

    # SSL for outgoing requests from the Kibana Server to the browser (PEM formatted)
    # server.ssl.cert: /path/to/your/server.crt
    # server.ssl.key: /path/to/your/server.key

    # Optional setting to validate that your Elasticsearch backend uses the same key files (PEM formatted)
    # elasticsearch.ssl.cert: /path/to/your/client.crt
    # elasticsearch.ssl.key: /path/to/your/client.key

    # If you need to provide a CA certificate for your Elasticsearch instance, put
    # the path of the pem file here.
    # elasticsearch.ssl.ca: /path/to/your/CA.pem

    # Set to false to have a complete disregard for the validity of the SSL
    # certificate.
    # elasticsearch.ssl.verify: false

    # Time in milliseconds to wait for elasticsearch to respond to pings, defaults to
    # request_timeout setting
    elasticsearch.pingTimeout: 1500

    # Time in milliseconds to wait for responses from the back end or elasticsearch.
    # This must be > 0
    elasticsearch.requestTimeout: 300000

    # Time in milliseconds for Elasticsearch to wait for responses from shards.
    # Set to 0 to disable.
    # elasticsearch.shardTimeout: 0

    # Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying
    elasticsearch.startupTimeout: 5000

    # Set the path to where you would like the process id file to be created.
    pid.file: /var/run/kibana.pid

    # If you would like to send the log output to a file you can set the path below.
    logging.dest: stdout

    # Set this to true to suppress all logging output.
    logging.silent: false

    # Set this to true to suppress all logging output except for error messages.
    # logging.quiet: false

    # Set this to true to log all events, including system usage information and all requests.
    logging.verbose: false

    # Plugins that are included in the build, and no longer found in the plugins/ folder
    bundled_plugin_ids:
    - plugins/dashboard/index
    - plugins/discover/index
    - plugins/doc/index
    - plugins/kibana/index
    - plugins/markdown_vis/index
    - plugins/metric_vis/index
    - plugins/settings/index
    - plugins/table_vis/index
    - plugins/vis_types/index
    - plugins/visualize/index

    Please help us to remove this error.

    Thanks,
    Lokesh
     

    Attached Files:

  7. sbagmeijer

    sbagmeijer Machine

    Okay this error does say:
    2015-12-11 17:17:06 ERROR couldn't connect to tcp socket on 127.0.0.1:5601; No connection could be made because the target machine actively refused it.

    If you browse to : 127.0.0.1:5601 do you see your Kibana page? if not it means Kibana did not start.
     
  8. Lokesh Saini

    Lokesh Saini New Member Member

    Hi,

    Yes, I am not able to open Kibana page in my web browser.

    Earlier i was able to seen Kibana page in my browser, later i have deleted kibana and logstash service through command "sc delete logstash/kibana" and re-installed logstash and kibana service. and I have followed the steps in the article
    https://www.ulyaoth.net/resources/tutorial-install-logstash-and-kibana-on-a-windows-server.34/. after that i am not able to load Kibana page on my Browser.

    I am new in this technology, Could you please help me whats going wrong in that and how can I bring up Kibana?

    Thanks,
    Lokesh
     
  9. sbagmeijer

    sbagmeijer Machine

    If you followed all my steps then try run from a admin command prompt: services.msc

    And then search "kibana" in the lists of services and try to start it, if you cannot find it then you have to redo the steps of the guide concerning kibana.
     
  10. Lokesh Saini

    Lokesh Saini New Member Member

    1.) After running Kibana.bat file from/bin , Kibana is up and i am able to open in Browser.

    But when I opened http://localhost:5601 , kibana service is opening in browser like attached image.

    But when I tryed to click on "setting" link thenI am not able to seen indices,Advanced.. etc link.

    2.) When i am trying run logstash from /bin , then i am getting below error:

    Can not locate java installation , specified by JAVA_HOME.
    I have already set the JAVA_HOME path.

    Please have look into this and let us know how can i fix it.



    Thanks.
     

    Attached Files:

    Last edited: Dec 15, 2015
  11. sbagmeijer

    sbagmeijer Machine

    Looking and this post and your previous posts it looks like your whole setup is not according to the guide I posted or something is strange.

    I am afraid I cannot think of why JAVA_HOME would not work unless you did not add it correctly I tested it a few times and JAVA_HOME always works for me when I add it like I wrote it in the guide.

    I would suggest to redo all the guide steps 1 by 1, if you have still problems I could have a look with teamviewer if that helps you but it is slightly difficult to think why this won't work.

    Atleast double check if your Elasticsearch is up and running as this is required by Kibana to work correctly.
     
  12. Lokesh Saini

    Lokesh Saini New Member Member

    After re-perform all steps kibana is up and running. and I am able to run logstash also from /bin.

    now i want to capture the data from /var/log/messages(from database machine) based on some keywords and want to see the messages on dashboard/send an email.

    steps:
    1) need to read the /var/log/messages for keywords like 'restart'/'event'
    2) capture the data from that message (above 5 lines and below 5 lines)
    3) captured data need to be written in to log file with timestamp
    4) that file need to be sent to mail

    could you please help me how to do this basic code in windows. I will enhance based on my requirement

    Thanks,
    Lokesh
     

    Attached Files:

Share This Page