reference-streaming.mdx 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. ---
  2. title: "Streaming reference"
  3. description: "Each node running Netdata can stream the metrics it collects, in real time, to another node. See all of the available settings in this reference document."
  4. type: "reference"
  5. custom_edit_url: "https://github.com/netdata/netdata/edit/master/docs/metrics-storage-management/reference-streaming.mdx"
  6. sidebar_label: "Streaming reference"
  7. learn_status: "Published"
  8. learn_topic_type: "References"
  9. learn_rel_path: "References/Configuration"
  10. ---
  11. # Streaming reference
  12. Each node running Netdata can stream the metrics it collects, in real time, to another node. To learn more, read about
  13. [how streaming works](https://github.com/netdata/netdata/blob/master/docs/metrics-storage-management/how-streaming-works.mdx).
  14. For a quickstart guide for enabling a simple `parent-child` streaming relationship, see our [stream metrics between
  15. nodes](https://github.com/netdata/netdata/blob/master/docs/metrics-storage-management/enable-streaming.mdx) doc. All other configuration options and scenarios are
  16. covered in the sections below.
  17. ## Configuration
  18. There are two files responsible for configuring Netdata's streaming capabilities: `stream.conf` and `netdata.conf`.
  19. From within your Netdata config directory (typically `/etc/netdata`), [use `edit-config`](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) to
  20. open either `stream.conf` or `netdata.conf`.
  21. ```
  22. sudo ./edit-config stream.conf
  23. sudo ./edit-config netdata.conf
  24. ```
  25. ## Settings
  26. As mentioned above, both `stream.conf` and `netdata.conf` contain settings relevant to streaming.
  27. ### `stream.conf`
  28. The `stream.conf` file contains three sections. The `[stream]` section is for configuring child nodes.
  29. The `[API_KEY]` and `[MACHINE_GUID]` sections are both for configuring parent nodes, and share the same settings.
  30. `[API_KEY]` settings affect every child node using that key, whereas `[MACHINE_GUID]` settings affect only the child
  31. node with a matching GUID.
  32. The file `/var/lib/netdata/registry/netdata.public.unique.id` contains a random GUID that **uniquely identifies each
  33. node**. This file is automatically generated by Netdata the first time it is started and remains unaltered forever.
  34. #### `[stream]` section
  35. | Setting | Default | Description |
  36. | :---------------------------------------------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  37. | `enabled` | `no` | Whether this node streams metrics to any parent. Change to `yes` to enable streaming. |
  38. | [`destination`](#destination) | ` ` | A space-separated list of parent nodes to attempt to stream to, with the first available parent receiving metrics, using the following format: `[PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]`. [Read more →](#destination) |
  39. | `ssl skip certificate verification` | `yes` | If you want to accept self-signed or expired certificates, set to `yes` and uncomment. |
  40. | `CApath` | `/etc/ssl/certs/` | The directory where known certificates are found. Defaults to OpenSSL's default path. |
  41. | `CAfile` | `/etc/ssl/certs/cert.pem` | Add a parent node certificate to the list of known certificates in `CAPath`. |
  42. | `api key` | ` ` | The `API_KEY` to use as the child node. |
  43. | `timeout seconds` | `60` | The timeout to connect and send metrics to a parent. |
  44. | `default port` | `19999` | The port to use if `destination` does not specify one. |
  45. | [`send charts matching`](#send-charts-matching) | `*` | A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) to filter which charts are streamed. [Read more →](#send-charts-matching) |
  46. | `buffer size bytes` | `10485760` | The size of the buffer to use when sending metrics. The default `10485760` equals a buffer of 10MB, which is good for 60 seconds of data. Increase this if you expect latencies higher than that. The buffer is flushed on reconnect. |
  47. | `reconnect delay seconds` | `5` | How long to wait until retrying to connect to the parent node. |
  48. | `initial clock resync iterations` | `60` | Sync the clock of charts for how many seconds when starting. |
  49. ### `[API_KEY]` and `[MACHINE_GUID]` sections
  50. | Setting | Default | Description |
  51. | :---------------------------------------------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  52. | `enabled` | `no` | Whether this API KEY enabled or disabled. |
  53. | [`allow from`](#allow-from) | `*` | A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) matching the IPs of nodes that will stream metrics using this API key. [Read more →](#allow-from) |
  54. | `default history` | `3600` | The default amount of child metrics history to retain when using the `save`, `map`, or `ram` memory modes. |
  55. | [`default memory mode`](#default-memory-mode) | `ram` | The [database](https://github.com/netdata/netdata/blob/master/database/README.md) to use for all nodes using this `API_KEY`. Valid settings are `dbengine`, `map`, `save`, `ram`, or `none`. [Read more →](#default-memory-mode) |
  56. | `health enabled by default` | `auto` | Whether alarms and notifications should be enabled for nodes using this `API_KEY`. `auto` enables alarms when the child is connected. `yes` enables alarms always, and `no` disables alarms. |
  57. | `default postpone alarms on connect seconds` | `60` | Postpone alarms and notifications for a period of time after the child connects. |
  58. | `default proxy enabled` | ` ` | Route metrics through a proxy. |
  59. | `default proxy destination` | ` ` | Space-separated list of `IP:PORT` for proxies. |
  60. | `default proxy api key` | ` ` | The `API_KEY` of the proxy. |
  61. | `default send charts matching` | `*` | See [`send charts matching`](#send-charts-matching). |
  62. #### `destination`
  63. A space-separated list of parent nodes to attempt to stream to, with the first available parent receiving metrics, using
  64. the following format: `[PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]`.
  65. - `PROTOCOL`: `tcp`, `udp`, or `unix`. (only tcp and unix are supported by parent nodes)
  66. - `HOST`: A IPv4, IPv6 IP, or a hostname, or a unix domain socket path. IPv6 IPs should be given with brackets
  67. `[ip:address]`.
  68. - `INTERFACE` (IPv6 only): The network interface to use.
  69. - `PORT`: The port number or service name (`/etc/services`) to use.
  70. - `SSL`: To enable TLS/SSL encryption of the streaming connection.
  71. To enable TCP streaming to a parent node at `203.0.113.0` on port `20000` and with TLS/SSL encryption:
  72. ```conf
  73. [stream]
  74. destination = tcp:203.0.113.0:20000:SSL
  75. ```
  76. #### `send charts matching`
  77. A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) to filter which charts are streamed.
  78. The default is a single wildcard `*`, which streams all charts.
  79. To send only a few charts, list them explicitly, or list a group using a wildcard. To send _only_ the `apps.cpu` chart
  80. and charts with contexts beginning with `system.`:
  81. ```conf
  82. [stream]
  83. send charts matching = apps.cpu system.*
  84. ```
  85. To send all but a few charts, use `!` to create a negative match. To send _all_ charts _but_ `apps.cpu`:
  86. ```conf
  87. [stream]
  88. send charts matching = !apps.cpu *
  89. ```
  90. #### `allow from`
  91. A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) matching the IPs of nodes that
  92. will stream metrics using this API key. The order is important, left to right, as the first positive or negative match is used.
  93. The default is `*`, which accepts all requests including the `API_KEY`.
  94. To allow from only a specific IP address:
  95. ```conf
  96. [API_KEY]
  97. allow from = 203.0.113.10
  98. ```
  99. To allow all IPs starting with `10.*`, except `10.1.2.3`:
  100. ```conf
  101. [API_KEY]
  102. allow from = !10.1.2.3 10.*
  103. ```
  104. > If you set specific IP addresses here, and also use the `allow connections` setting in the `[web]` section of
  105. > `netdata.conf`, be sure to add the IP address there so that it can access the API port.
  106. #### `default memory mode`
  107. The [database](https://github.com/netdata/netdata/blob/master/database/README.md) to use for all nodes using this `API_KEY`. Valid settings are `dbengine`, `ram`,
  108. `save`, `map`, or `none`.
  109. - `dbengine`: The default, recommended time-series database (TSDB) for Netdata. Stores recent metrics in memory, then
  110. efficiently spills them to disk for long-term storage.
  111. - `ram`: Stores metrics _only_ in memory, which means metrics are lost when Netdata stops or restarts. Ideal for
  112. streaming configurations that use ephemeral nodes.
  113. - `save`: Stores metrics in memory, but saves metrics to disk when Netdata stops or restarts, and loads historical
  114. metrics on start.
  115. - `map`: Stores metrics in memory-mapped files, like swap, with constant disk write.
  116. - `none`: No database.
  117. When using `default memory mode = dbengine`, the parent node creates a separate instance of the TSDB to store metrics
  118. from child nodes. The [size of _each_ instance is configurable](https://github.com/netdata/netdata/blob/master/docs/store/change-metrics-storage.md) with the `page
  119. cache size` and `dbengine multihost disk space` settings in the `[global]` section in `netdata.conf`.
  120. ### `netdata.conf`
  121. | Setting | Default | Description |
  122. | :----------------------------------------- | :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  123. | **`[global]` section** | | |
  124. | `memory mode` | `dbengine` | Determines the [database type](https://github.com/netdata/netdata/blob/master/database/README.md) to be used on that node. Other options settings include `none`, `ram`, `save`, and `map`. `none` disables the database at this host. This also disables alarms and notifications, as those can't run without a database. |
  125. | **`[web]` section** | | |
  126. | `mode` | `static-threaded` | Determines the [web server](https://github.com/netdata/netdata/blob/master/web/server/README.md) type. The other option is `none`, which disables the dashboard, API, and registry. |
  127. | `accept a streaming request every seconds` | `0` | Set a limit on how often a parent node accepts streaming requests from child nodes. `0` equals no limit. If this is set, you may see `... too busy to accept new streaming request. Will be allowed in X secs` in Netdata's `error.log`. |
  128. ## Examples
  129. ### Per-child settings
  130. While the `[API_KEY]` section applies settings for any child node using that key, you can also use per-child settings
  131. with the `[MACHINE_GUID]` section.
  132. For example, the metrics streamed from only the child node with `MACHINE_GUID` are saved in memory, not using the
  133. default `dbengine` as specified by the `API_KEY`, and alarms are disabled.
  134. ```conf
  135. [API_KEY]
  136. enabled = yes
  137. default memory mode = dbengine
  138. health enabled by default = auto
  139. allow from = *
  140. [MACHINE_GUID]
  141. enabled = yes
  142. memory mode = save
  143. health enabled = no
  144. ```
  145. ### Securing streaming with TLS/SSL
  146. Netdata does not activate TLS encryption by default. To encrypt streaming connections, you first need to [enable TLS
  147. support](https://github.com/netdata/netdata/blob/master/web/server/README.md#enabling-tls-support) on the parent. With encryption enabled on the receiving side, you
  148. need to instruct the child to use TLS/SSL as well. On the child's `stream.conf`, configure the destination as follows:
  149. ```
  150. [stream]
  151. destination = host:port:SSL
  152. ```
  153. The word `SSL` appended to the end of the destination tells the child that connections must be encrypted.
  154. > While Netdata uses Transport Layer Security (TLS) 1.2 to encrypt communications rather than the obsolete SSL protocol,
  155. > it's still common practice to refer to encrypted web connections as `SSL`. Many vendors, like Nginx and even Netdata
  156. > itself, use `SSL` in configuration files, whereas documentation will always refer to encrypted communications as `TLS`
  157. > or `TLS/SSL`.
  158. #### Certificate verification
  159. When TLS/SSL is enabled on the child, the default behavior will be to not connect with the parent unless the server's
  160. certificate can be verified via the default chain. In case you want to avoid this check, add the following to the
  161. child's `stream.conf` file:
  162. ```
  163. [stream]
  164. ssl skip certificate verification = yes
  165. ```
  166. #### Trusted certificate
  167. If you've enabled [certificate verification](#certificate-verification), you might see errors from the OpenSSL library
  168. when there's a problem with checking the certificate chain (`X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY`). More
  169. importantly, OpenSSL will reject self-signed certificates.
  170. Given these known issues, you have two options. If you trust your certificate, you can set the options `CApath` and
  171. `CAfile` to inform Netdata where your certificates, and the certificate trusted file, are stored.
  172. For more details about these options, you can read about [verify
  173. locations](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_load_verify_locations.html).
  174. Before you changed your streaming configuration, you need to copy your trusted certificate to your child system and add
  175. the certificate to OpenSSL's list.
  176. On most Linux distributions, the `update-ca-certificates` command searches inside the `/usr/share/ca-certificates`
  177. directory for certificates. You should double-check by reading the `update-ca-certificate` manual (`man
  178. update-ca-certificate`), and then change the directory in the below commands if needed.
  179. If you have `sudo` configured on your child system, you can use that to run the following commands. If not, you'll have
  180. to log in as `root` to complete them.
  181. ```
  182. # mkdir /usr/share/ca-certificates/netdata
  183. # cp parent_cert.pem /usr/share/ca-certificates/netdata/parent_cert.crt
  184. # chown -R netdata.netdata /usr/share/ca-certificates/netdata/
  185. ```
  186. First, you create a new directory to store your certificates for Netdata. Next, you need to change the extension on your
  187. certificate from `.pem` to `.crt` so it's compatible with `update-ca-certificate`. Finally, you need to change
  188. permissions so the user that runs Netdata can access the directory where you copied in your certificate.
  189. Next, edit the file `/etc/ca-certificates.conf` and add the following line:
  190. ```
  191. netdata/parent_cert.crt
  192. ```
  193. Now you update the list of certificates running the following, again either as `sudo` or `root`:
  194. ```
  195. # update-ca-certificates
  196. ```
  197. > Some Linux distributions have different methods of updating the certificate list. For more details, please read this
  198. > guide on [adding trusted root certificates](https://github.com/Busindre/How-to-Add-trusted-root-certificates).
  199. Once you update your certificate list, you can set the stream parameters for Netdata to trust the parent certificate.
  200. Open `stream.conf` for editing and change the following lines:
  201. ```
  202. [stream]
  203. CApath = /etc/ssl/certs/
  204. CAfile = /etc/ssl/certs/parent_cert.pem
  205. ```
  206. With this configuration, the `CApath` option tells Netdata to search for trusted certificates inside `/etc/ssl/certs`.
  207. The `CAfile` option specifies the Netdata parent certificate is located at `/etc/ssl/certs/parent_cert.pem`. With this
  208. configuration, you can skip using the system's entire list of certificates and use Netdata's parent certificate instead.
  209. #### Expected behaviors
  210. With the introduction of TLS/SSL, the parent-child communication behaves as shown in the table below, depending on the
  211. following configurations:
  212. - **Parent TLS (Yes/No)**: Whether the `[web]` section in `netdata.conf` has `ssl key` and `ssl certificate`.
  213. - **Parent port TLS (-/force/optional)**: Depends on whether the `[web]` section `bind to` contains a `^SSL=force` or
  214. `^SSL=optional` directive on the port(s) used for streaming.
  215. - **Child TLS (Yes/No)**: Whether the destination in the child's `stream.conf` has `:SSL` at the end.
  216. - **Child TLS Verification (yes/no)**: Value of the child's `stream.conf` `ssl skip certificate verification`
  217. parameter (default is no).
  218. | Parent TLS enabled | Parent port SSL | Child TLS | Child SSL Ver. | Behavior |
  219. | :----------------- | :--------------- | :-------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
  220. | No | - | No | no | Legacy behavior. The parent-child stream is unencrypted. |
  221. | Yes | force | No | no | The parent rejects the child connection. |
  222. | Yes | -/optional | No | no | The parent-child stream is unencrypted (expected situation for legacy child nodes and newer parent nodes) |
  223. | Yes | -/force/optional | Yes | no | The parent-child stream is encrypted, provided that the parent has a valid TLS/SSL certificate. Otherwise, the child refuses to connect. |
  224. | Yes | -/force/optional | Yes | yes | The parent-child stream is encrypted. |
  225. ### Proxy
  226. A proxy is a node that receives metrics from a child, then streams them onward to a parent. To configure a proxy,
  227. configure it as a receiving and a sending Netdata at the same time.
  228. Netdata proxies may or may not maintain a database for the metrics passing through them. When they maintain a database,
  229. they can also run health checks (alarms and notifications) for the remote host that is streaming the metrics.
  230. In the following example, the proxy receives metrics from a child node using the `API_KEY` of
  231. `66666666-7777-8888-9999-000000000000`, then stores metrics using `dbengine`. It then uses the `API_KEY` of
  232. `11111111-2222-3333-4444-555555555555` to proxy those same metrics on to a parent node at `203.0.113.0`.
  233. ```conf
  234. [stream]
  235. enabled = yes
  236. destination = 203.0.113.0
  237. api key = 11111111-2222-3333-4444-555555555555
  238. [66666666-7777-8888-9999-000000000000]
  239. enabled = yes
  240. default memory mode = dbengine
  241. ```
  242. ### Ephemeral nodes
  243. Netdata can help you monitor ephemeral nodes, such as containers in an auto-scaling infrastructure, by always streaming
  244. metrics to any number of permanently-running parent nodes.
  245. On the parent, set the following in `stream.conf`:
  246. ```conf
  247. [11111111-2222-3333-4444-555555555555]
  248. # enable/disable this API key
  249. enabled = yes
  250. # one hour of data for each of the child nodes
  251. default history = 3600
  252. # do not save child metrics on disk
  253. default memory = ram
  254. # alarms checks, only while the child is connected
  255. health enabled by default = auto
  256. ```
  257. On the child nodes, set the following in `stream.conf`:
  258. ```bash
  259. [stream]
  260. # stream metrics to another Netdata
  261. enabled = yes
  262. # the IP and PORT of the parent
  263. destination = 10.11.12.13:19999
  264. # the API key to use
  265. api key = 11111111-2222-3333-4444-555555555555
  266. ```
  267. In addition, edit `netdata.conf` on each child node to disable the database and alarms.
  268. ```bash
  269. [global]
  270. # disable the local database
  271. memory mode = none
  272. [health]
  273. # disable health checks
  274. enabled = no
  275. ```
  276. ## Troubleshooting
  277. Both parent and child nodes log information at `/var/log/netdata/error.log`.
  278. If the child manages to connect to the parent you will see something like (on the parent):
  279. ```
  280. 2017-03-09 09:38:52: netdata: INFO : STREAM [receive from [10.11.12.86]:38564]: new client connection.
  281. 2017-03-09 09:38:52: netdata: INFO : STREAM xxx [10.11.12.86]:38564: receive thread created (task id 27721)
  282. 2017-03-09 09:38:52: netdata: INFO : STREAM xxx [receive from [10.11.12.86]:38564]: client willing to stream metrics for host 'xxx' with machine_guid '1234567-1976-11e6-ae19-7cdd9077342a': update every = 1, history = 3600, memory mode = ram, health auto
  283. 2017-03-09 09:38:52: netdata: INFO : STREAM xxx [receive from [10.11.12.86]:38564]: initializing communication...
  284. 2017-03-09 09:38:52: netdata: INFO : STREAM xxx [receive from [10.11.12.86]:38564]: receiving metrics...
  285. ```
  286. and something like this on the child:
  287. ```
  288. 2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: connecting...
  289. 2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: initializing communication...
  290. 2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: waiting response from remote netdata...
  291. 2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: established communication - sending metrics...
  292. ```
  293. The following sections describe the most common issues you might encounter when connecting parent and child nodes.
  294. ### Slow connections between parent and child
  295. When you have a slow connection between parent and child, Netdata raises a few different errors. Most of the
  296. errors will appear in the child's `error.log`.
  297. ```bash
  298. netdata ERROR : STREAM_SENDER[CHILD HOSTNAME] : STREAM CHILD HOSTNAME [send to PARENT IP:PARENT PORT]: too many data pending - buffer is X bytes long,
  299. Y unsent - we have sent Z bytes in total, W on this connection. Closing connection to flush the data.
  300. ```
  301. On the parent side, you may see various error messages, most commonly the following:
  302. ```
  303. netdata ERROR : STREAM_PARENT[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : read failed: end of file
  304. ```
  305. Another common problem in slow connections is the child sending a partial message to the parent. In this case, the
  306. parent will write the following to its `error.log`:
  307. ```
  308. ERROR : STREAM_RECEIVER[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : sent command 'B' which is not known by netdata, for host 'HOSTNAME'. Disabling it.
  309. ```
  310. In this example, `B` was part of a `BEGIN` message that was cut due to connection problems.
  311. Slow connections can also cause problems when the parent misses a message and then receives a command related to the
  312. missed message. For example, a parent might miss a message containing the child's charts, and then doesn't know
  313. what to do with the `SET` message that follows. When that happens, the parent will show a message like this:
  314. ```
  315. ERROR : STREAM_RECEIVER[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : requested a SET on chart 'CHART NAME' of host 'HOSTNAME', without a dimension. Disabling it.
  316. ```
  317. ### Child cannot connect to parent
  318. When the child can't connect to a parent for any reason (misconfiguration, networking, firewalls, parent
  319. down), you will see the following in the child's `error.log`.
  320. ```
  321. ERROR : STREAM_SENDER[HOSTNAME] : Failed to connect to 'PARENT IP', port 'PARENT PORT' (errno 113, No route to host)
  322. ```
  323. ### 'Is this a Netdata?'
  324. This question can appear when Netdata starts the stream and receives an unexpected response. This error can appear when
  325. the parent is using SSL and the child tries to connect using plain text. You will also see this message when
  326. Netdata connects to another server that isn't Netdata. The complete error message will look like this:
  327. ```
  328. ERROR : STREAM_SENDER[CHILD HOSTNAME] : STREAM child HOSTNAME [send to PARENT HOSTNAME:PARENT PORT]: server is not replying properly (is it a netdata?).
  329. ```
  330. ### Stream charts wrong
  331. Chart data needs to be consistent between child and parent nodes. If there are differences between chart data on
  332. a parent and a child, such as gaps in metrics collection, it most often means your child's `memory mode`
  333. does not match the parent's. To learn more about the different ways Netdata can store metrics, and thus keep chart
  334. data consistent, read our [memory mode documentation](https://github.com/netdata/netdata/blob/master/database/README.md).
  335. ### Forbidding access
  336. You may see errors about "forbidding access" for a number of reasons. It could be because of a slow connection between
  337. the parent and child nodes, but it could also be due to other failures. Look in your parent's `error.log` for errors
  338. that look like this:
  339. ```
  340. STREAM [receive from [child HOSTNAME]:child IP]: `MESSAGE`. Forbidding access."
  341. ```
  342. `MESSAGE` will have one of the following patterns:
  343. - `request without KEY` : The message received is incomplete and the KEY value can be API, hostname, machine GUID.
  344. - `API key 'VALUE' is not valid GUID`: The UUID received from child does not have the format defined in [RFC
  345. 4122](https://tools.ietf.org/html/rfc4122)
  346. - `machine GUID 'VALUE' is not GUID.`: This error with machine GUID is like the previous one.
  347. - `API key 'VALUE' is not allowed`: This stream has a wrong API key.
  348. - `API key 'VALUE' is not permitted from this IP`: The IP is not allowed to use STREAM with this parent.
  349. - `machine GUID 'VALUE' is not allowed.`: The GUID that is trying to send stream is not allowed.
  350. - `Machine GUID 'VALUE' is not permitted from this IP. `: The IP does not match the pattern or IP allowed to connect to
  351. use stream.
  352. ### Netdata could not create a stream
  353. The connection between parent and child is a stream. When the parent can't convert the initial connection into
  354. a stream, it will write the following message inside `error.log`:
  355. ```
  356. file descriptor given is not a valid stream
  357. ```
  358. After logging this error, Netdata will close the stream.