Errata

Distributed Systems with Node.js

Errata for Distributed Systems with Node.js

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 95
Example 4-2. Running ELK within Docker

I didn't find any errata or related information here or on the Internet for some reason, so I just post one here.

In Example 4-2. Running ELK within Docker on page 95 of the printed book, a "docker run" command is given.

I ran this in a Ubuntu 20.04 LTS VM. However, although I checked all files and commands I typed in to match the book and the example code (except the path of udp.conf), doing the next experiment with Kibana yields "Couldn't find any Elasticsearch data" error in Management - Create index pattern screen, even though all services are running (incl. consumer & producer).

Spent 30 min checking and poking, I found that for some reason, when I run "docker run" with "-v" flag to import the udp.conf file (without root), inside the container it has unknown owner/group and incorrect permissions, causing Logstash failed to load any configurations.

To look at it, use command "docker exec distnode-elk ls /etc/logstash/conf.d -l", you will see something like:

-rw------- 1 1000 1001 262 Dec 13 07:39 99-input-udp.conf

(Notice the permissions and owner/group [1000/1001]. These are the uid/gid in my VM's user)
(This can also be noticed by looking at the startup logs yielded by elk docker container - a "Permission denied" error will occur).

To fix it, I have to execute "docker exec distnode-elk chmod 644 /etc/logstash/conf.d/99-input-udp.conf" and restart the container.
(And I wrote a script to run the container, modify it, and immediately restart it -- I know it is not ideal and kinda silly, but it works)

I think this might need to be explained a little bit, or documented at least somewhere. I didn't realize this catch exists.
(I know I am not familiar with Docker that much, though)

L.Xi  Dec 13, 2021