# 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:

```auto
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](https://community.sonatype.com/t/s3-blob-creating-failed-nexus-3-88/15991)<br>[Sonatype Nexus Repository](https://community.sonatype.com/c/nexus-repository/6) | [5](https://community.sonatype.com/t/s3-blob-creating-failed-nexus-3-88/15991/1) | 297 | [Jan 30](https://community.sonatype.com/t/s3-blob-creating-failed-nexus-3-88/15991/6) |
| [404 Error on Component Search in Nexus](https://community.sonatype.com/t/404-error-on-component-search-in-nexus/15696)<br>[Sonatype Nexus Repository](https://community.sonatype.com/c/nexus-repository/6) | [2](https://community.sonatype.com/t/404-error-on-component-search-in-nexus/15696/1) | 82 | [Oct 2025](https://community.sonatype.com/t/404-error-on-component-search-in-nexus/15696/3) |
| [Proxy of Harbor docker registry stopped working](https://community.sonatype.com/t/proxy-of-harbor-docker-registry-stopped-working/15749)<br>[Sonatype Nexus Repository](https://community.sonatype.com/c/nexus-repository/6) | [2](https://community.sonatype.com/t/proxy-of-harbor-docker-registry-stopped-working/15749/1) | 218 | [Nov 2025](https://community.sonatype.com/t/proxy-of-harbor-docker-registry-stopped-working/15749/3) |
| [Migrate nexus installation OSS to another server with nexus CE](https://community.sonatype.com/t/migrate-nexus-installation-oss-to-another-server-with-nexus-ce/15668)<br>[Sonatype Nexus Repository](https://community.sonatype.com/c/nexus-repository/6) <br>[migrate](https://community.sonatype.com/tag/migrate) | [7](https://community.sonatype.com/t/migrate-nexus-installation-oss-to-another-server-with-nexus-ce/15668/1) | 303 | [Oct 2025](https://community.sonatype.com/t/migrate-nexus-installation-oss-to-another-server-with-nexus-ce/15668/8) |
| [Twine upload fails with “license-expression introduced in metadata version 2.4, not 2.3” for wheel uploaded to Nexus PyPI repo](https://community.sonatype.com/t/twine-upload-fails-with-license-expression-introduced-in-metadata-version-2-4-not-2-3-for-wheel-uploaded-to-nexus-pypi-repo/16220)<br>[Sonatype Nexus Repository](https://community.sonatype.com/c/nexus-repository/6) <br>[nexus](https://community.sonatype.com/tag/nexus), [upload](https://community.sonatype.com/tag/upload), [pip](https://community.sonatype.com/tag/pip), [twine](https://community.sonatype.com/tag/twine) | [2](https://community.sonatype.com/t/twine-upload-fails-with-license-expression-introduced-in-metadata-version-2-4-not-2-3-for-wheel-uploaded-to-nexus-pypi-repo/16220/1) | 180 | [May 6](https://community.sonatype.com/t/twine-upload-fails-with-license-expression-introduced-in-metadata-version-2-4-not-2-3-for-wheel-uploaded-to-nexus-pypi-repo/16220/3) |

Topic list, column headers with buttons are sortable.
