ERROR: column "issued_at" of relation "certificates" does not exist at character 121
Opened this issue · 3 comments
Hi,
I followed your instructions but when I try to create a certificate I get the above error.
Maybe you can help and point me in the right direction.
Regards,
Ronald
2021/01/17 23:13:42 [INFO] signature request received
2021/01/17 23:13:42 [INFO] signed certificate with serial number 245109129169722608011595148089762604743485473113
2021-01-17 23:13:42.353 UTC [367] ERROR: column "issued_at" of relation "certificates" does not exist at character 121
2021-01-17 23:13:42.353 UTC [367] STATEMENT:
INSERT INTO certificates (serial_number, authority_key_identifier, ca_label, status, reason, expiry, revoked_at, pem,
issued_at, not_before, metadata, sans, common_name)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8,
$9, $10, $11, $12, $13);
2021/01/17 23:13:42 [WARNING] failed to sign request: {"code":11000,"message":"pq: column "issued_at" of relation "certificates" does not exist"}
2021/01/17 23:13:42 [INFO] [::1]:54164 - "POST /api/v1/cfssl/sign" 11000
[2021-01-17 23:13:42,356] ERROR in service: {'message': 'Exception minting certificate', 'issuer': 'DCSL-ROOT-CA', 'cn': 'pacific-vcsa.dcsl.local'}
Traceback (most recent call last):
Based on the error it looks like something either happened during the initial DB migration or it got corrupted somehow. If this is a new install, the easiest thing to do is probably to just delete the Postgres data folder and restart the container which should reinitialize the DB.
Thank you for your quick response. I already deleted the volume / PVC but have the same problem after the data volume is populated. I'm running the container on k3s / raspberry pi . How is the initial db populated / created?
After the database was populated took a look in the database but the column is not there. I also ran "lemur db drop_all" and "lemur db create" but still missing the column in the table:
select * from certificates;
id | external_id | owner | name | description | notify | body | chain | csr | private_key | issuer | serial | cn | deleted | dns_provider_id | not_before | not_after | date_created | signing_algorithm | status | bits | san | rotation | user_id | authority_id | root_authority_id | rotation_policy_id | key_type
----+-------------+-------+------+-------------+--------+------+-------+-----+-------------+--------+--------+----+---------+-----------------+------------+-----------+--------------+-------------------+--------+------+-----+----------+---------+--------------+-------------------+--------------------+----------