# Influxdb: database not found telegraf:connection refused

**URL:** <https://community.influxdata.com/t/influxdb-database-not-found-telegraf-connection-refused/17543>\
**Category:** InfluxDB 2\
**Tags:** influxdb, telegraf, windows\
**Created:** [January 8, 2021, 9:48pm UTC](https://community.influxdata.com/t/influxdb-database-not-found-telegraf-connection-refused/17543 "2021-01-08T21:48:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeivdSarria](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/deivdsarria/32/6375_2.png) [@DeivdSarria](https://community.influxdata.com/u/DeivdSarria)\
**Post date:** [January 8, 2021, 9:48pm UTC](https://community.influxdata.com/t/influxdb-database-not-found-telegraf-connection-refused/17543/1 "2021-01-08T21:48:10Z")

</div>

Hi guys,  
I’m new in this, and i have two big problems.

I configuration my influxdb in docker but when i need write metrics in my BBDD, influxdb show me the next error:

` ts=2021-01-08T21:37:10.019605Z lvl=info msg="failed to store statistics" log_id=0R_zI6OW000 service=monitor error="database not found: _internal"`

`ts=2021-01-08T21:37:20.028249Z lvl=info msg="Failed to create storage" log_id=0R_zI6OW000 service=monitor db_instance=_internal error="rename /var/lib/influxdb/meta/meta.dbtmp /var/lib/influxdb/meta/meta.db: device or resource busy"`

`ts=2021-01-08T21:37:20.028613Z lvl=info msg="failed to store statistics" log_id=0R_zI6OW000 service=monitor error="database not found: _internal"`

I know, it is very difficult for you to determine what my problem may be but I do not understand what is wrong. My .conf file:

```
[shard]
  store-enabled = true
  store-database = "mybbdd"
  store-interval = "10s"

```

my other problem is with the connection between influxdb and telegraf.

```
`2021-01-08T21:44:25Z E! [agent] Error writing to outputs.influxdb: could not write any address`

`2021-01-08T21:44:35Z E! [outputs.influxdb] When writing to [http://127.0.0.1:8086]: Post "http://127.0.0.1:8086/write?db=mybbdd": dial tcp 127.0.0.1:8086: connect: connection refused`

```

.conf file:

` urls = ["http://127.0.0.1:8086"]`

```
  ## HTTP Basic Auth
    username = "admin"
    password = "admin123"

```

` database = "mybbdd"`

```
  ## HTTP User-Agent
   user_agent = "telegraf"

```

Thank you! Regards, and i appreciate any help.

PS: Sorry for my english xD

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [October 19, 2021, 3:07pm UTC](https://community.influxdata.com/t/influxdb-database-not-found-telegraf-connection-refused/17543/2 "2021-10-19T15:07:30Z")

</div>

Hello @DeivdSarria,  
Have you set up your bbdd database before trying to write to it?  
What does your docker compose look like?  
Have you tried using:

> **[GitHub - influxdata/sandbox: A sandbox for the full TICK stack](https://github.com/influxdata/sandbox)**
>
> A sandbox for the full TICK stack. Contribute to influxdata/sandbox development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![agustinprieto-contab](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/agustinprieto-contab/32/9808_2.png) [@agustinprieto-contab](https://community.influxdata.com/u/agustinprieto-contab)\
**Post date:** [March 31, 2022, 8:25pm UTC](https://community.influxdata.com/t/influxdb-database-not-found-telegraf-connection-refused/17543/3 "2022-03-31T20:25:44Z")

</div>

Can you resolved your problem? I need help to inderstand the diagram of telegraf with influxDB
