Il a l’air d’être là :
pi@raspberrypi:~ $ docker exec -it gladys ls -ltr /.dockerenv
-rwxr-xr-x 1 root root 0 Dec 6 16:49 /.dockerenv
Il a l’air d’être là :
pi@raspberrypi:~ $ docker exec -it gladys ls -ltr /.dockerenv
-rwxr-xr-x 1 root root 0 Dec 6 16:49 /.dockerenv
Oui tu as raison de ce côté ça semble ok
Peux me retourner docker inspect gladys
?
Bien sur :
pi@raspberrypi:~ $ docker inspect gladys
[
{
"Id": "8581b2f237a8d12385f08bf41f55f7317b4cdb31e898eaeb5006cfe4923fee07",
"Created": "2021-12-06T15:49:57.439599681Z",
"Path": "docker-entrypoint.sh",
"Args": [
"npm",
"run",
"start:prod"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1325,
"ExitCode": 0,
"Error": "",
"StartedAt": "2021-12-07T12:02:50.248501222Z",
"FinishedAt": "2021-12-07T12:02:49.509983761Z"
},
"Image": "sha256:0b6844316e0e4983271f3441a3c0092fb453dc30896316b0342615ed0756cb2d",
"ResolvConfPath": "/var/lib/docker/containers/8581b2f237a8d12385f08bf41f55f7317b4cdb31e898eaeb5006cfe4923fee07/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/8581b2f237a8d12385f08bf41f55f7317b4cdb31e898eaeb5006cfe4923fee07/hostname",
"HostsPath": "/var/lib/docker/containers/8581b2f237a8d12385f08bf41f55f7317b4cdb31e898eaeb5006cfe4923fee07/hosts",
"LogPath": "/var/lib/docker/containers/8581b2f237a8d12385f08bf41f55f7317b4cdb31e898eaeb5006cfe4923fee07/8581b2f237a8d12385f08bf41f55f7317b4cdb31e898eaeb5006cfe4923fee07-json.log",
"Name": "/gladys",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/var/run/docker.sock:/var/run/docker.sock",
"/var/lib/gladysassistant:/var/lib/gladysassistant",
"/dev:/dev",
"/run/udev:/run/udev:ro",
"/sys/class/gpio:/sys/class/gpio"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {
"max-size": "10m"
}
},
"NetworkMode": "host",
"PortBindings": {},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": [
"SYS_RAWIO"
],
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/79944e592a4984887087b17209800c933d3fc416f2116c613c175a8f3030cb8b-init/diff:/var/lib/docker/overlay2/4cd9517a1a9899c5e581da9409a30840cf199b7efbbfc9ca0c2977726e912f81/diff:/var/lib/docker/overlay2/24e69eeb04f5bffc39296159c8b1eddc48dd9aef656f1bf02544c27113564e15/diff:/var/lib/docker/overlay2/449f645c571906441a5e2de38f1ab69f113ed07e12d83ed7effe92458c61d2ed/diff:/var/lib/docker/overlay2/ef39f29e599e35a04d867bf6b6401b53bda07ce3d377eee7a69e422b9845f82a/diff:/var/lib/docker/overlay2/10040948a7fad9aa41620b2122a0db6fdfb5931a3ad15c7ceecfdddb5eefa7cc/diff:/var/lib/docker/overlay2/60739219279d95882945cbc288ebeaeb08a2388d4f7ab5d00a47ba0650aeb577/diff:/var/lib/docker/overlay2/23126056f214ff2c1d585c47f2c31ad25f53d9511c759eee8773ae9c87900a99/diff:/var/lib/docker/overlay2/f3fe78331c2bd6426519036b34dc264055f8c41134fff780455bf8dc975c3ce3/diff:/var/lib/docker/overlay2/f65fce9ab73582867a8f7900e8283787f5aafc3cad11ea616e6ec1f1ac0ae915/diff:/var/lib/docker/overlay2/bd9824a41fa217ffc3426100066a28daabe859296e59023bbd10ba52c8de14e8/diff:/var/lib/docker/overlay2/02c1a423297039c98f3efd36e5f4b423aafdec76fce5300812ebaa03a1e3c538/diff:/var/lib/docker/overlay2/113bad89fa609b7cadeffab31886d06690caa6ca04ada668235c04f241e15eba/diff",
"MergedDir": "/var/lib/docker/overlay2/79944e592a4984887087b17209800c933d3fc416f2116c613c175a8f3030cb8b/merged",
"UpperDir": "/var/lib/docker/overlay2/79944e592a4984887087b17209800c933d3fc416f2116c613c175a8f3030cb8b/diff",
"WorkDir": "/var/lib/docker/overlay2/79944e592a4984887087b17209800c933d3fc416f2116c613c175a8f3030cb8b/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/dev",
"Destination": "/dev",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/run/udev",
"Destination": "/run/udev",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/sys/class/gpio",
"Destination": "/sys/class/gpio",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/var/lib/gladysassistant",
"Destination": "/var/lib/gladysassistant",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "raspberrypi",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"NODE_ENV=production",
"SERVER_PORT=80",
"TZ=Europe/Paris",
"SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=14.18.1",
"YARN_VERSION=1.22.15",
"LD_LIBRARY_PATH=/lib"
],
"Cmd": [
"npm",
"run",
"start:prod"
],
"Image": "gladysassistant/gladys:v4",
"Volumes": null,
"WorkingDir": "/src/server",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "0e54c20f0b93c7111606c77c82a274131d4299aa9d0849872d93a91a89546b00",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/default",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"host": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "3b0dab387cf79a1f40e1fd7e33a6970d5376c963eb28c5bc1bee212b68aa23e2",
"EndpointID": "774727113c8bea96f5512ed35e2f07e2b75a660e0fe094d5e6e16d72b1f5faf9",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"DriverOpts": null
}
}
}
}
]
Bon je vois rien qui cloche. J’ai vraiment l’impression que c’est la restauration de db qui a foutu le bordel.
Est ce que ça te dérangerai de tenter un setup sans restauration, sans gladys plus.
docker stop gladys
sudo mv /var/lib/gladysassistant/gladys-production.db /var/lib/gladysassistant/gladys-production.db.bak
docker start gladys
Après ça tu as une instance toute fraiche, création de compte etc… et tente l’activation du mqtt
En espérant que tu ne vois pas ce message
Après le nouveau setup j’ai bien ce message…
@pierre-gilles je reproduis ce problème sans en trouver la cause
Et surtout il sort d’où ce “containers”
2021-12-15T14:09:24+0100 <error> index.js:21 (process.<anonymous>) Error: getaddrinfo ENOTFOUND containers
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'containers'
}
Depuis le conteneur:
nodejs console avec dockerode
docker.sock
/src/server # curl --unix-socket /var/run/docker.sock http://localhost/containers/json | jq
{
"Id": "b27e7ee5107f358db92675744e29712551a1e48467c90b45a9dc7f943c783c5f",
"Names": [
"/gladys"
],
"Image": "gladysassistant/gladys:v4",
"ImageID": "sha256:0b6844316e0e4983271f3441a3c0092fb453dc30896316b0342615ed0756cb2d",
"Command": "docker-entrypoint.sh npm run start:prod",
"Created": 1639572714,
"Ports": [],
"Labels": {},
"State": "running",
"Status": "Up 56 minutes",
"HostConfig": {
"NetworkMode": "host"
},
"NetworkSettings": {
"Networks": {
"host": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "038bdb585ed3829045f6992d6494a8764454b6e1251ea1e1e7b68ff38e8fdb01",
"EndpointID": "a3230db0dcf961f0a13a8783972395244f6f17358f8785c928abe5e31a0e49ea",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"DriverOpts": null
}
}
},
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/dev",
"Destination": "/dev",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/run/udev",
"Destination": "/run/udev",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/sys/class/gpio",
"Destination": "/sys/class/gpio",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/var/lib/gladysassistant",
"Destination": "/var/lib/gladysassistant",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
]
},
{
"Id": "d8b093b4f35a2959aab6b566b445cb221e0c70fc90ac87d2cb9177ec7af760c5",
"Names": [
"/watchtower"
],
"Image": "containrrr/watchtower",
"ImageID": "sha256:9167b324e914d60000a13f7c2ac5ac6be60c2594b0b683a0305e63235a755374",
"Command": "/watchtower --cleanup --include-restarting",
"Created": 1639572463,
"Ports": [
{
"PrivatePort": 8080,
"Type": "tcp"
}
],
"Labels": {
"com.centurylinklabs.watchtower": "true"
},
"State": "running",
"Status": "Up About an hour",
"HostConfig": {
"NetworkMode": "default"
},
"NetworkSettings": {
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "92f118d6718ccc1dfb093799e844f618083508cd08b2db3366cc2e9d29c174d8",
"EndpointID": "e027c57729e0a4d501398f0bd8c87ef7773b0e844dee7cda54c9244437778df2",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
},
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
]
}
Le hostname semble clairement pourri….
La comme ça aucune idée, mais intuitivement j’ai l’impression que dockerode ne trouve pas sur quel hostname contacter l’API docker et donc le nom de la route passe en temps que domaine
A voir si l’API dockerode est toujours là même… quand tu as fais un petit fichier nodejs tu as pris exactement le même bout de code que dans Gladys ou un exemple côte dockerode ?
Hello,
Je viens de passer de ma vieille SD sur mon Pi4 à un SSD, j’ai donc tenté une fresh install, malheureusement même erreurs :
2021-12-15T22:24:48+0100 <error> index.js:21 (process.<anonymous>) Error: getaddrinfo ENOTFOUND containers
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'containers'
}
Que ce soit pour Mqtt ou Z2M.
Du coup Gladys plus du tout utilisable dans mon cas, RIP
Je tente un truc demain ( ça pu l’ipv6 cette histoire )
Edit: Pour dockerode j’ai pris un exemple
@Albenss t’as pris l’image bullseye ?
Yes c’est bien celle là !
Top pour le SSD! En attendant que l’image bullseye soit fonctionnelle, prend l’image sur le site (sous buster), celle là fonctionne nickel