如何修复损坏的Kibana Docker容器(Elasticsearch2.3.3+Kibana4.5.1)
Hey there, let's get your Kibana container sorted out. The root problem here is clear: you installed an own_home plugin made for Kibana 4.6.4, but you're running Kibana 4.5.1. Kibana plugins are extremely version-sensitive—even a small mismatch like this can crash the whole container. Let's walk through your fix options:
Option 1: Reset the Kibana Container (Quickest & Most Reliable for New Users)
If you don't have critical custom configurations saved in the container (beyond the plugin you tried to install), starting fresh is the easiest way:
- First, stop and delete the broken container:
docker stop <your-kibana-container-name> docker rm <your-kibana-container-name> - Pull the correct Kibana 4.5.1 image again to make sure you have a clean copy:
docker pull kibana:4.5.1 - Spin up a new container, making sure to link it to your Elasticsearch 2.3.3 container (replace placeholders with your actual names):
docker run -d --name kibana-4.5.1 --link <your-es-container-name>:elasticsearch -p 5601:5601 kibana:4.5.1
Option 2: Try Repairing the Existing Container (If You Need to Save Configs)
If you have important custom settings in the container you don't want to lose, you can attempt to remove the incompatible plugin:
- First, try starting the container (if it's stopped):
docker start <your-kibana-container-name> - If it starts successfully, or even if it doesn't but you can still access the shell, jump into the container:
docker exec -it <your-kibana-container-name> bash - Navigate to Kibana's plugin directory and delete the problematic
own_homefolder:cd /opt/kibana/plugins rm -rf own_home - Exit the container and restart it:
docker restart <your-kibana-container-name>
If the container still won't start after this, the plugin installation likely damaged core Kibana files—stick with Option 1 to reset.
How to Install the Correct Plugin (Avoid Future Issues)
Since you can't access GitHub from the Docker machine, here's the right way to install a compatible own_home plugin for Kibana 4.5.1:
- On a machine with internet access, find a version of
own_homeexplicitly built for Kibana 4.5.1 (look for releases named likeown_home-4.5.1-x.zip—skip any 4.6.x versions). - Transfer the zip file to your Docker machine (use
scpor your preferred file transfer tool):scp /local/path/to/own_home-4.5.1-x.zip your-user@docker-machine-ip:/remote/destination/path/ - Copy the zip file into your running Kibana container:
docker cp /remote/destination/path/own_home-4.5.1-x.zip <your-kibana-container-name>:/opt/kibana/ - Jump into the container and install the plugin from the local file:
docker exec -it <your-kibana-container-name> bash cd /opt/kibana bin/kibana plugin -i own_home -u file:///opt/kibana/own_home-4.5.1-x.zip - Restart the container to apply the changes:
docker restart <your-kibana-container-name>
Quick Pro Tip
Always double-check that the plugin version matches your Kibana version exactly. Even minor differences (like 4.5.1 vs 4.5.2) can cause crashes or broken functionality.
内容的提问来源于stack exchange,提问作者nutim

