You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Key with special character generated using openssl rand command caused php-fpm conf error.
Have you spent some time to check if this issue has been raised before?
No similiar issue raised in appwrite internal
To Reproduce
Install appwrite using any method and configure for production
Run openssl rand -base64 32 or openssl rand -base64 64 to generate base64 key
Fill _APP_OPENSSL_KEY_V1 env with generated key on previous step
Start the container
Expected behavior
The appwrite container should be running without any error
Actual Behavior
Php-fpm cannot pass the variable into the main configuration, here is the full log:
ox7r5 Issue a TLS certificate for master domain (localhost)
ox7r5 2020-11-05 23:34:15,183 CRIT Set uid to user 0
ox7r5 2020-11-05 23:34:15,196 INFO RPC interface ‘supervisor’ initialized
ox7r5 2020-11-05 23:34:15,196 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
ox7r5 2020-11-05 23:34:15,196 INFO supervisord started with pid 39
ox7r5 2020-11-05 23:34:16,200 INFO spawned: ‘php7-fpm’ with pid 42
ox7r5 2020-11-05 23:34:16,203 INFO spawned: ‘v1-schedule’ with pid 43
ox7r5 2020-11-05 23:34:16,209 INFO spawned: ‘v1-audits’ with pid 44
ox7r5 2020-11-05 23:34:16,214 INFO spawned: ‘v1-usage’ with pid 45
ox7r5 2020-11-05 23:34:16,223 INFO spawned: ‘v1-certificates’ with pid 46
ox7r5 2020-11-05 23:34:16,300 INFO spawned: ‘nginx’ with pid 47
ox7r5 2020-11-05 23:34:16,307 INFO spawned: ‘v1-tasks’ with pid 48
ox7r5 2020-11-05 23:34:16,479 INFO spawned: ‘v1-webhooks’ with pid 49
ox7r5 2020-11-05 23:34:16,481 INFO spawned: ‘v1-deletes’ with pid 50
ox7r5 2020-11-05 23:34:17,204 INFO success: php7-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 2020-11-05 23:34:17,204 INFO success: v1-schedule entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 2020-11-05 23:34:17,235 INFO success: v1-audits entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 2020-11-05 23:34:17,235 INFO success: v1-usage entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 2020-11-05 23:34:17,236 INFO success: v1-certificates entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 2020-11-05 23:34:17,288 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 PHP: syntax error, unexpected ‘=‘ in Unknown on line 1
ox7r5 2020-11-05 23:34:17,306 INFO success: v1-tasks entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 2020-11-05 23:34:17,383 INFO success: v1-webhooks entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 [05-Nov-2020 23:34:17] ERROR: Unable to include /etc/php/7.4/fpm/pool.d/www.conf from /etc/php/7.4/fpm/php-fpm.conf at line 428
ox7r5 [05-Nov-2020 23:34:17] ERROR: failed to load configuration file ‘/etc/php/7.4/fpm/php-fpm.conf’
ox7r5 [05-Nov-2020 23:34:17] ERROR: FPM initialization failed
ox7r5 2020-11-05 23:34:17,406 INFO exited: php7-fpm (exit status 78; not expected)
ox7r5 2020-11-05 23:34:17,414 INFO spawned: ‘php7-fpm’ with pid 62
ox7r5 2020-11-05 23:34:17,586 INFO success: v1-deletes entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ox7r5 PHP: syntax error, unexpected ‘=‘ in Unknown on line 1
ox7r5 [05-Nov-2020 23:34:17] ERROR: Unable to include /etc/php/7.4/fpm/pool.d/www.conf from /etc/php/7.4/fpm/php-fpm.conf at line 428
ox7r5 [05-Nov-2020 23:34:17] ERROR: failed to load configuration file ‘/etc/php/7.4/fpm/php-fpm.conf’
ox7r5 [05-Nov-2020 23:34:17] ERROR: FPM initialization failed
ox7r5 2020-11-05 23:34:17,620 INFO exited: php7-fpm (exit status 78; not expected)
ox7r5 2020-11-05 23:34:18,623 INFO spawned: ‘php7-fpm’ with pid 72
ox7r5 PHP: syntax error, unexpected ‘=‘ in Unknown on line 1
ox7r5 [05-Nov-2020 23:34:18] ERROR: Unable to include /etc/php/7.4/fpm/pool.d/www.conf from /etc/php/7.4/fpm/php-fpm.conf at line 428
ox7r5 [05-Nov-2020 23:34:18] ERROR: failed to load configuration file ‘/etc/php/7.4/fpm/php-fpm.conf’
ox7r5 [05-Nov-2020 23:34:18] ERROR: FPM initialization failed
ox7r5 2020-11-05 23:34:18,680 INFO exited: php7-fpm (exit status 78; not expected)
ox7r5 2020-11-05 23:34:20,695 INFO spawned: ‘php7-fpm’ with pid 73
ox7r5 PHP: syntax error, unexpected ‘=‘ in Unknown on line 1
ox7r5 [05-Nov-2020 23:34:20] ERROR: Unable to include /etc/php/7.4/fpm/pool.d/www.conf from /etc/php/7.4/fpm/php-fpm.conf at line 428
ox7r5 [05-Nov-2020 23:34:20] ERROR: failed to load configuration file ‘/etc/php/7.4/fpm/php-fpm.conf’
ox7r5 [05-Nov-2020 23:34:20] ERROR: FPM initialization failed
ox7r5 2020-11-05 23:34:20,832 INFO exited: php7-fpm (exit status 78; not expected)
ox7r5 2020-11-05 23:34:23,839 INFO spawned: ‘php7-fpm’ with pid 74
ox7r5 PHP: syntax error, unexpected ‘=‘ in Unknown on line 1
ox7r5 [05-Nov-2020 23:34:23] ERROR: Unable to include /etc/php/7.4/fpm/pool.d/www.conf from /etc/php/7.4/fpm/php-fpm.conf at line 428
ox7r5 [05-Nov-2020 23:34:23] ERROR: failed to load configuration file ‘/etc/php/7.4/fpm/php-fpm.conf’
ox7r5 [05-Nov-2020 23:34:23] ```ERROR: FPM initialization failed```
ox7r5 2020-11-05 23:34:23,910 INFO exited: php7-fpm (exit status 78; not expected)
ox7r5 2020-11-05 23:34:28,002 INFO exited: php7-fpm (exit status 78; not expected)
ox7r5 2020-11-05 23:35:13,610 INFO spawned: ‘php7-fpm’ with pid 82
Your Environment
_APP_OPENSSL_KEY_V1=${openssl rand -base64 32}
Workaround
Use simple string for _APP_OPENSSL_KEY_V1 value, or
Use combined date and sha256sum command to create a strong PSK without special characters date | sha256sum | base64 | head -c 45; echo
The text was updated successfully, but these errors were encountered:
This error was caused because of bad parsing when we passed the env var from the OS level to PHP FPM. Since in 0.7 we have dropped FPM for Swoole this is working and fine in the upcoming version.
🐛 Bug Report
Key with special character generated using openssl rand command caused php-fpm conf error.
Have you spent some time to check if this issue has been raised before?
No similiar issue raised in appwrite internal
To Reproduce
openssl rand -base64 32
oropenssl rand -base64 64
to generate base64 keyExpected behavior
The appwrite container should be running without any error
Actual Behavior
Php-fpm cannot pass the variable into the main configuration, here is the full log:
Your Environment
_APP_OPENSSL_KEY_V1=${openssl rand -base64 32}
Workaround
Use simple string for _APP_OPENSSL_KEY_V1 value,
or
Use combined date and sha256sum command to create a strong PSK without special characters
date | sha256sum | base64 | head -c 45; echo
The text was updated successfully, but these errors were encountered: