Cannot view docker token, database error - Sonatype Nexus Repository - Sonatype Community

Cannot view docker token, database error

post by turekg on Jun 19, 2024

Gabriella Turek

turekg

Users (including admin users) cannot view their token. Authentication seems to fail (message: You must authenticate successfully to access your token)

Nexus PRO 3.69.0-02

The nexus.log reports this error:

024-06-19 16:41:04,215+0200 WARN  [qtp1077871857-26321]  gturek org.sonatype.nexus.siesta.internal.UnexpectedExceptionMapper - (ID cec5c9b8-5410-4f56-a4a6-5095cbd4d421) Response: [500] 'ERROR: (ID cec5c9b8-5410-4f56-a4a6-5095cbd4d421) org.sonatype.nexus.datastore.api.DataAccessException:
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
### The error may exist in org/sonatype/nexus/internal/security/apikey/ApiKeyDAO.xml
### The error may involve org.sonatype.nexus.internal.security.apikey.ApiKeyDAO.save-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO api_key (primary_principal, domain, token, principals , created )         VALUES (?,                 ?, ?, ? , ? )     ON CONFLICT (primary_principal, domain, principals) DO UPDATE SET         token = ?, principals = ?,          created = ? ;
### Cause: org.postgresql.util.PSQLException: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification'; mapped from: org.sonatype.nexus.datastore.api.DataAccessException:
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
### The error may exist in org/sonatype/nexus/internal/security/apikey/ApiKeyDAO.xml
### The error may involve org.sonatype.nexus.internal.security.apikey.ApiKeyDAO.save-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO api_key (primary_principal, domain, token, principals , created )         VALUES (?,                 ?, ?, ? , ? )     ON CONFLICT (primary_principal, domain, principals) DO UPDATE SET         token = ?, principals = ?,          created = ? ;
### Cause: org.postgresql.util.PSQLException: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
org.sonatype.nexus.datastore.api.DataAccessException:
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
### The error may exist in org/sonatype/nexus/internal/security/apikey/ApiKeyDAO.xml
### The error may involve org.sonatype.nexus.internal.security.apikey.ApiKeyDAO.save-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO api_key (primary_principal, domain, token, principals , created )         VALUES (?,                 ?, ?, ? , ? )     ON CONFLICT (primary_principal, domain, principals) DO UPDATE SET         token = ?, principals = ?,          created = ? ;
### Cause: org.postgresql.util.PSQLException: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification

421 views

New & Unread Topics

Topic Replies Views Activity
S3 BLOB Creating failed. Nexus 3.88
Sonatype Nexus Repository
5 297 Jan 30
404 Error on Component Search in Nexus
Sonatype Nexus Repository
2 82 Oct 2025
Proxy of Harbor docker registry stopped working
Sonatype Nexus Repository
2 218 Nov 2025
Migrate nexus installation OSS to another server with nexus CE
Sonatype Nexus Repository
migrate
7 303 Oct 2025
Twine upload fails with “license-expression introduced in metadata version 2.4, not 2.3” for wheel uploaded to Nexus PyPI repo
Sonatype Nexus Repository
nexus, upload, pip, twine
2 180 May 6

Topic list, column headers with buttons are sortable.