# Exec node fails with error:127 ... any ideas why?

**URL:** https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675
**Category:** General
**Tags:** docker
**Created:** [19 February 2024 17:17 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675 "2024-02-19T17:17:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![questuk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/questuk/32/4059_2.png) [@questuk](https://discourse.nodered.org/u/questuk)
#### Post date: [19 February 2024 17:17 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/1 "2024-02-19T17:17:05Z")

</div>

Hi,

I am running Node-RED in Docker.  
I am sending text to the Exec node to enable speech output.  
Text is `"Speaker_in_PC_Room"` and the command is` espeak -s 130 -k3`  
But I get the errors on the image below.

Is it that it doesn't know how to process **bash** or is it that it can't access Espeak software within Docker ?

I know it's a long shot on here but I am not certain which one is at fault.

Thanks

 ![15](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1d4253d093fe3eaf71e64a0be24faa7640d4fa7.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [19 February 2024 17:22 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/2 "2024-02-19T17:22:32Z")

</div>

> [@questuk](#):
>
> Is it that it doesn't know how to process **bash** or is it that it can't access Espeak software within Docker

It looks like bash cannot find `espeak`.

are you 100% certain it is installed inside the container?

perhaps you need to supply the full path to espeak e.g. `/some/path/to/espeak -s 130 ...` (of course only you will know where that is by looking inside the container)

---

<div class="post-metadata">

### Author: ![questuk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/questuk/32/4059_2.png) [@questuk](https://discourse.nodered.org/u/questuk)
#### Post date: [19 February 2024 17:46 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/3 "2024-02-19T17:46:02Z")

</div>

Hi,

I don't think espeak is installed within Docker, I have tried to add it via a terminal but I get an error.  
First i tried to update and got ... `apk update ERROR: Unable to lock database: Permission denied`

I have been unable to find out how to get permission as I have installed Node-RED from compose.yaml file.

I believe i am correct in accessing it via terminal as below ?  
If I get past this I may be able to do `apk add espeak`

Thanks for your help.

![18](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/47a4aa51091cb427dc4b2f11feff29893adfea79.png)

---

<div class="post-metadata">

### Author: ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)
#### Post date: [19 February 2024 17:59 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/4 "2024-02-19T17:59:39Z")

</div>

This will get you into the container as a root user

```auto
$ docker exec -it --user=root gb-node-red-1 /bin/sh 

```

Then try to install it

```auto
$ apk add espeak

```

---

<div class="post-metadata">

### Author: ![questuk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/questuk/32/4059_2.png) [@questuk](https://discourse.nodered.org/u/questuk)
#### Post date: [19 February 2024 18:06 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/5 "2024-02-19T18:06:45Z")

</div>

I think I have installed it ... i used

```auto
docker exec -it --user root gb-node-red-1 sh
/usr/src/node-red # apk add espeak

```

Not sure if this is the correct place ?

Then i tried **espeak "hello, world"**

and then in the terminal i got line and lines and like this ...

```auto
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5181:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5181:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5181:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5704:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'

```

Perhaps Alpine linux does not have sound driver or does it need configuring ?

Thanks

---

<div class="post-metadata">

### Author: ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)
#### Post date: [19 February 2024 18:17 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/6 "2024-02-19T18:17:44Z")

</div>

oh-boy ... I did not know what espeak was . I just know how to install things to a node-red docker image.

Ive added system devices to docker before. Look at this documentation:  
[https://docs.docker.com/engine/reference/commandline/container\_run/#device](https://docs.docker.com/engine/reference/commandline/container_run/#device)

You need to add a sound device probably. Sound? so If it was me I would run my nodered docker container like this:

```auto
docker run -d \
...your options....
--device /dev/snd:/dev/snd \
gb-node-red-1

```

this is an example ... might work but you need to do more reading unless somone else has done espeak before...

also I dont use compose.yaml for my docker needs. I can read it. Then I make my own one liner for running command in terminal. You will need to add the **--device** option to your yaml file.

NOTE: this assumes your running docker on a unbuntu / debian based distro and not windows or mac.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [19 February 2024 18:21 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/7 "2024-02-19T18:21:34Z")

</div>

Do you need to use docker? Often life is much easier without it.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [19 May 2024 18:21 UTC](https://discourse.nodered.org/t/exec-node-fails-with-error-127-any-ideas-why/85675/8 "2024-05-19T18:21:35Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
