# Unable to rollback the elasticsearch load

**URL:** <https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153>\
**Category:** Elasticsearch\
**Created:** [April 7, 2018, 5:50am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153 "2018-04-07T05:50:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 7, 2018, 5:50am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/1 "2018-04-07T05:50:31Z")

</div>

Hi we are using elastic on edx analytics and while running moduleengagementworkflowtask. I am very new to elasticsearch. can anyone help me with the below error.

2018-04-07 10:01:36,862 INFO 80774 [luigi-interface] worker.py:282 - [pid 80774] Worker Worker(salt=248926547, [host=analytics.lithan.com](http://host=analytics.lithan.com)  
, username=hadoop, pid=80774) running ModuleEngagementRosterIndexTask(source=('hdfs://localhost:9000/data/',), expand\_interval=2 days,  
0:00:00, pattern=('._tracking.log._',), date\_pattern=%Y%m%d, warehouse\_path=hdfs://localhost:9000/edx-analytics-pipeline/warehouse/, ho  
st=('[http://127.0.0.1:9200/](http://127.0.0.1:9200/)',), date=2018-04-07, obfuscate=False, scale\_factor=1, alias=roster, number\_of\_shards=3)  
2018-04-07 10:01:43,643 ERROR 80774 [edx.analytics.tasks.common.elasticsearch\_load] elasticsearch\_load.py:409 - Unable to rollback the e  
lasticsearch load.  
Traceback (most recent call last):  
File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/edx/analytics/tasks/common/elasticsearch\_load.py",  
line 406, in rollback  
if elasticsearch\_client.indices.exists(index=self.index):  
File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapp  
ed  
return func(\*args, params=params, \*\*kwargs)  
File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 224, in exi  
sts  
params=params)  
File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_  
request  
status, headers, data = connection.perform\_request(method, url, params, body, ignore=ignore, timeout=timeout)  
File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/connection/http\_urllib3.py", line 89  
, in perform\_request  
raise ConnectionError('N/A', str(e), e)  
ConnectionError: ConnectionError(\<urllib3.connection.HTTPConnection object at 0x7f84ec9e9050\>: Failed to establish a new connection: [Er  
rno 111] Connection refused) caused by: NewConnectionError(\<urllib3.connection.HTTPConnection object at 0x7f84ec9e9050\>: Failed to estab  
lish a new connection: [Errno 111] Connection refused)

I cannot connect to curl -XGET '[http://localhost:9200/\_status](http://localhost:9200/_status)'

sudo curl [http://localhost:9200](http://localhost:9200)  
curl: (7) Failed to connect to localhost port 9200: Connection refused

sudo vi /etc/elasticsearch/elasticsearch.yml

# Set the bind address specifically (IPv4 or IPv6):

# 

#network.bind\_host: 192.168.0.1

The service is running on Ubuntu 16.04  
lithanr@analytics:~$ sudo service elasticsearch status  
● elasticsearch.service - LSB: Starts elasticsearch  
Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)  
Active: active (exited) since Sat 2018-04-07 13:25:20 +08; 18min ago  
Docs: man:systemd-sysv-generator(8)  
Process: 49138 ExecStop=/etc/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)  
Process: 49188 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Apr 07 13:25:20 [analytics.lithan.com](http://analytics.lithan.com) systemd[1]: Stopped LSB: Starts elasticsearch.  
Apr 07 13:25:20 [analytics.lithan.com](http://analytics.lithan.com) systemd[1]: Starting LSB: Starts elasticsearch...  
Apr 07 13:25:20 [analytics.lithan.com](http://analytics.lithan.com) systemd[1]: Started LSB: Starts elasticsearch.

If I check the logs in /var/log/elasticsearch the logs are not getting updated. Can anybody help me enable the logs.

This is my /etc/elasticsearch/logging.yml

sudo vi /etc/elasticsearch/logging.yml

# you can override this using by setting a system property, for example -Des.logger.level=DEBUG

es.logger.level: INFO  
rootLogger: ${es.logger.level}, console, file  
logger:

# log action execution errors for easier debugging

action: DEBUG

# reduce the logging for aws, too much is logged under the default INFO

com.amazonaws: WARN  
org.apache.http: INFO

# gateway

#gateway: DEBUG  
#index.gateway: DEBUG

# peer shard recovery

#indices.recovery: DEBUG

# discovery

#discovery: TRACE

index.search.slowlog: TRACE, index\_search\_slow\_log\_file  
index.indexing.slowlog: TRACE, index\_indexing\_slow\_log\_file

additivity:  
index.search.slowlog: false  
index.indexing.slowlog: false

appender:  
console:  
type: console  
layout:  
type: consolePattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

file:  
type: dailyRollingFile  
file: ${path.logs}/${cluster.name}.log  
datePattern: "'.'yyyy-MM-dd"  
layout:  
type: pattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

# Use the following log4j-extras RollingFileAppender to enable gzip compression of log files.

# For more information see [https://logging.apache.org/log4j/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html](https://logging.apache.org/log4j/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html)

#file:  
#type: extrasRollingFile  
#file: ${path.logs}/${cluster.name}.log  
#rollingPolicy: timeBased  
#rollingPolicy.FileNamePattern: ${path.logs}/${cluster.name}.log.%d{yyyy-MM-dd}.gz  
#layout:  
#type: pattern  
#conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

index\_search\_slow\_log\_file:  
type: dailyRollingFile  
file: ${path.logs}/${cluster.name}\_index\_search\_slowlog.log  
datePattern: "'.'yyyy-MM-dd"  
layout:  
type: pattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

index\_indexing\_slow\_log\_file:  
type: dailyRollingFile  
file: ${path.logs}/${cluster.name}\_index\_indexing\_slowlog.log  
datePattern: "'.'yyyy-MM-dd"  
layout:  
type: pattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

I first need to enable the logs. can anyone help?

---

<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:** [April 8, 2018, 5:16am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/2 "2018-04-08T05:16:05Z")

</div>

It's very difficult to follow your post due to the lack of formatting, please use the `</>` button, or markdown style back ticks, to properly mark the config and logs etc.

> [@nevilleonline](#):
>
> edx analytics

> [@nevilleonline](#):
>
> moduleengagementworkflowtask

What actually are these things you are referring to?

---

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 8, 2018, 12:50pm UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/3 "2018-04-08T12:50:28Z")

</div>

Hi we are using elastic on edx analytics and while running moduleengagementworkflowtask. edx is a learning management system which has its analytics part .This uses elasticsearch to find learner data and puts it in mysql database. moduleengagementworkflowtask is the name of the task that actually does it.I am very new to elasticsearch. can anyone help me with the below error.

```
2018-04-07 10:01:36,862 INFO 80774 [luigi-interface] worker.py:282 - [pid 80774] Worker Worker(salt=248926547, host=analytics.lithan.com
, username=hadoop, pid=80774) running ModuleEngagementRosterIndexTask(source=('hdfs://localhost:9000/data/',), expand_interval=2 days,
 0:00:00, pattern=('.*tracking.log.*',), date_pattern=%Y%m%d, warehouse_path=hdfs://localhost:9000/edx-analytics-pipeline/warehouse/, ho
st=('http://127.0.0.1:9200/',), date=2018-04-07, obfuscate=False, scale_factor=1, alias=roster, number_of_shards=3)
2018-04-07 10:01:43,643 ERROR 80774 [edx.analytics.tasks.common.elasticsearch_load] elasticsearch_load.py:409 - Unable to rollback the e
lasticsearch load.
Traceback (most recent call last):
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/edx/analytics/tasks/common/elasticsearch_load.py",
 line 406, in rollback
    if elasticsearch_client.indices.exists(index=self.index):
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapp
ed
    return func(*args, params=params, **kwargs)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 224, in exi
sts
    params=params)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_
request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 89
, in perform_request
    raise ConnectionError('N/A', str(e), e)
ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f84ec9e9050>: Failed to establish a new connection: [Er
rno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f84ec9e9050>: Failed to estab
lish a new connection: [Errno 111] Connection refused)

```

I cannot connect to curl -XGET '[http://localhost:9200/\_status](http://localhost:9200/_status)'

```
 sudo curl http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused

sudo vi /etc/elasticsearch/elasticsearch.yml
# Set the bind address specifically (IPv4 or IPv6):
#
#network.bind_host: 192.168.0.1

```

The service is running on Ubuntu 16.04  
$ sudo service elasticsearch status  
● elasticsearch.service - LSB: Starts elasticsearch  
Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)  
Active: active (exited) since Sat 2018-04-07 13:25:20 +08; 18min ago  
Docs: man:systemd-sysv-generator(8)  
Process: 49138 ExecStop=/etc/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)  
Process: 49188 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

```
    Apr 07 13:25:20 analytics.lithan.com systemd[1]: Stopped LSB: Starts elasticsearch.
    Apr 07 13:25:20 analytics.lithan.com systemd[1]: Starting LSB: Starts elasticsearch...
    Apr 07 13:25:20 analytics.lithan.com systemd[1]: Started LSB: Starts elasticsearch.

```

If I check the logs in /var/log/elasticsearch the logs are not getting updated. Can anybody help me enable the logs.

This is my /etc/elasticsearch/logging.yml

```
sudo vi /etc/elasticsearch/logging.yml
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
  # log action execution errors for easier debugging
  action: DEBUG
  # reduce the logging for aws, too much is logged under the default INFO
  com.amazonaws: WARN
  org.apache.http: INFO

  # gateway
  #gateway: DEBUG
  #index.gateway: DEBUG

  # peer shard recovery
  #indices.recovery: DEBUG

  # discovery
  #discovery: TRACE

  index.search.slowlog: TRACE, index_search_slow_log_file
  index.indexing.slowlog: TRACE, index_indexing_slow_log_file

additivity:
  index.search.slowlog: false
  index.indexing.slowlog: false

appender:
  console:
    type: console
    layout:
      type: consolePattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}.log
    datePattern: "'.'yyyy-MM-dd"
 layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  # Use the following log4j-extras RollingFileAppender to enable gzip compression of log files.
  # For more information see https://logging.apache.org/log4j/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html
  #file:
    #type: extrasRollingFile
    #file: ${path.logs}/${cluster.name}.log
    #rollingPolicy: timeBased
    #rollingPolicy.FileNamePattern: ${path.logs}/${cluster.name}.log.%d{yyyy-MM-dd}.gz
    #layout:
      #type: pattern
      #conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  index_search_slow_log_file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}_index_search_slowlog.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  index_indexing_slow_log_file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}_index_indexing_slowlog.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

```

I first need to enable the logs. can anyone help?

---

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 9, 2018, 11:26am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/5 "2018-04-09T11:26:00Z")

</div>

Here is how I have installed this on my Azure VM. The version is important to make it work.

```
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
sudo sh -c 'echo "deb http://packages.elasticsearch.org/elasticsearch/0.90/debian stable main" > /etc/apt/sources.list.d/elasticsearch.list'
sudo apt update
sudo apt install elasticsearch=0.90.13 openjdk-8-jdk

```

I just need to understand how to check why the connection is refused and which logs to check because the logs in /var/log/elasticsearch haven't updated in a long time.

---

<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:** [April 9, 2018, 10:16pm UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/6 "2018-04-09T22:16:36Z")

</div>

> [@nevilleonline](#):
>
> The version is important to make it work

That version was released 5 years ago and is no longer supported.  
I also don't think it would work with java 8 anyway.

---

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 10, 2018, 10:01am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/7 "2018-04-10T10:01:30Z")

</div>

Thanks Mark,

I got past the connection error. Now I am getting another error.

```
2018-04-10 10:02:56,630 ERROR 91368 [luigi-interface] worker.py:304 - [pid 91368] Worker Worker(salt=472382316, host=analyti
cs.lithan.com, username=hadoop, pid=91368) failed ModuleEngagementRosterIndexTask(source=('hdfs://localhost:9000/data/',)
, expand_interval=2 days, 0:00:00, pattern=('.*tracking.log.*',), date_pattern=%Y%m%d, warehouse_path=hdfs://localhost:9000/
edx-analytics-pipeline/warehouse/, host=('http://127.0.0.1:9200/',), date=2018-04-10, obfuscate=False, scale_factor=1, alias
=roster, number_of_shards=3)
Traceback (most recent call last):
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/luigi/worker.py", line 292, in _run_ta
sk
    task.run()
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/edx/analytics/tasks/common/elasticsear
ch_load.py", line 413, in run
    super(ElasticsearchIndexTask, self).run()
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/luigi/hadoop.py", line 611, in run
    self.init_local()
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/edx/analytics/tasks/common/elasticsear
ch_load.py", line 130, in init_local
    aliases = elasticsearch_client.indices.get_aliases(name=self.alias)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 6
9, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line
 447, in get_aliases
    '_aliases', name), params=params)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307,
 in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.
py", line 93, in perform_request
    self._raise_error(response.status, raw_data)
  File "/var/lib/analytics-tasks/analyticstack/venv/local/lib/python2.7/site-packages/elasticsearch/connection/base.py", lin
e 105, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
RequestError: TransportError(400, u'No handler found for uri [/_aliases/roster] and method [GET]')

```

Is there a solution this problem?

```
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
    RequestError: TransportError(400, u'No handler found for uri [/_aliases/roster] and method [GET]')

```

Also can you tell me which version is most stable with very little bugs?

---

<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:** [April 10, 2018, 10:31am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/8 "2018-04-10T10:31:23Z")

</div>

The latest version is 6.2.3, we'd recommend that.

---

<div class="post-metadata">

**Author:** ![nevilleonline](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nevilleonline](https://discuss.elastic.co/u/nevilleonline)\
**Post date:** [April 10, 2018, 10:42am UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/9 "2018-04-10T10:42:24Z")

</div>

Any input on the error Mark?

---

<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:** [April 10, 2018, 8:05pm UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/10 "2018-04-10T20:05:39Z")

</div>

No sorry.

---

<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:** [May 8, 2018, 8:05pm UTC](https://discuss.elastic.co/t/unable-to-rollback-the-elasticsearch-load/127153/11 "2018-05-08T20:05:46Z")

</div>

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