Kibana did not load properly. Check the server output for more information. Kibana in Docker for nginx

(Stanislav Oshmarin) #1

Kibana: 6.5.4
We run Kibana in Docker for nginx. Once you have launched the page, you’ve been receiving a message. "Kibana did not load properly. Check the server output for more information."
Follow the link:

http://internal.server.com/kibana/

Config proxy Nginx:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
server {
    listen 80;
    listen 443 ssl;
    ssl_certificate     /etc/nginx/ssl/ssl.crt;
    ssl_certificate_key /etc/nginx/ssl/ssl.key;
    ssl_verify_depth 3
    server_name internal.server.com;

location /kibana {
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://10.99.202.51:5601;
        }
}

Config Kibana.yml:

server.port: 5601
server.host: "0"
server.basePath: "/kibana"
server.rewriteBasePath: true
server.maxPayloadBytes: 1048576
elasticsearch.requestTimeout: 60000
elasticsearch.shardTimeout: 60000
elasticsearch.tribe.requestTimeout: 60000
elasticsearch.url: "http://10.99.202.51:9200"
kibana.index: ".kibana"

Additionally configured to access from another proxy. Its configuration is similar, but starts with:

location /

Kibana opens with another dns using this proxy.
Logs docker container Kibana:

{"type":"response","@timestamp":"2019-02-11T12:54:09Z","tags":,"pid":1,"method":"get","statusCode":304,"req":{"url":"/plugins/searchprofiler/index.css","method":"get","headers":{"host":"internal.server.com","x-forwarded-host":"internal.server.com","x-forwarded-server":"internal.server.com","x-forwarded-for":"10.100.42.134","connection":"close","user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0","accept":"text/css,/;q=0.1","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate","referer":"http://internal.server.com/kibana/","if-modified-since":"Mon, 17 Dec 2018 21:33:57 GMT","if-none-match":""fdd633559f0864ace51268c661d47f7510746b6b-gzip""},"remoteAddress":"10.99.202.20","userAgent":"10.99.202.20","referer":"http://internal.server.com/kibana/"},"res":{"statusCode":304,"responseTime":3,"contentLength":9},"message":"GET /plugins/searchprofiler/index.css 304 3ms - 9.0B"}

Tell me, please, what's the problem?

(Joe Fleming) #2

Your setup looks mostly right, or at least I don't immediately see anything wrong with it. Except for one thing; server.host. You have a value of "0", which I'm not sure is actually correct. You may need to plug localhost or 0.0.0.0 in there, or possibly even internal.server.com... but I'm also not sure that's really the issue (maybe this is how you're supposed to network between Docker container? I'm not well versed in that personally).

If you open the browser debugger and watch the network tab when you load Kibana, what do you see? Are requests failing? If so, what's the URL they are trying to load, and what error does it produce? And also, are you seeing any error messages from the Kibana server (stdout or in log files)?

(Stanislav Oshmarin) #3

Applied recommendations with the server.host, but they did not help.

The same file is available from another proxy.
In logs only "statusCode": 304 from this proxy. 502 is missing.

(Ranganatha) #4

did you update kibana recently,
and is this problem showing up after the update??
if so try to add the dll files to kibana folder where its installed.

(Stanislav Oshmarin) #5

Yes, the upgrade was from kibana 6 to kibana 6.5.4. Previously there were problems with the monitoring tab, but the kibana worked. Then the kibana was updated and shoved into the docker.

Kibina works, if you set the xpack.monitoring.enabled parameter false to kibana.yml.

1 Like
(Joe Fleming) #6

So you have the monitoring UI disabled then? That may explain the 502 on that css file, but it's almost certainly a bug (that file shouldn't even be loaded if the plugin is disabled).

The other getAttribute error you're seeing is coming from the Spaces feature, and I don't see anything in the issue tracker about it (I may just be missing it though).

I'd be curious to know if you re-enable monitoring if that css error goes away. I suspect the 502 response is actually coming from your proxy, and not from Kibana, but again, that request shouldn't even be made.

@Brandon_Kobel have you seen that spaces error before? Is it possible that the monitoring issue is causing that error too?

(Brandon Kobel) #7

@Brandon_Kobel have you seen that spaces error before? Is it possible that the monitoring issue is causing that error too?

I have not seen that error before, it's possible that some monitoring code is being loaded as part of the space selector bundle.

(Ranganatha) #8

so try to add the dll files to kibana folder where its installed.
i to had the same issue (used brew services) and copying the .dll files solved the problem

(Sentient) #9

Running into a similar issue. Most css files loads except

using the image
docker.elastic.co/kibana/kibana-oss:6.5.4

deployed to minikube

bootstrap.js:29 GET https://k8s-logs.test.com/plugins/status_page/index.css net::ERR_ABORTED 502
loadStyleSheet @ bootstrap.js:29
window.onload @ bootstrap.js:52
load (async)
(anonymous) @ bootstrap.js:1
bootstrap.js:29 GET https://k8s-logs.test.com/plugins/console/index.css net::ERR_ABORTED 502
loadStyleSheet @ bootstrap.js:29
window.onload @ bootstrap.js:47
load (async)
(anonymous) @ bootstrap.js:1
bootstrap.js:29 GET https://k8s-logs.test.com/plugins/inspector_views/index.css net::ERR_ABORTED 502
loadStyleSheet @ bootstrap.js:29
window.onload @ bootstrap.js:56
load (async)
(anonymous) @ bootstrap.js:1
kibana.bundle.js:82 Uncaught TypeError: Cannot read property 'getAttribute' of null
    at Object.<anonymous> (kibana.bundle.js:82)
    at __webpack_require__ (vendors.bundle.js:1)
    at webpackJsonpCallback (vendors.bundle.js:1)
    at kibana.bundle.js:1
(system) closed #10

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