Comments (4)
touch: cannot touch '/data/log/logstash/logstash.log': No such file or directory
chown: cannot access '/data/log/logstash/logstash.log': No such file or directory
[root@log /]# /usr/local/bin/logstash: line 57: /data/log/logstash/logstash.stdout: No such file or directory
As you changed the LS_LOG_DIR
environment variable to /data/log/logstash
, in your Dockerfile
you need to create the /data/log/logstash
directory and make it writable by the logstash
user (which the Logstash service should run as). You want something like:
mkdir -p /data/log/logstash
chown logstash:logstash /data/log/logstash
[root@log /]# /usr/local/bin/logstash start
I'd recommend using:
- either the
service logstash start
(with the originallogstash-init
file copied to/etc/init.d/logstash
as in the initial Dockerfile) to make sure that the environment is set up correctly and that the proper arguments are passed tologstash
(and that Logstash is started aslogstash
rather thanroot
); - or – if you don't want to use an init file and want to start Logstash manually instead – something more along the lines of
logstash agent -f ${LS_CONF_DIR} -l ${LS_LOG_FILE} ${LS_OPTS} > "${LS_LOG_DIR}/$name.stdout" 2> "${LS_LOG_DIR}/$name.err" &
(as in the init file, making sure that you've also populatedJAVA_OPTS
and the rest of the environment variables).
Let me know if that works out for you.
Oh, and from the output:
logstash started.
Seems that Logstash did start and may actually be running 😃 (despite not being able to write out its logs or its stdout/stderr due to the missing directory).
from elk-docker.
@spujadas
Thanks for the comprehensive instructions. Much appreciated.
It works like a charm!
[root@log /]# /etc/init.d/logstash status
logstash is running
from elk-docker.
Client logs forwarded to the elk host, is stored on the elk?
If so, you need to make a mount volumes to the host,What do you think?
from elk-docker.
Glad to hear that you got it working!
As for maintaining the logs across restarts, you might want to take a look at Making log data persistent, which explains how to create a Docker data volume in the ELK container.
Other options include:
- bind mounting the
/var/lib/elasticsearch
directory in the container to a directory on the host (e.g.docker run ... -v /some/dir/on/host:/var/lib/elasticsearch ...
); - adding a
VOLUME /var/lib/elasticsearch
instruction in theDockerfile
. I'll probably do that in the very near future to make the log data persistent by default in the image.
Hope that helps.
from elk-docker.
Related Issues (20)
- cannot add login page to kibana HOT 1
- How to use environment variable in 30-output.conf file HOT 2
- ELK fails to start on MAC M1 HOT 8
- Setting up APM question HOT 4
- Question: user authentication for https HOT 1
- Error in Security section HOT 1
- Issues installing on TrueNAS Scale HOT 1
- Update ELK to latest version (currently 8.3.3) HOT 4
- Issues running on AWS Fargate HOT 2
- Add sample docker-compose.yml with persistance + traefik configuration HOT 1
- example using image never starts as elasticsearch doesn't start HOT 1
- Kibana refuses connection, nothing in logs HOT 2
- filebeat x509 certificate signed by unknown authority when calling api endpoint HOT 1
- Kibana enrollement token
- Update ELK to 8.9.0 HOT 1
- Kibana 8.11.1 Security Update (ESA-2023-25) HOT 1
- want to move data from this running stack to another machine (arm64-amd64) how to
- how to disable the features that require a licence.
- Please update to 8.13.2 HOT 1
- For Running on MAC M2 need need bootstrap.system_call_filter: false in elasticsearch.yml HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elk-docker.