Cluster import error: get clients from db: unmarshal type

Have more questions? Submit a request

Applicable to:

  • SolusVM
  • SolusVM 2

 

Symptoms 

Client import: Server error: `GET https://135.148.68.177:8080/cluster-imports/solusvm1/clients?cursor=0&limit=250` resulted in a `500 Internal Server Error` response: {"message":"get clients from db: unmarshal type: json: cannot unmarshal number into Go value of type []string"}

Cause

Once the two-factor authentication (2FA) has been disabled for a user, the two-factor codes should be assigned an empty value rather than a value of 0.

MariaDB [8ej3WYSwfZGTMWt]> select clientid, twofactorcodes from clients;
+----------+----------------+
| clientid | twofactorcodes |
+----------+----------------+
| 11 | 0 |
| 2 | 0 |
| 8 | 0 |
| 10 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
+----------+----------------+

Resolution

 

The two-factor authentication codes can be set to empty by executing the query.

  1. Access the SolusVM master server via SSH.
  2. Create a backup of the database: 
    How to create a backup of SolusVM database?
  3. Access the database: 
    How to connect to SolusVM Master database
  4. Execute the query:
    MYSQL_LIN: update clients set twofactorcodes = "";

    Result:
    select clientid, twofactorcodes from clients;
    +----------+----------------+
    | clientid | twofactorcodes |
    +----------+----------------+
    | 11 | |
    | 2 | |
    | 8 | |
    | 10 | |
    | 12 | |
    | 13 | |
    | 14 | |
    +----------+----------------+

 

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.