# CRIT Exiting: Could not start registrar: Error loading state: Error decoding states: json: cannot unmarshal object into Go value of type \[\]file

**URL:** https://discuss.elastic.co/t/crit-exiting-could-not-start-registrar-error-loading-state-error-decoding-states-json-cannot-unmarshal-object-into-go-value-of-type-file/108887
**Category:** Beats
**Created:** [November 23, 2017, 12:47pm UTC](https://discuss.elastic.co/t/crit-exiting-could-not-start-registrar-error-loading-state-error-decoding-states-json-cannot-unmarshal-object-into-go-value-of-type-file/108887 "2017-11-23T12:47:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Montgomery](https://discuss.elastic.co/u/David_Montgomery)
#### Post date: [November 23, 2017, 12:47pm UTC](https://discuss.elastic.co/t/crit-exiting-could-not-start-registrar-error-loading-state-error-decoding-states-json-cannot-unmarshal-object-into-go-value-of-type-file/108887/1 "2017-11-23T12:47:35Z")

</div>

Why? Writing to log to AWS Es as a service. ES..whats the deal? What does that mean? How do I ship to ES using file beat on 16.04?

filebeat:  
prospectors:  
-  
paths:  
- "/tmp/upload.log"  
- "/var/log/nginx/access.log"  
- "/var/log/nginx/error.log"  
- "/tmp/upload\_server\_bottle.log"  
fields:  
type: log  
exclude\_lines: ["^._ELB-HealthChecker._$"]  
output.elasticsearch:  
hosts: ["[https://vpc-es.eu-central-1.es.amazonaws.com:443](https://vpc-es.eu-central-1.es.amazonaws.com:443)"]  
protocol: "https"

12Z INFO Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]  
2017-11-23T12:43:12Z INFO Beat UUID: 3b490c5b-a242-4431-bf12-390b11ced166  
2017-11-23T12:43:12Z INFO Metrics logging every 30s  
2017-11-23T12:43:12Z INFO Setup Beat: filebeat; Version: 6.0.0  
2017-11-23T12:43:12Z INFO Elasticsearch url: [https://vpc-es-zen-aws-prod-fmm-logs-xpugakhxsixbsvbsq4hzqrca3q.eu-central-1.es.amazonaws.com:443](https://vpc-es-zen-aws-prod-fmm-logs-xpugakhxsixbsvbsq4hzqrca3q.eu-central-1.es.amazonaws.com:443)  
2017-11-23T12:43:12Z INFO Beat name: upload-fmm-10mvvdn  
2017-11-23T12:43:12Z INFO filebeat start running.  
2017-11-23T12:43:12Z INFO Registry file set to: /var/lib/filebeat/registry  
2017-11-23T12:43:12Z INFO Loading registrar data from /var/lib/filebeat/registry  
2017-11-23T12:43:12Z INFO Total non-zero values: beat.memstats.gc\_next=4473924 beat.memstats.memory\_alloc=3334312 beat.memstats.memory\_total=3334312 filebeat.harvester.open\_files=0 filebeat.harvester.running=0 libbeat.config.module.running=0 libbeat.output.type$  
2017-11-23T12:43:12Z INFO Uptime: 7.810057ms  
2017-11-23T12:43:12Z INFO filebeat stopped.  
2017-11-23T12:43:12Z CRIT Exiting: Could not start registrar: Error loading state: Error decoding states: json: cannot unmarshal object into Go value of type []file.State

---

<div class="post-metadata">

### Author: ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)
#### Post date: [November 23, 2017, 8:38pm UTC](https://discuss.elastic.co/t/crit-exiting-could-not-start-registrar-error-loading-state-error-decoding-states-json-cannot-unmarshal-object-into-go-value-of-type-file/108887/2 "2017-11-23T20:38:58Z")

</div>

Hello,

There is a few things I can see from this output.

```auto
2017-11-23T12:43:12Z CRIT Exiting: Could not start registrar: Error loading state: Error decoding states: json: cannot unmarshal object into Go value of type []file.State

```

I think there is either a problem with the content of the registrar or a permission issue and the error is hidden somehow. Can you add to this issue the output of the following command:

```auto
 cat /var/lib/filebeat/registry

```

Also, I haven't tried it. But I believe AWS Elasticsearch **always requires signing request?** , but Filebeat currently doesn't support that.

There is a few related discussion here:

- [https://github.com/elastic/beats/pull/5466#issuecomment-340450460](https://github.com/elastic/beats/pull/5466#issuecomment-340450460)
- [How to connect beats to AWS elasticsearch with authentication](https://discuss.elastic.co/t/how-to-connect-beats-to-aws-elasticsearch-with-authentication/83465/2?u=pierhugues)

Thanks

---

<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: [December 14, 2017, 12:47pm UTC](https://discuss.elastic.co/t/crit-exiting-could-not-start-registrar-error-loading-state-error-decoding-states-json-cannot-unmarshal-object-into-go-value-of-type-file/108887/3 "2017-12-14T12:47:55Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
