This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-17. For the latest, interactive version please visit https://mariadb.com/kb/.

Error "Invalid padding bytes." when adding node to cluster

During the installation of mariadb columnstore, when I try to add replica node to cluster, it errors saying "Config distribution isn't successful.". When I check the logs, I see this errors where some encryption/decryption related py function shows "Invalid padding bytes." Due to this errors, the node cannot be added to cluster. How can I fix this error? Please help.

28/Apr/2023 08:18:03 [ERROR] (cherrypy.error.140163594543760) [28/Apr/2023:08:18:03] HTTP 
Traceback (most recent call last):
  File "/usr/share/columnstore/cmapi/deps/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/share/columnstore/cmapi/deps/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/share/columnstore/cmapi/deps/cherrypy/lib/encoding.py", line 223, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/share/columnstore/cmapi/deps/cherrypy/lib/jsontools.py", line 59, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/usr/share/columnstore/cmapi/deps/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/columnstore/cmapi/cmapi_server/controllers/endpoints.py", line 375, in put_config
    ready, retry = system_ready(mcs_config_filename)
  File "/usr/share/columnstore/cmapi/cmapi_server/helpers.py", line 677, in system_ready
    host, port, username, password = get_cej_info(root)
  File "/usr/share/columnstore/cmapi/cmapi_server/helpers.py", line 661, in get_cej_info
    cej_password = CEJPasswordHandler.decrypt_password(cej_password)
  File "/usr/share/columnstore/cmapi/cmapi_server/handlers/cej.py", line 117, in decrypt_password
    unpadder.update(padded_passwd_bytes) + unpadder.finalize()
  File "/usr/share/columnstore/cmapi/deps/cryptography/hazmat/primitives/padding.py", line 160, in finalize
    self._buffer, self.block_size, check_pkcs7_padding
  File "/usr/share/columnstore/cmapi/deps/cryptography/hazmat/primitives/padding.py", line 101, in _byte_unpadding_check
    raise ValueError("Invalid padding bytes.")
ValueError: Invalid padding bytes.
28/Apr/2023 08:18:03 [INFO] (cherrypy.error.140163594543760) [28/Apr/2023:08:18:03] HTTP 
Request Headers:
  Remote-Addr: 172.31.19.42
  HOST: 172.31.16.255:8640
  USER-AGENT: python-requests/2.27.1
  ACCEPT-ENCODING: gzip, deflate
  ACCEPT: */*
  CONNECTION: keep-alive
  X-API-KEY: '49632f12d5af8a13c9b5f7e12c909e76e0ae94b4bbda7e51ffc6eb6e16383ce5'
  Content-Type: application/json
  Content-Length: 18500
28/Apr/2023 08:18:03 [INFO] (cherrypy.access.140163594543760) 172.31.19.42 ACCESS "PUT /cmapi/0.4.0/node/config HTTP/1.1" code 500, bytes 513, user-agent "python-requests/2.27.1"
28/Apr/2023 08:18:04 [INFO] (cherrypy.access.140163594543760) 172.31.19.42 ACCESS "PUT /cmapi/0.4.0/node/rollback HTTP/1.1" code 200, bytes 43, user-agent "python-requests/2.27.1"
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.