# Query not working in different environments

**URL:** <https://discuss.elastic.co/t/query-not-working-in-different-environments/245609>\
**Category:** Elasticsearch\
**Created:** [August 19, 2020, 1:28pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609 "2020-08-19T13:28:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [August 19, 2020, 1:28pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609/1 "2020-08-19T13:28:32Z")

</div>

I have an elastic instance running in the cloud. I'm developing a REST service in Node. The same elastic instance is used when Node is in `localhost` and when is in `develop` env. When Node runs in `localhost` all queries work, `POST` and `GET`. When Node runs in `develop` in the cloud, only `POST` work and all `GET` doesn't work.

I don't understand what's might be going on or even where to start troubleshooting. My instinct says that is some setting in elastic that I need to tweak. Any thoughts?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 19, 2020, 11:06pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609/2 "2020-08-19T23:06:43Z")

</div>

> [@gdiaz](#):
>
> only `POST` work and all `GET` doesn't work.

What does that mean, are you seeing an error, what is the error? What is the request?

---

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [August 19, 2020, 11:25pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609/3 "2020-08-19T23:25:54Z")

</div>

There is no error at all. When the Node server runs on localhost all `GET` returns data from elastic, when Node server runs on aws all `GET` returns `buckets: []`. Both Node are using the same elastic instance.

Node in AWS

```auto
    "aggregations": {
        "last_week": {
            "buckets": []
        }
    }

```

Node in localhost

```auto
    "aggregations": {
        "last_week": {
            "buckets": [
                {
                    "key_as_string": "2020-08-01T00:00:00.000Z",
                    "key": 1596240000000,
                    "doc_count": 8
                }
            ]
        }
    }

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 19, 2020, 11:29pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609/4 "2020-08-19T23:29:08Z")

</div>

Perhaps you can share the query that is running.

---

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [September 13, 2020, 7:07pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609/5 "2020-09-13T19:07:09Z")

</div>

I turns out that our devops team had a bug on their code that was not pushing the most resent branch to the environment. I think I can close this question.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 11, 2020, 7:07pm UTC](https://discuss.elastic.co/t/query-not-working-in-different-environments/245609/6 "2020-10-11T19:07:14Z")

</div>

Closed on October 11, 2020, 7:07pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
