Skip to main content

Hello,

When attempting to authenticate to the Centreon server API with the REST API, I receive the following error message in response:

 

{

    "code": "42S02",

    "message": "An error has occurred in a repository"

}

The request was sent to the correct endpoint with the correct credentials (when I enter incorrect credentials, I get the credentials error).

{

  "security": {

    "credentials": {

      "login": "{{username}}",

      "password": "{{password}}"

    }

  }

}

endpoint: https://{{server}}/centreon/api/v2/login

 

Is this problem known ? Any idea to solve this ?

By the way, I can’t find any related logs to this in my /var/log/centreon/ folder

I only have access logs (the request is received and processed).

 

Centreon 21.10.4

 

Thank you for your help!

 

 

up! I still did not find any solutions 


Hello are you sure about the endpoint ?

 

Do you have any logs into /var/log/php-fpm/centreon-error.log or into /var/log/centreon/sql-error.log ?

 

The code 42S02 usually means that a table doesnt exist into your database.

 

Is your 21.10 platform a fresh install or an upgrade ? If it is an upgrade what was your previous version ?


Hello Jérémy,

 

Thank you very much for your reply!

 

I don’t have any folder named /var/log/php-fpm/

As for /var/log/centreon/sql-error.log  i do have some logs but none appear when sending the request to the endpoint.

I did an upgrade to 21.10 from the version 20.10

 

For information, the API version 1 was working well. 

 

Thank you!


Could you check if the following tables exists in your configuration database (centreon by default)? 

 

provider_configuration

security_token

security_authentication_tokens


I’ve just checked and yes the tables exists in my centreon database

 

Do you think that upgrading centreon version could resolve the issue ? But I’m scared it can get things worse.


Reply