0

I have a php docker app running with multiple containers such as

j_php-fpm_1 and j_nginx_1

j_php-fpm_1 is the container with the whole project (Magento / php but that's not relevant here).

My issue is the following

At some point in the app I trigger A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later. which means I have a server error within my php even before entering the framework.

So I have been into my j_php-fpm_1 but the file can't be read due to permission denied

make bash
docker-compose exec -u magento php-fpm bash
magento@315933593d37:/var/www/magento$ ls -al /var/log/php7.3-fpm.log -rw------- 1 root root 0 Jan  3 10:04 /var/log/php7.3-fpm.log

magento@315933593d37:/var/www/magento$ 
cat: /var/log/php7.3-fpm.log: Permission denied

Then I tried to check the live nginx logs

docker logs j_nginx_1

As a result I see my request triggering the error, but still no errors printed in the log

172.21.0.1 - - [05/Jan/2022:15:22:34 +0000] "POST /admin_sdj/sponsorship/index/sponsorship/key/d81ba9d66a439a3fe7a2e70e9567830be8b3a1cef39f8984002129045622fb59/id/1/?isAjax=true HTTP/1.1" 200 190 "http://j.dev-cpy.fr/admin_sdj/customer/index/edit/id/1/key/05dae1e3543127f8c02295e29b06b70722d085f69a37b0d7155fc257ce6b1257/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"

access log and error log from the ngning container are empty.

Any ideas where I can find my error log ?

PS : I can't change the php fpm logfile rights.

EDIT : Connecting as root with docker exec -it --user root j_php-fpm_1 /bin/bash shows the fpm log file is empty too.

I don't know where to look at anymore

Claims
  • 245
  • 2
  • 15
  • As a possible reference for PHP error log have you looked at [this page](https://stackoverflow.com/questions/5127838/where-does-php-store-the-error-log-php-5-apache-fastcgi-and-cpanel)? – Martin Jan 05 '22 at 16:10
  • Did you check whether your application itself stores any log files? – Nico Haase Jan 05 '22 at 16:11
  • also if you can view the PHP `phpinfo()` function this output should show you where the error logs should be stored – Martin Jan 05 '22 at 16:12
  • @Martin Somehow I found the my error's origin; it was actually due to a wrong url path triggering a 404 error...which was triggering then the server error in some following request. Still no idea about the logs though, but at least my issue is solved right now. I let the topic open in case someone has an idea. Thanks for the help. – Claims Jan 05 '22 at 17:00
  • 1
    @Claims you can answer your own question (which I would encourage in thist instance) but you don't need to set that as the "correct" answer if someone gives you a more concise/descriptive answer `:-)` – Martin Jan 05 '22 at 18:32

1 Answers1

0

I found the my error's origin; it was actually due to a wrong url path triggering a 404 error...which was triggering then the server error in some following request. Still no idea about the logs though, but at least my issue is solved right now. I let the topic open in case someone has an idea.

Claims
  • 245
  • 2
  • 15