Experienced Noob - Server/Client - gotchas and questions

I’ve got docker on a i3 NUC for my home automation server. I’ve also got Rhasspy server running there according to the readthedocs tutorial for client/server setups.
I’ve got a Pi3B as a satellite - also followed the client/server tutorial for docker/rhasspy setup.
I will be using snowboy to make a custom wakeword - a little later.

Is the memory leak/lock up still and issue? I forgot to add the “-m 512m” flag mentioned in the cron/reboot post.

I seemed to have a working setup and was tweaking some audio playback settings and hit Restart - button stayed dimmed. Putty connection also stopped responding.
one hard reboot later - everything seemed to restart - I pull up the WebUI - and get Network Error! quickly.
The Restart button gets a “Refused to connect” on window/browser refresh - which tells me the webserver has stopped/bit the dust.
Or, when I closed the Putty window that was busily showing debug messages and stuff - did I stop something?

However, Putty connection is working. So, since it’s early on in the setup, looks like I’ll have to toss that container and start over again.

Any hints/tips/tricks for the containerized server/client setup? I do see minor things in the tutorial because of the differences in setup - for example I’m using the AIY V1 setup for my satellite - and there seemed to be some interest in those - so I need to write that up.

Doh, the container had been stopped, I’m guessing when I closed that Putty window.
On to more readingthedocs…

That happens when you run docker with -it , it is attached to your terminal and if you close putty you close all running instances. If you start docker in the background with -d it will keep on running. You can still see the output if you do a docker attach <container name> Container name is printed when you start Rhasspy with the docker command, or you can add --name <container name> when starting the Rhasppy container to give it a name.

Thanks, esdeboer, however :

sudo docker run -p 12101:12101 \
--restart unless-stopped \
-v "home/pi/rhasspy/profiles:/profiles" \
--device /dev/snd:/dev/snd \
synesthesiam/rhasspy-server:latest \
-profile en

The above is the command I used to “start docker” - I don’t see a -i, a -t, or even a -d anywhere.
Hence my confusion. (though I did learn about 8 different ways to misspell “synesthesiam” while trying to make that command work ).
Heck even the docker docs mention the key combo ctrl-p + ctrl-q to detach if you used the -i and -t flags - it’s not explained what to do if you don’t use those flags? Does it still work?
My solution was to install Portainer onto the Pi to handle the containers - hey, it’s stopped. Restart it. Done.
Regardless, I have much new stuff to learn.

I’m a big fan of tmux for trying out long-running tasks before commiting to someting like a cron job or a systemd service.

In your first SSH session, you run tmux. You can start any program (or multiple programs by creating new tabs with the keyboard shortcuts). Once it’s running, do CTRL + b and then hit d to detach. Now you can safely exit your SSH session.

With future SSH sessions, you can run tmux attach to re-attach to your program’s terminal :slight_smile:

1 Like

Oh boy! More stuff to learn. Thanks for the heads up.

1 Like