# Trouble connecting CrateDB with Grafana - Stuck on testing connection

**URL:** <https://community.cratedb.com/t/trouble-connecting-cratedb-with-grafana-stuck-on-testing-connection/872>\
**Category:** 3rd Party Tools\
**Created:** [October 29, 2021, 9:07am UTC](https://community.cratedb.com/t/trouble-connecting-cratedb-with-grafana-stuck-on-testing-connection/872 "2021-10-29T09:07:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubhabrata\_sen](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/shubhabrata_sen/32/418_2.png) [@shubhabrata\_sen](https://community.cratedb.com/u/shubhabrata_sen)\
**Post date:** [October 29, 2021, 9:07am UTC](https://community.cratedb.com/t/trouble-connecting-cratedb-with-grafana-stuck-on-testing-connection/872/1 "2021-10-29T09:07:49Z")

</div>

Hi,

I’ve deployed Grafana and Cratedb in Kubernetes and am trying to add cratedb as a data source in Grafana with the steps mentioned here [Visualizing time series data with Grafana and CrateDB](https://crate.io/blog/visualizing-time-series-data-with-grafana-and-cratedb). However, when I do the “save and test” function on Grafana, it just keeps waiting on the “testing” phase and doesn’t proceed. What could be causing this problem ? Both Grafana and Cratedb are running on the same network.

Thank you

---

<div class="post-metadata">

**Author:** ![jayeff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/jayeff/32/271_2.png) [@jayeff](https://community.cratedb.com/u/jayeff)\
**Post date:** [October 29, 2021, 9:21am UTC](https://community.cratedb.com/t/trouble-connecting-cratedb-with-grafana-stuck-on-testing-connection/872/2 "2021-10-29T09:21:18Z")

</div>

Hi @shubhabrata_sen,

some potential pointers:

- verify the two pods can see each other by pinging from Grafana pod to CrateDB (you mention they are in the same network but test that it works as expected)
- did you create a user for Grafana in CrateDB and does it have sufficient [privileges](https://crate.io/docs/crate/reference/en/latest/admin/privileges.html)?
- do not use the `crate` user as it’s done in the blog post. `crate` superuser is restricted to local access
- potentially check Grafana log files. maybe some information can be found there

If this does not help can you please share your Postgres Connection configuration from Grafana with us?

---

<div class="post-metadata">

**Author:** ![shubhabrata\_sen](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/shubhabrata_sen/32/418_2.png) [@shubhabrata\_sen](https://community.cratedb.com/u/shubhabrata_sen)\
**Post date:** [October 29, 2021, 9:57am UTC](https://community.cratedb.com/t/trouble-connecting-cratedb-with-grafana-stuck-on-testing-connection/872/3 "2021-10-29T09:57:26Z")

</div>

Hi @jayeff ,

Thank you for your prompt response. It was a minor oversight from me. I was using the port mapped to access the admin UI for crateDB in the connection string instead of the postgres port. Things are working properly now 🙂 . Wish you a great day ahead !!
