Question

[Error 42S02] Centreon REST API v2/ Login Credientials {59099545}

  • 9 May 2023
  • 5 replies
  • 116 views

Badge +1

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!

 

 


5 replies

Badge +1

up! I still did not find any solutions 

Userlevel 3
Badge +4

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 ?

Badge +1

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!

Userlevel 3
Badge +4

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

 

provider_configuration

security_token

security_authentication_tokens

Badge +1

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