Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

API and docker error: It was not possible to parse your key

I am using a bitnami image in docker for SuiteCRM 7.12.5, and since a recent release (bitnami/suitecrm:7.12.5-debian-10-r32) I am getting a consistent error when trying to generate a token:

It was not possible to parse your key, reason: error:0909006C:PEM routines:get_name:no start line

Previously, everything was working fine. If I revert to previous version (bitnami/suitecrm:7.12.5-debian-10-r31), it works again, and it fails with every version since (as of today, bitnami/suitecrm:7.12.5-debian-10-r42).

It is not yet critically urgent, as I can stay with r31 for a while. I am just documenting this in case anyone has a similar problem, or can point me towards anything useful.

Questions

From what I could find, the error seems to indicate that the server doing the request has a certificate problem. If it was the case, it would not work by simply reverting to a previous SuiteCRM image. So this is why I am thinking it’s a bug.

I have submitted it to bitnami, but apparently they are not monitoring the page.

Expected behavior

Generally the token that is returned is like this:

{
  "token_type": "Bearer",
  "expires_in": 3600,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImVlM2YyNzBiYzhlZjhiMTE2ZDYzMmEwMDczNTFiZGZlNThhYjI2OGJhMmZiYmIyMTFjNjFiNmZiY2Y1Njc4Mj [   redacted  ] 27oHRKXUG4tFHCcYs3SMJ_XHhTPvLdpPLvaoZ_gAdYqd0r1_zxLR4Q"
}

What happens instead

This is the error that is returned with bitnami versions since r32:

{
  "status":"rejected",
  "reason": {
    "message":"500 - {
      'error':'unknown_error',
      'message': 'It was not possible to parse your key, reason: error:0909006C:PEM routines:get_name:no start line'
      }",
    "name":"Error",
    "stack":"Error: Request failed with status code 500
    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (node:events:538:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)"
    }
}

I am using a Bitnami image in Docker for SuiteCRM 8.1 (R31) and also can’t generate a token. I get the same error message:

{
    "error": "unknown_error",
    "message": "It was not possible to parse your key, reason: error:0909006C:PEM routines:get_name:no start line"
}

I guess it has something to do with PHP 8. A Docker image for SuiteCRM 8.1 (R0), using PHP 7 is working fine.

1 Like

@sebro thanks for sharing

you’re right, newer images run PHP 8, and the last version that works for me (r31) runs PHP 7.4