Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #19217 > unrolled thread
| Started by | Custom Log <custom@log.abc> |
|---|---|
| First post | 2022-12-24 12:18 +0100 |
| Last post | 2022-12-28 21:27 -0800 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.php
[docker-compose] syslog() not work Custom Log <custom@log.abc> - 2022-12-24 12:18 +0100
Re: [docker-compose] syslog() not work Custom Log <custom@log.abc> - 2022-12-24 13:03 +0100
Re: [docker-compose] syslog() not work "J.O. Aho" <user@example.net> - 2022-12-24 23:29 +0100
Re: [docker-compose] syslog() not work Custom Log <custom@log.abc> - 2022-12-28 13:13 +0100
Re: [docker-compose] syslog() not work "J.O. Aho" <user@example.net> - 2022-12-28 22:12 +0100
Re: [docker-compose] syslog() not work ThE sUn <angel00000100000@mail.ee> - 2022-12-28 21:27 -0800
| From | Custom Log <custom@log.abc> |
|---|---|
| Date | 2022-12-24 12:18 +0100 |
| Subject | [docker-compose] syslog() not work |
| Message-ID | <to6n6t$1qu1$1@gioia.aioe.org> |
$ sudo ls -la /proc/$(pidof rsyslogd)/fd
totale 0
dr-x------ 2 root root 0 dic 23 08:54 .
dr-xr-xr-x 9 syslog syslog 0 dic 23 08:54 ..
lr-x------ 1 root root 64 dic 23 20:54 0 -> /dev/null
l-wx------ 1 root root 64 dic 23 20:54 1 -> /dev/null
l-wx------ 1 root root 64 dic 23 20:54 2 -> /dev/null
lrwx------ 1 root root 64 dic 23 08:54 3 -> 'socket:[19540]'
lr-x------ 1 root root 64 dic 23 20:54 4 -> /dev/urandom
lr-x------ 1 root root 64 dic 23 20:54 5 -> /proc/kmsg
lrwx------ 1 root root 64 dic 23 20:54 6 -> 'socket:[29286]'
l-wx------ 1 root root 64 dic 23 20:54 7 -> /var/log/syslog
l-wx------ 1 root root 64 dic 23 20:54 8 -> /var/log/kern.log
l-wx------ 1 root root 64 dic 23 20:54 9 -> /var/log/auth.log
$ netstat -x | grep 19540
unix 2 [ ] DGRAM 19540
/run/systemd/journal/syslog
$ cat docker-compose.override.yml
services:
web:
image: php:apache
extra_hosts:
- "host1:192.168.1.15"
logging:
driver: syslog
options:
syslog-address: "udp://host1:19540"
tag: "{{.Name}}/{{.ID}}"
$ docker-compose run web php -r 'syslog(LOG_ERR, "ABC") &&
print("OK!!!\n");'
WARNING: Found orphan containers (window-resources_window-resources_1)
for this project. If you removed or renamed this service in your compose
file, you can run this command with the --remove-orphans flag to clean
it up.
Creating window-resources_web_run ... done
OK!!!
$ journalctl -n | grep ABC || echo NOT FOUND
NOT FOUND
Why?
[toc] | [next] | [standalone]
| From | Custom Log <custom@log.abc> |
|---|---|
| Date | 2022-12-24 13:03 +0100 |
| Message-ID | <to6pqf$smb$1@gioia.aioe.org> |
| In reply to | #19217 |
Il 24/12/22 12:18, Custom Log ha scritto:
> ...
Small correction
+ cat docker-compose.yml
services:
web:
image: php:apache
extra_hosts:
- "host1:192.168.1.15"
#network_mode: host
logging:
driver: syslog
options:
syslog-address: "udp://host1:19540"
tag: "{{.Name}}/{{.ID}}"
+ docker-compose run web php -r 'syslog(LOG_ERR, "ABC") &&
print("OK!!!\n");'
Creating host_web_run ... done
Error response from daemon: failed to initialize logging driver: dial
udp: lookup host1: Temporary failure in name resolution
ERROR: 1
[toc] | [prev] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2022-12-24 23:29 +0100 |
| Message-ID | <k0pcq4Fkm8mU2@mid.individual.net> |
| In reply to | #19217 |
On 24/12/2022 12.18, Custom Log wrote:
> $ sudo ls -la /proc/$(pidof rsyslogd)/fd
> totale 0
> dr-x------ 2 root root 0 dic 23 08:54 .
> dr-xr-xr-x 9 syslog syslog 0 dic 23 08:54 ..
> lr-x------ 1 root root 64 dic 23 20:54 0 -> /dev/null
> l-wx------ 1 root root 64 dic 23 20:54 1 -> /dev/null
> l-wx------ 1 root root 64 dic 23 20:54 2 -> /dev/null
> lrwx------ 1 root root 64 dic 23 08:54 3 -> 'socket:[19540]'
> lr-x------ 1 root root 64 dic 23 20:54 4 -> /dev/urandom
> lr-x------ 1 root root 64 dic 23 20:54 5 -> /proc/kmsg
> lrwx------ 1 root root 64 dic 23 20:54 6 -> 'socket:[29286]'
> l-wx------ 1 root root 64 dic 23 20:54 7 -> /var/log/syslog
> l-wx------ 1 root root 64 dic 23 20:54 8 -> /var/log/kern.log
> l-wx------ 1 root root 64 dic 23 20:54 9 -> /var/log/auth.log
>
> $ netstat -x | grep 19540
> unix 2 [ ] DGRAM 19540
> /run/systemd/journal/syslog
>
> $ cat docker-compose.override.yml
> services:
> web:
> image: php:apache
> extra_hosts:
> - "host1:192.168.1.15"
> logging:
> driver: syslog
> options:
> syslog-address: "udp://host1:19540"
> tag: "{{.Name}}/{{.ID}}"
>
> $ docker-compose run web php -r 'syslog(LOG_ERR, "ABC") &&
> print("OK!!!\n");'
> WARNING: Found orphan containers (window-resources_window-resources_1)
> for this project. If you removed or renamed this service in your compose
> file, you can run this command with the --remove-orphans flag to clean
> it up.
> Creating window-resources_web_run ... done
This for you moved or deleted a composer file in another directory.
> OK!!!
>
> $ journalctl -n | grep ABC || echo NOT FOUND
> NOT FOUND
>
> Why?
For a socket ain't a udp or tcp port, it's a file, you need to share the
socket file from the host into the docker image and then from within the
docker access that socket file.
Check volumes in the docker-compose documentation.
Configure docker is generally thought as off topic as it's nothing to do
with PHP.
--
//Aho
[toc] | [prev] | [next] | [standalone]
| From | Custom Log <custom@log.abc> |
|---|---|
| Date | 2022-12-28 13:13 +0100 |
| Message-ID | <tohbsm$241$1@gioia.aioe.org> |
| In reply to | #19221 |
Il 24/12/22 23:29, J.O. Aho ha scritto: > > Configure docker is generally thought as off topic as it's nothing to do > with PHP. A newsgroup suitable for talking about docker configuration? -----BEGIN PGP MESSAGE----- hQGMAyHa6HqE1N3qAQv/RGsBbU7ONkOw85zLvw3n1MTyERgnk09UxyLxBZimyZQp NB9iBMgUV6t0f9C3lFvBxEVqgwN22i2rhBjP/QeKAYUi+fNFcnnGol/D13yhGuey rVZzuOC34O3nxB3qPq300Ke+2gbuLYIpBRNX7XjmEuI4K05bG9j8Tz5JQHallR9Y 7czDSUN5Ywhm9KQ5ZqFxu1uGo2ZM4B+F8P/fgTj8xO5QLnqH+Lj8QEXpEK2r95Pg 7kxJGw/iPHc3qQXIEXNsbkCaIX+nRhT5vyz4I/lyNL5cDxH/PLR6N45LPTIpxhtc VpE4GvFp3XOBp8dBkeWOq5FDJmcz+ULBJ21r4FhpS31xBXyrrt/P4RY4LekfK55y d6mxl6NDlNNG83BcTL5Jj6Hmeli8mn2Hiu/0urItHbQ6chZ/q/m8DzUNe1S2m19/ 3sM4rkPng9Nz1nkE215BQ1xUGtGuwmUr5JXWiyEF3IDaRlvh008QzNr7mGOk4LLH 5s3oRTDwdCDo1OUAAzwX0noBRhs0GlUC//813YuJy+d6Ynwrjqn4Jnrs9P6QGTcZ xL+VlwGwMY4aABqPs9BToZ75iALRwgzBHJHl/ofKdAN/r2Oa1evvMqT1cNlqs/Va Cv/1LR2nlsW0ZXad4VJhlRXhO2Gl8m9WNVGUcP6B84+vl8S1BkF2W4TEdw== =mo5+ -----END PGP MESSAGE-----
[toc] | [prev] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2022-12-28 22:12 +0100 |
| Message-ID | <k13ppkF4sbjU5@mid.individual.net> |
| In reply to | #19226 |
On 28/12/2022 13.13, Custom Log wrote: > Il 24/12/22 23:29, J.O. Aho ha scritto: >> >> Configure docker is generally thought as off topic as it's nothing to >> do with PHP. > > A newsgroup suitable for talking about docker configuration? They supply unpaid "support" over web based forums, as most of those people are born after 2k and only know how a browser works, https://forums.docker.com -- //Aho
[toc] | [prev] | [next] | [standalone]
| From | ThE sUn <angel00000100000@mail.ee> |
|---|---|
| Date | 2022-12-28 21:27 -0800 |
| Message-ID | <7e134aba-eeae-4ef8-9877-2b36076620b2n@googlegroups.com> |
| In reply to | #19231 |
Have a nice day...... 🌞 On Wednesday, December 28, 2022 at 11:12:27 PM UTC+2, J.O. Aho wrote: > On 28/12/2022 13.13, Custom Log wrote: > > Il 24/12/22 23:29, J.O. Aho ha scritto: > >> > >> Configure docker is generally thought as off topic as it's nothing to > >> do with PHP. > > > > A newsgroup suitable for talking about docker configuration? > They supply unpaid "support" over web based forums, as most of those > people are born after 2k and only know how a browser works, > https://forums.docker.com > > -- > //Aho
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web