contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
85 stars 33 forks source link

Server Forker Problem #614

Closed tintifaxxx closed 3 years ago

tintifaxxx commented 3 years ago

Hi,

i always run into an error, when trying to use the new Contao Manager (1.3.3) The previous Contao Manager Version was working fine.

Contao 4.95 - First error, when updating to 4.9.9

Can you please tell me the requirements for the server to get the forkers working. Provider says system requirements are given

Here is one of the error messages:

[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] request.INFO: Matched route "contao_managerapi_task__invoke". {"route":"contao_managerapi_task__invoke","route_parameters":{"_route":"contao_managerapi_task__invoke","_controller":"Contao\\ManagerApi\\Controller\\TaskController"},"request_uri":"https://test.XXXXXXXX.com/contao-manager.phar.php/api/task","method":"GET"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"api","authenticators":3} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\LoginAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\LoginAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\JwtAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\TokenAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\TokenAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Calling getCredentials() on guard authenticator. {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\JwtAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Passing guard token information to the GuardAuthenticationProvider {"firewall_key":"api","authenticator":"Contao\\ManagerApi\\Security\\JwtAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.INFO: Guard authentication successful! {"token":"[object] (Symfony\\Component\\Security\\Guard\\Token\\PostAuthenticationGuardToken: PostAuthenticationGuardToken(user=\"XXXXXXXX\", authenticated=true, roles=\"ROLE_ADMIN\"))","authenticator":"Contao\\ManagerApi\\Security\\JwtAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Guard authenticator set no success response: request continues. {"authenticator":"Contao\\ManagerApi\\Security\\JwtAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] security.DEBUG: Remember me skipped: it is not configured for the firewall. {"authenticator":"Contao\\ManagerApi\\Security\\JwtAuthenticator"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:54] tasks.INFO: Updating task status {"name":"composer/update","class":"Contao\\ManagerApi\\Task\\Packages\\UpdateTask"} []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:55] tasks.INFO: Completed operation: Contao\ManagerApi\TaskOperation\Composer\CloudOperation [] []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:55] tasks.INFO: Current operation: Contao\ManagerApi\TaskOperation\Composer\InstallOperation [] []
[30-Nov-2020 09:41:55 UTC] [2020-11-30 09:41:55] app.CRITICAL: Uncaught PHP Exception RuntimeException: "No forker found for your current platform." at phar:///var/www/vhosts/XXXXXXXX.com/test.XXXXXXXX.com/web/contao-manager.phar.php/api/Process/ProcessController.php line 267 {"exception":"[object] (RuntimeException(code: 0): No forker found for your current platform. at phar:///var/www/vhosts/XXXXXXXX.com/test.XXXXXXXX.com/web/contao-manager.phar.php/api/Process/ProcessController.php:267)"} []

Thank You

aschempp commented 3 years ago

That's very interesting, because the "forker" concept has not changed since the early days. Do you know what platform your server is running on? Did you manually configure the PHP binary path or was it automatically configured?

tintifaxxx commented 3 years ago

PHP binary path was configured manually, told by provider /opt/plesk/php/7.4/bin/php platform is linux - 4.15.0-70-generic #79-Ubuntu What else do you need to know ? phpinfo is uploaded

aschempp commented 3 years ago

The Contao Manager uses so-called "forkers" to send a process to the background. There are multiple implementations for different platforms/server setups: https://github.com/contao/contao-manager/tree/1.3/api/Process/Forker

On Linux it usually works with both Nohup (exec nohup …) and Disown (… & disown, so I'm not sure whats special on your server 😞

aschempp commented 3 years ago

In the next version, we will fall back to inline processes if background forking does not work (see b897f26f27faa13169413217bed266df90b02e7e).

zoglo commented 8 months ago

Same thing happening on mittwald and their mstudio on 1.8.1 😒

/at mittwald

Stacktrace:

[16-Feb-2024 19:10:26 Europe/Berlin] [2024-02-16T19:10:26.300122+01:00] tasks.INFO: Task has been completed {"name":"composer/update","class":"_ContaoManager\\Contao\\ManagerApi\\Task\\Packages\\UpdateTask"} []
[16-Feb-2024 19:10:26 Europe/Berlin] [2024-02-16T19:10:26.301681+01:00] app.CRITICAL: Uncaught PHP Exception RuntimeException: "No forker found for your current platform." at phar:///home/p-brnghi/html/london-e47ut/public/contao-manager.phar.php/api/Process/ProcessController.php line 189 {"exception":"[object] (RuntimeException(code: 0): No forker found for your current platform. at phar:///home/p-brnghi/html/london-e47ut/public/contao-manager.phar.php/api/Process/ProcessController.php:189)"} []

Cleared cache of the contao-manager and still doesn't work.

Happening on multiple websites on PHP 8.1 and 8.2 (Can't test on PHP 8.3 because standard image libraries don't work on the whole server if having one Project on 8.3 🙃 )

Works after a service restart