ln command failed due to the key files already existing. This is one of the problems that I found, as it caused the 2 pairs of keys to be different, so the Auth API gets confused. I ran them in a fresh instance, before performing any call to the API, so these keys were not autogenerated yet.
Could you please try the commands to ensure both key pairs are correct?
sudo mv private.key private.key.bak
sudo mv public.key public.key.bak
ln -s ../../../Api/V8/OAuth2/private.key private.key
ln -s ../../../Api/V8/OAuth2/public.key public.key
sudo chown daemon:daemon p*.key
It may be also a good idea to restart the
php-fpm service, and even create new Client Credentials in the OAuth section of the UI, in order to ensure the application is using the correct keys.
Regarding the output exceeding the forums' limit, could you write it to a file and upload it to some file-sharing system so you can share it with us?