Image transcoder error 14.0.0-DEV4
172.16.0.1 - - [20/Apr/2024:21:20:37 +0000] "GET /image_transcoder.php?o=bx_photos_cover&h=12&dpx=2&t=1713648036 HTTP/1.1" 404 66954 "http://0.0.0.0:8888/view-organization-profile/test?owner=1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "-"
Image transcoder generates an error when uploading the image, the upload is completed successfully but the file is not processed. What are the reasons why I can get this error? I have set these permissions to files and folders. I use docker, the latest version master from github.
sudo chmod 777 cache cache_public logs tmp storage
sudo chmod +x plugins/ffmpeg/ffmpeg.exe
sudo chmod +x periodic/cron.php
sudo find ./logs -type f -exec chown 666 {} \;
sudo find ./logs -type d -exec chown 777 {} \;
sudo find ./tmp -type f -exec chown 666 {} \;
sudo find ./tmp -type d -exec chown 777 {} \;
sudo find ./storage -type f -exec chown 666 {} \;
sudo find ./storage -type d -exec chown 777 {} \;
my server audit:
Requirements
PHP:
version = 8.1.28 - OK
allow_url_fopen = On - OK
allow_url_include = Off - OK
magic_quotes_gpc = Off - OK
memory_limit = 128 MB - OK
post_max_size = 1 GB - OK
upload_max_filesize = 1 GB - OK
register_globals = Off - OK
safe_mode = Off - OK
disable_functions - OK
php module: curl = curl - OK
php module: gd = gd - OK
php module: mbstring = mbstring - OK
php module: json = json - OK
php module: fileinfo = fileinfo - OK
php module: zip = zip - OK
php module: openssl = openssl - OK
php module: exif = exif - OK
MySQL:
version = 11.3.2 - OK
Web-server: nginx/1.25.5
rewrite_module - UNDEFINED
OS:
Linux c27a6f134b67 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64
Hardware:
Hardware requirements can not be determined automatically - manual server audit may be required.
Site setup
UNA version = 14.0.0-DEV4 - OK
Files and folders permissions - please click here to find out if permissions are correct.
ffmpeg -
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
if you don't know if output is correct then manual server audit may be required.
Mail sending - click here to send test email
Cron jobs -
no crontab for www-data
if you are unsure if output is correct then manual server audit may be required
Last cron jobs execution - 20 Apr 2024 10:58:01 pm
Site optimization
PHP:
PHP accelerator = ZendOPcache - OK
PHP setup = fpm-fcgi - OK
MySQL:
key_buffer_size = 128 MB - OK
max_heap_table_size = 16 MB - OK
tmp_table_size = 16 MB - OK
thread_cache_size = 151 - OK
Web-server:
User-side caching for static content - click here to check it in Google Page Speed
If it is not enabled then please consider implement this optimization, since it improve perceived site speed and save the bandwidth.
To apply this optimization you need to have expires_module - UNDEFINED
Server-side content compression - can be checked manually or in "Page Speed" tool build-in into browser.
If it is not enabled then please consider implement this optimization, since it improve perceived site speed and save the bandwidth.
To apply this optimization you need to have deflate_module - UNDEFINED
UNA:
DB cache = On (File based cache engine) - OK
Pages cache = On (File based cache engine) - OK
Page blocks cache = On (File based cache engine) - OK
Templates Cache = On (FileHtml based cache engine) - OK
CSS files cache = On - OK
JS files cache = On - OK
Compression for CSS/JS cache = On - OK
Manual Server Audit
Some things can not be determined automatically, manual server audit is required to check it. If you don't know how to do it by yourself you can submit Server Audit Request.
-
-
·
LeonidS
- ·
Hello @ORV !
As I advised you before - it's better to use the UNA package from the Market https://unacms.com/view-product/una-platform, not the current development package form GitHub. About your issue - did you setup the Cron Jobs? do they work (it's possible to check via the Studio->Dashboard->Server audit area, the Last Cron Jobs execution line)?
-
·
LeonidS
-
- · Romulus
-
·
In reply to LeonidS
- ·
IInstalling the application as it is from that zip in a single server makes no sense. If this application is not in the cloud, the server will crash soon when more users enter. I will test the version 14.0.0-A3 from github but It seems you didn't read the post, there are also details about cronjobs, the application was installed as it is from github with all containers from docker-compose, I only made a small change in nginx config file because I use nginx as a proxy and caddy as a reverse proxy, and php.ini increasing memory and i add my network to the doker-compose file and .env file with my server variable. I only use docker for my apps in my k8 cluster, so cronjobs works perfectly there in a post is a server audit details from Studio->Dashboard->Server audit area (but it is possible that the cronjob container is not working correctly, I will check and possibly add a new user with sudo permissions):
Last cron jobs execution - 20 Apr 2024 10:58:01 pm
-
-
·
LeonidS
- ·
Ok, got it about your installation. So if you use Nginx, then it's better apply that setup from @Alex T⚜️ https://unacms.com/cmts-view/z9tfe0?sys=bx_forum&cmt_id=43244
Also, this recent thread may be useful too https://unacms.com/d/image-tanscoder-and-storage-php
And yes, the Cron Jobs should be executed not so long ago.
-
·
LeonidS
-
- · Romulus
-
·
In reply to LeonidS
- ·
I don't know how the image is built, for the cronjob I used your settings on github also i add in the service area in docker-compose file
to make the container visible in the network for all the services some extra line:
extra_hosts: - "host.docker.internal:host-gateway"
-
- · Romulus
-
·
In reply to LeonidS
- ·
Related to the Alex post I think it is incorrect to define the domain name in a service docker container for the application or in the UNA app server. the application must run in localhost or any ip address and any port depend of the setup, the domain must be defined only in the reverse proxy server or a web server level, so you can run multiple containers with the app in a swarm or a cluster with more many containers or on several servers in bachend, each service can be scalable and extended in the cloud without problems. Otherwise, a social network cannot be built in a single server, this is just an illusion
-
-
·
Alex T⚜️
-
·
In reply to Romulus
- ·
I've replied here regarding this issue - https://unacms.com/cmts-view/z9tfe0?sys=bx_forum&cmt_id=48608
Also official UNA Docker image has parameter UNA_AUTO_HOSTNAME to set it automatically.
-
·
Alex T⚜️
-
- · Romulus
-
·
In reply to LeonidS
- ·
"Also, this recent thread maybe useful too https://unacms.com/d/image-transcoder."
PAGE NOT FOUND
i have instaled version 14.0.0-B1 in hostname localhost:8888
.env variable:
UNA_HTTP_HOST=localhost:8888 UNA_DB_HOST=host.docker.internal UNA_AUTO_HOSTNAME=1
Host tools:
Host Tools Requirements PHP: version = 8.1.28 - OK allow_url_fopen = On - OK allow_url_include = Off - OK magic_quotes_gpc = Off - OK memory_limit = 128 MB - OK post_max_size = 1 GB - OK upload_max_filesize = 1 GB - OK register_globals = Off - OK safe_mode = Off - OK disable_functions - OK php module: curl = curl - OK php module: gd = gd - OK php module: mbstring = mbstring - OK php module: json = json - OK php module: fileinfo = fileinfo - OK php module: zip = zip - OK php module: openssl = openssl - OK php module: exif = exif - OK MySQL: version = 11.3.2 - OK Web-server: nginx/1.25.5 rewrite_module - UNDEFINED OS: Linux 4a2ec9e2b918 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 Hardware: Hardware requirements can not be determined automatically - manual server audit may be required. Site setup UNA version = 14.0.0-DEV5 - OK Files and folders permissions - please click here to find out if permissions are correct. ffmpeg - ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg' if you don't know if output is correct then manual server audit may be required. Mail sending - click here to send test email Cron jobs - no crontab for www-data if you are unsure if output is correct then manual server audit may be required Last cron jobs execution - None Site optimization PHP: PHP accelerator = ZendOPcache - OK PHP setup = fpm-fcgi - OK MySQL: key_buffer_size = 128 MB - OK max_heap_table_size = 16 MB - OK tmp_table_size = 16 MB - OK thread_cache_size = 151 - OK Web-server: User-side caching for static content - click here to check it in Google Page Speed If it is not enabled then please consider implement this optimization, since it improve perceived site speed and save the bandwidth. To apply this optimization you need to have expires_module - UNDEFINED Server-side content compression - can be checked manually or in "Page Speed" tool build-in into browser. If it is not enabled then please consider implement this optimization, since it improve perceived site speed and save the bandwidth. To apply this optimization you need to have deflate_module - UNDEFINED UNA: DB cache = On (File based cache engine) - OK Pages cache = On (File based cache engine) - OK Page blocks cache = On (File based cache engine) - OK Templates Cache = On (FileHtml based cache engine) - OK CSS files cache = On - OK JS files cache = On - OK Compression for CSS/JS cache = On - OK
the problem repeats itself, the images are not processed.
it seems that the cron service is not functional in docker container
folder permision setup:
sudo chmod 777 ./plugins/ffmpeg/ffmpeg.exe sudo chmod 777 ./inc sudo chmod 777 ./cache sudo chmod 777 ./cache_public sudo chmod 777 ./logs sudo chmod 777 ./tmp sudo chmod 777 ./storage sudo chmod 777 ./periodic/cron.php also sudo chmod +x plugins/ffmpeg/ffmpeg.exe sudo chmod +x periodic/cron.php
-
-
·
LeonidS
- ·
PAGE NOT FOUND
Thnx, corrected the link. About Cron Jobs - are there any traces in the error log(s) about cron.php file?
-
·
LeonidS
-
- · Romulus
-
·
In reply to LeonidS
- ·
The cron service was initially built using
FROM php:8.0-cli
. https://github.com/unacms/una/blob/master/scripts/docker-compose/Cron.Dockerfile When I entered the container, I encountered an error from Composer, so I updated the base image tophp:8.1
and rebuilt the container.Meanwhile, the UNA service PHP container was already built with
php:8.1
. https://github.com/unacms/una/blob/master/scripts/docker-compose/PHP.DockerfileI don't understand how you can claim to work with two different versions of PHP.
It would be beneficial to publish a step-by-step installation guide following this model. Here are my steps: https://github.com/olariuromeo/una/blob/master/INSTALL.md
INSTALL_DOCKER.md # Installation Guide for the Application using Docker and Composer This guide outlines the steps required to install and run the application using Docker and Composer. ```bash git checkout 14.0.0-B1 ``` ## 1. Installing Composer Begin by downloading the Docker image for Composer using the following command: ```bash docker pull composer/composer ``` ## 2. Installing PHP Dependencies using Composer After downloading the Docker image for Composer, run the following command to install the PHP dependencies of the application: ```bash docker run --rm -it -v "$(pwd):/app" composer/composer install ``` This command will run Composer in a Docker container, and the PHP dependencies will be installed in the current directory. ## 3. Setting Permissions Before running the Docker containers, ensure that proper permissions are set for directories and files. Follow the instructions below to set permissions: create file ```bash vim set_permissions.sh ``` copy the instruction below ```sh #!/bin/bash # set_permissions.sh # Set execute permissions for ffmpeg.exe chmod +x ./plugins/ffmpeg/ffmpeg.exe # Set permissions for the specified directories chmod 777 ./inc chmod 777 ./cache chmod 777 ./cache_public chmod 777 ./logs chmod 777 ./tmp chmod 777 ./storage chmod 777 ./periodic ``` Make sure you are in the root directory of the application. Make the set_permissions.sh script executable using the command: ```bash chmod +x set_permissions.sh ``` Run the set_permissions.sh script using the command: ```bash sudo ./set_permissions.sh ``` This will automatically apply the appropriate permissions for all directories and files specified in the script. ## 4. Running Docker Containers using docker-compose To run the application, use docker-compose. Make sure you have a properly configured docker-compose.yml file for your application. ```bash docker-compose up ``` This command will start the Docker containers according to the specifications in the docker-compose.yml file, allowing you to run the application. This guide details the steps to download Composer using Docker, install PHP dependencies using Composer, and run the application using Docker Compose. The `INSTALL.md` file should serve as a helpful guide for someone looking to install and run your application using Docker and Composer.