# Problems building Datasource Reflection Jobs from PostgreSQL database

**URL:** https://community.siren.io/t/problems-building-datasource-reflection-jobs-from-postgresql-database/136
**Category:** Watchers
**Created:** [October 15, 2019, 11:20am UTC](https://community.siren.io/t/problems-building-datasource-reflection-jobs-from-postgresql-database/136 "2019-10-15T11:20:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sireneer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/sireneer/32/87_2.png) [@sireneer](https://community.siren.io/u/sireneer)
#### Post date: [October 15, 2019, 11:20am UTC](https://community.siren.io/t/problems-building-datasource-reflection-jobs-from-postgresql-database/136/1 "2019-10-15T11:20:34Z")

</div>

Creating a new database reflection job pulling data from PostgreSQL I am running into an error on saving the job even if testing the query is positive.  
It says "  
`> blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];`  
"

Googling for the error I understood that low disk space can cause this error. Indeed I freed 130 GB now but still get this error and my previously working reflection job also stops with the same issue.

How can I make the index working again? As a newbie I would need quite a detailed help.

THANK YOU!

---

<div class="post-metadata">

### Author: ![Simon\_Danielczyk](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/simon_danielczyk/32/57_2.png) [@Simon\_Danielczyk](https://community.siren.io/u/Simon_Danielczyk)
#### Post date: [October 15, 2019, 11:36am UTC](https://community.siren.io/t/problems-building-datasource-reflection-jobs-from-postgresql-database/136/2 "2019-10-15T11:36:19Z")

</div>

Hi this error means that your elasticsearch went into read-only mode  
This happens automatically if you do not have enough free space (less than 5%) on your drive

To fix this you can tell elasticsearch to make the indices writable again by

```
curl -k -u admin:password \
-H'Content-Type: application/json' \
-XPUT https://localhost:9220/_settings \
-d '
{
"index": {
    "blocks": {
      "read_only_allow_delete": "false"
    }
  }
}'

```

To prevent this from happening in the future you can add the following to elasticsearch.yml file

```
cluster.routing.allocation.disk.threshold_enabled: false
cluster.routing.allocation.disk.watermark.low: 3gb
cluster.routing.allocation.disk.watermark.high: 2gb
cluster.routing.allocation.disk.watermark.flood_stage: 1gb

```

Cheers  
Simon

---

<div class="post-metadata">

### Author: ![sireneer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/sireneer/32/87_2.png) [@sireneer](https://community.siren.io/u/sireneer)
#### Post date: [October 15, 2019, 11:43am UTC](https://community.siren.io/t/problems-building-datasource-reflection-jobs-from-postgresql-database/136/3 "2019-10-15T11:43:36Z")

</div>

Many thanks! I will try.  
I thought ElasticSearch would come back OK after free disk space is available again.

---

<div class="post-metadata">

### Author: ![sireneer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/sireneer/32/87_2.png) [@sireneer](https://community.siren.io/u/sireneer)
#### Post date: [October 15, 2019, 2:51pm UTC](https://community.siren.io/t/problems-building-datasource-reflection-jobs-from-postgresql-database/136/4 "2019-10-15T14:51:54Z")

</div>

Hi Simon!  
This perfectly worked out!

At first I got an error `curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number`

The solution was to use `http` instead of `https`.

Again, many thanks for the quick response and totally helpful advice.
