Reporting not working on ELk 5.3

Hi All,

Im using ELk stack version 5.3 and i can see reporting is not working for me.

Throwing below error.

i can see Server is running fine, still the error persist and also some times i do even get Max attempts reached (3) error also while clicking on reporting tab.

please help in resolving this.

Hi Team,

Does anyone reply back to us, We are stuck up in middle of ELK environment awaiting for your response. please give us some solution.

Thanks

Can you tell me a little more about your setup? That error means that the PDF generation process can't connect to Kibana instance. Usually this means that you have some proxy or something in place, and need to configure reporting so that it knows how to use that proxy.

Yes, im using ELK stack version 5.3 and the reporting issue appears to be in kibana instance where i get the below error while i generate the PDF.

it says bad request and even i can see there is no proxy applied.

it strange for me where i can see in 5.2 version reporting working fine and in 5.3 version it gets me an error.

when i generate pdf, i copied the url and pasted separately in browser and get below error.

{"statusCode":405,"error":"Method Not Allowed","message":"GET is not allowed"}

please help us with solving reporting issue.

Hi Team,

Does anyone reply back to us, We are stuck up in middle of ELK environment awaiting for your response. please give us some solution. we will be happy to hear from you.

Many Thanks

when i generate pdf, i copied the url and pasted separately in browser and get below error.

That's normal. GET isn't a valid method, hence the 405 error and the message. It needs to be a POST request, and will have to include the kbn-xsrf header as well. You can see how this works back in the 2.x docs; check out the request details in the "Automating Report Generation" section.


Have you made any modifications to your kibana.yml file? If so, can you share them?

Also, what's your setup look like? Is this a single instance of Kibana talking to a single instance of Elasticsearch? Or is it more than that?

Since i'm using ELK version 5.3, may be is this the issue?

Because previously i was using ELK 5.2 and reporting was working fine that time. and now i'm facing issue with 5.3 version.

Can you please help in how to check out the request details in the "Automating Report Generation" section.

I dint do any modifications in kibana.yml file except for below lines.

server.host: "0.0.0.0"
elasticsearch.url: "http://10.209.68.107:9200"
elasticsearch.preserveHost: true
kibana.index: ".kibana"
pid.file: D:\ELK-Stack5.3\kibana-5.3.0-windows-x86\logs\kibana.pid
logging.dest: D:\ELK-Stack5.3\kibana-5.3.0-windows-x86\logs\kibana.log

My setup is of single instance only where as i'm using Kibana talking to single instance of Elasticsearch.

Since i'm using ELK version 5.3, may be is this the issue?

It's certainly possible there's a bug in 5.3. You're the only person I've seen report this particular error in quite some time though. It's not common, and is almost always related to the network stack, which is why I asked whether you're using a proxy, that's a really common source of this issue.

Can you please help in how to check out the request details in the "Automating Report Generation" section.

Oh, I'm really sorry, I meant to post a link to the Reporting 2.x docs. If you scroll down to the PUT _watcher/watch/error_report request, you can see in the watcher definition the "http" section, with an object that look like this:

{
  "content_type" : "application/pdf",
  "request" : {
    "method": "POST", 
    "headers": {
      "kbn-xsrf": "reporting"
    },
    "read_timeout": "300s", 
    "url": "http://localhost:5601/api/reporting/generate/dashboard/Error-Monitoring?_g=(time:(from:now-1d%2Fd,mode:quick,to:now))&sync" 
  }
}

It's from this that you can get all the information you need to use curl. Specifically, it needs to be a POST request, and include the kbn-xsrf header. You can ignore the read_time part, the flow changed from 2.x to 5.x. You'll get a response with another URL in it, which is the URL you need to hit to actually download the report and any information about the process. Then you basically just poll that URL until you get a 200 response, which means the report is finished being created, or has failed. This is the URL the Reporting management page in Kibana uses to server up the PDF or display the error message.

All that said, I don't expect anything different to happen here. When you click "Generate Report" in Kibana, it's basically doing the same thing you'd be doing manually with curl. From there, it becomes a task in a queue that uses Elasticsearch, but that's not the issue, it's trying to process the queue, but it fails to load Kibana so it can't even begin to create assets for the PDF.


Back to your setup, a single instance of both is the easiest use case, and it should work out of the box. I'm sad to hear it doesn't. Again, I have to ask again for more information about your setup, I haven't seen anything yet that would point to why you are seeing that error. Are these the same settings you used with the 5.2 instance? Have you changed anything else on the server that's running Kibana from when things worked on 5.2? Do you have any kind of firewall rules on the box hosting Kibana, in particular any that you've changed? Is this a container, or maybe a VPS, a real server that's running Kibana? If you're able to, if you run the 5.2 instance on that same box, does it still work?

Thanks for the update above,

Eventually i have upgraded my ELK 5.3 version to ELK 5.4 version and i can see its working absolutely fine.

Report has been generated and can be viewed, but since we have one more issue as in report we can see only starting page details whereas we cant able to check for whole qwery page.

Please find the below screenshot.

its only 1 page displayed in screenshot whereas my search query is of 3 pages.

Glad you got it working. It's concerning to me that it worked in 5.2 and 5.4, but not 5.3 though...

As for the output you posted, that's a current limitation of how reporting works. Since everything is a screenshot, with a fixed size, text doesn't work well. We do have plans to fix this in the future though, and actually embed the text into the PDF as text. But it's a limitation right now.

Yes, its strange to see Reporting works fine in 5.2 and 5.4 though.

Since as you mentioned that's a current limitation of how reporting works. Can we know at least is there any browser extension that might help in fetching all text from whole page and generate report.

Since then if we need to send any colleagues among ourselves and generate reports, Report needs to be very much clear hence let us know any backup thing which we can use this unless this fix come in future.

It's maybe not quite the same thing, but CSV export is coming to reporting soon. That will give you all the data you want and need, just not in a PDF format.

Thank you Joe.

Hope so i'm waiting for upcoming CSV export in reporting soon.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.