# "Unable to create catalog entry" on deploy?

**URL:** <https://forum.datomic.com/t/unable-to-create-catalog-entry-on-deploy/2113>\
**Category:** Troubleshooting\
**Created:** [August 19, 2022, 8:16pm UTC](https://forum.datomic.com/t/unable-to-create-catalog-entry-on-deploy/2113 "2022-08-19T20:16:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daemianmack](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/daemianmack/32/166_2.png) [@daemianmack](https://forum.datomic.com/u/daemianmack)\
**Post date:** [August 19, 2022, 8:16pm UTC](https://forum.datomic.com/t/unable-to-create-catalog-entry-on-deploy/2113/1 "2022-08-19T20:16:38Z")

</div>

Hey there! On a recent deploy we encountered something strange we’d like to understand better.

We’re using Ions, and our system uses a startup sequence that involves  
calling `datomic.client.api/create-database` to ensure the database exists.

Today that codepath errored out on post-deploy startup with the following Cloudwatch error…

```auto
{"CognitectAnomaliesCategory": "CognitectAnomaliesFault",
 "DatomicCloudAwsAnomaliesError": {"Error": "Unable to create catalog entry",
                                   "Cause": {"Conflict":true}},
 "Msg": "Server Error",
 "Type": "Alert",
 "Tid":138,
 "Timestamp":1660929768805}

```

This was repeated in the logs as an `IonLambdaException` at irregular  
intervals thereafter, roughly 25 times over the next 15 minutes.

Possibly related: just after the deploy printed its “SUCCEEDED”  
routine to the console, I had created an AWS Eventbridge rule that  
issues a request to a Lambda every minute.

The database in question already existed and was not new.

The error messages went away when I deployed HEAD~1, and when I  
re-deployed HEAD after 20-30 minutes of troubleshooting, the error  
messages did not come back.

It seems unlikely we’d need to worry about coordinating access to a  
system during deployment, but the above seems to raise the question.

Datomic Cloud version: 781-9041.

---

<div class="post-metadata">

**Author:** ![jaret](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/jaret/32/45_2.png) [@jaret](https://forum.datomic.com/u/jaret)\
**Post date:** [September 12, 2022, 3:33pm UTC](https://forum.datomic.com/t/unable-to-create-catalog-entry-on-deploy/2113/2 "2022-09-12T15:33:07Z")

</div>

Hey @daemianmack long time no see!

Sorry for the late reply. The error you encountered can be thrown when a database already exists in the catalog, but also in instances where there is a bad connection to the client such as a corrupt config. You should not need to worry about coordinating access to a system during deploy.

I think the bigger concern your description raises for me is why are you using `create-database` in your startup sequence? If this is just a check to see that the DB is there, have you explored using `list-databases`? I am concerned that this approach might create empty DBs or be prone to other problems. But perhaps you have a specific reason for calling that I am missing.
