Cannot write to logstash configuration file in docker /usr/share/logstash/config/

10/22/2019

I'm trying to add a configuration file in /usr/share/logstash/config inside a docker run by kubernetes , I console onto the docker using $ kubectl exe -it "docker_name" -- /bin/bash.

I create then a .conf file in /usr/share/logstash/config/ , but when try to save the configurations it give me an error :

pipeline/input main.conf E166: Cant open linked file for writing.

I'm not sure if what I'm doing is right in beginning or there should be some better way to achieve this ?

-- Ayman Abu Qutriyah
docker
kubernetes
logstash

1 Answer

10/22/2019

Error E166 Can't open linked file for writing

You are trying to write to a file which can't be overwritten, and the file is a link (either a hard link or a symbolic link). Writing might still be possible if the directory that contains the link or the file is writable, but Vim now doesn't know if you want to delete the link and write the file in its place, or if you want to delete the file itself and write the new file in its place. If you really want to write the file under this name, you have to manually delete the link or the file, or change the permissions so that Vim can overwrite

You should use a ConfigMap to change the configfile

-- Spook
Source: StackOverflow