# Single-node instance (for testing) sometimes already has a database

**URL:** https://forums.foundationdb.org/t/single-node-instance-for-testing-sometimes-already-has-a-database/4707
**Category:** Using FoundationDB
**Created:** [November 20, 2024, 5:09pm UTC](https://forums.foundationdb.org/t/single-node-instance-for-testing-sometimes-already-has-a-database/4707 "2024-11-20T17:09:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![janmejay](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/janmejay/32/1873_2.png) [@janmejay](https://forums.foundationdb.org/u/janmejay)
#### Post date: [November 20, 2024, 5:09pm UTC](https://forums.foundationdb.org/t/single-node-instance-for-testing-sometimes-already-has-a-database/4707/1 "2024-11-20T17:09:40Z")

</div>

I have a few tests that bring up `fdbserver` and then try to configure it using `configure new single memory`.

This succeeds most of the time, but sometimes fails because database already exists (the error suggests not using `new`), and `configure single memory` works.

I purge the directory every time the test finishes, so I don’t expect it to have any side-effects across runs. I did double-check to make sure I wasn’t talking to the `fdbserver` process I brought up for the previous run. So the question is:

- Is a newly started single-node `fdbserver -l public -p 127.0.0.1:4500` process sometimes supposed to have a database? (so is `configure new...` supposed to fail)?
- Is there something I have overlooked which leads to this state in my newly started process? Everything including cluster-file is in the directory that I purge after every run, successful or not.

Because this is a test, I run `configure single memory` when `configure new single memory` fails and this works reliably, but this hack doesn’t feel right.

---

<div class="post-metadata">

### Author: ![janmejay](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/janmejay/32/1873_2.png) [@janmejay](https://forums.foundationdb.org/u/janmejay)
#### Post date: [November 20, 2024, 5:10pm UTC](https://forums.foundationdb.org/t/single-node-instance-for-testing-sometimes-already-has-a-database/4707/2 "2024-11-20T17:10:13Z")

</div>

Also, this comment appears to suggest that configure may be necessary: [Error: The database is unavailable - #3 by ajbeamon](https://forums.foundationdb.org/t/error-the-database-is-unavailable/1928/3)
