# Web page unable to render - nfl-elastic-aggregations blog (D3-ES)

**URL:** <https://discuss.elastic.co/t/web-page-unable-to-render-nfl-elastic-aggregations-blog-d3-es/20821>\
**Category:** Elasticsearch\
**Created:** [November 18, 2014, 10:45pm UTC](https://discuss.elastic.co/t/web-page-unable-to-render-nfl-elastic-aggregations-blog-d3-es/20821 "2014-11-18T22:45:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [November 18, 2014, 10:45pm UTC](https://discuss.elastic.co/t/web-page-unable-to-render-nfl-elastic-aggregations-blog-d3-es/20821/1 "2014-11-18T22:45:14Z")

</div>

Attempting to work my way through the article at

> **[Data visualization with Elasticsearch aggregations and D3
	  	 | Elastic](https://www.elastic.co/blog/data-visualization-elasticsearch-aggregations)**
>
> Update November 2, 2015: Please note that facets are not supported in Elasticsearch 2.0+. For those of you familiar with Elasticsearch, you know that its an amazing modern, scalable, full-text search ...

Although the blog article was written for ES 1.0, I am attempting to run on  
current stable ES 1.4.  
Skimming the commands, I don't see anything I think should be an issue  
between the two ES versions, and I haven't located anything in the code  
that specifies an ES version.

_Main attempt:_  
Install ES 1.4 (single node in the cluster for this exercise).  
Successfully created the ES index and mappings, and loaded data into ES  
using the described commands

curl -XPOST localhost:9200/nfl?pretty  
curl -XPUT localhost:9200/nfl/2013/\_mapping?pretty -d @nfl\_mapping.json  
curl -XPOST localhost:9200/nfl/2013/\_bulk?pretty --data-binary  
@nfl\_2013.json

Besides visually seeing results, I can also run the first two curl commands  
with XGET instead of XPOST and XPUT with favorable results.

First anomaly I ran into is that the projects links point to a package  
"elasticsearch.js.zip" which contains a number of angular and other scripts  
rather than a single "elasticsearch.js" file. So, my first attempt was to  
unzip the package and place it in a directory "elasticsearch.js" but that  
continued to cause errors.

_Secondary attempt:_  
Unable to determine correct deployment of elasticsearch.js (there are a  
number of ad hoc possibiliites) I instead downloaded the project from  
github ([https://github.com/stormpython/nfl-elastic-aggregations](https://github.com/stormpython/nfl-elastic-aggregations)), with the  
assumption that the files and website structure should be pre-configured to  
work.

The cloned github project indeed included an elasticsearch.js file instead  
of an elasticsearch.js directory containing individual scripts.  
However, when I deployed the files and index.html, the website page  
continues to display as empty with numerous errors relating to cross domain  
connections and search, the critical error follows

mutating the [[Prototype]] of an object will cause your code to run very  
slowly; instead create the object with the correct initial [[Prototype]]  
value using Object.create d3.v3.js:479  
_Cross-Origin Request Blocked_: The Same Origin Policy disallows reading  
the remote resource at [http://localhost:9200/nfl/\_search?size=5](http://localhost:9200/nfl/_search?size=5). This can  
be fixed by moving the resource to the same domain or enabling CORS. \_search  
"ERROR: 2014-11-18T22:39:20Z

[26]\</Log.prototype.error@[http://localhost/scripts/elasticsearch.js:19151:56](http://localhost/scripts/elasticsearch.js:19151:56)  
checkRespForFailure@[http://localhost/scripts/elasticsearch.js:19817:9](http://localhost/scripts/elasticsearch.js:19817:9)

[23]\</XhrConnector.prototype.request/xhr.onreadystatechange@[http://localhost/scripts/elasticsearch.js:18655:7](http://localhost/scripts/elasticsearch.js:18655:7)

" elasticsearch.js:19450

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the  
remote resource at [http://localhost:9200/](http://localhost:9200/). This can be fixed by moving the  
resource to the same domain or enabling CORS. localhost:9200  
"WARNING: 2014-11-18T22:39:20Z  
Unable to revive connection: [http://localhost:9200/](http://localhost:9200/)

" elasticsearch.js:19450  
"WARNING: 2014-11-18T22:39:20Z  
No living connections

" elasticsearch.js:19450  
"ERROR: 2014-11-18T22:39:20Z

[26]\</Log.prototype.error@[http://localhost/scripts/elasticsearch.js:19151:56](http://localhost/scripts/elasticsearch.js:19151:56)  
checkRespForFailure@[http://localhost/scripts/elasticsearch.js:19817:9](http://localhost/scripts/elasticsearch.js:19817:9)

[23]\</XhrConnector.prototype.request/xhr.onreadystatechange@[http://localhost/scripts/elasticsearch.js:18655:7](http://localhost/scripts/elasticsearch.js:18655:7)

" elasticsearch.js:19450

"WARNING: 2014-11-18T22:39:20Z  
Unable to revive connection: [http://localhost:9200/](http://localhost:9200/)

" elasticsearch.js:19450  
"WARNING: 2014-11-18T22:39:20Z  
No living connections

" elasticsearch.js:19450

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [November 18, 2014, 11:08pm UTC](https://discuss.elastic.co/t/web-page-unable-to-render-nfl-elastic-aggregations-blog-d3-es/20821/2 "2014-11-18T23:08:19Z")

</div>

Regarding the CORS errors, see

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On 19 November 2014 09:45, Tony Su [tonysu999@gmail.com](mailto:tonysu999@gmail.com) wrote:

> Attempting to work my way through the article at
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/data-visualization-elasticsearch-aggregations/)
> 
> Although the blog article was written for ES 1.0, I am attempting to run  
> on current stable ES 1.4.  
> Skimming the commands, I don't see anything I think should be an issue  
> between the two ES versions, and I haven't located anything in the code  
> that specifies an ES version.
> 
> _Main attempt:_  
> Install ES 1.4 (single node in the cluster for this exercise).  
> Successfully created the ES index and mappings, and loaded data into ES  
> using the described commands
> 
> curl -XPOST localhost:9200/nfl?pretty  
> curl -XPUT localhost:9200/nfl/2013/\_mapping?pretty -d @nfl\_mapping.json  
> curl -XPOST localhost:9200/nfl/2013/\_bulk?pretty --data-binary  
> @nfl\_2013.json
> 
> Besides visually seeing results, I can also run the first two curl  
> commands with XGET instead of XPOST and XPUT with favorable results.
> 
> First anomaly I ran into is that the projects links point to a package  
> "elasticsearch.js.zip" which contains a number of angular and other scripts  
> rather than a single "elasticsearch.js" file. So, my first attempt was to  
> unzip the package and place it in a directory "elasticsearch.js" but that  
> continued to cause errors.
> 
> _Secondary attempt:_  
> Unable to determine correct deployment of elasticsearch.js (there are a  
> number of ad hoc possibiliites) I instead downloaded the project from  
> github ([GitHub - stormpython/nfl-elastic-aggregations](https://github.com/stormpython/nfl-elastic-aggregations)), with  
> the assumption that the files and website structure should be  
> pre-configured to work.
> 
> The cloned github project indeed included an elasticsearch.js file instead  
> of an elasticsearch.js directory containing individual scripts.  
> However, when I deployed the files and index.html, the website page  
> continues to display as empty with numerous errors relating to cross domain  
> connections and search, the critical error follows
> 
> mutating the [[Prototype]] of an object will cause your code to run very  
> slowly; instead create the object with the correct initial [[Prototype]]  
> value using Object.create d3.v3.js:479  
> _Cross-Origin Request Blocked_: The Same Origin Policy disallows reading  
> the remote resource at [http://localhost:9200/nfl/\_search?size=5](http://localhost:9200/nfl/_search?size=5). This can  
> be fixed by moving the resource to the same domain or enabling CORS. \_search  
> "ERROR: 2014-11-18T22:39:20Z  
> [26]\</Log.prototype.error@  
> [http://localhost/scripts/elasticsearch.js:19151:56](http://localhost/scripts/elasticsearch.js:19151:56)  
> checkRespForFailure@[http://localhost/scripts/elasticsearch.js:19817:9](http://localhost/scripts/elasticsearch.js:19817:9)  
> [23]\</XhrConnector.prototype.request/xhr.onreadystatechange@  
> [http://localhost/scripts/elasticsearch.js:18655:7](http://localhost/scripts/elasticsearch.js:18655:7)
> 
> " elasticsearch.js:19450
> 
> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the  
> remote resource at [http://localhost:9200/](http://localhost:9200/). This can be fixed by moving  
> the resource to the same domain or enabling CORS. localhost:9200  
> "WARNING: 2014-11-18T22:39:20Z  
> Unable to revive connection: [http://localhost:9200/](http://localhost:9200/)
> 
> " elasticsearch.js:19450  
> "WARNING: 2014-11-18T22:39:20Z  
> No living connections
> 
> " elasticsearch.js:19450  
> "ERROR: 2014-11-18T22:39:20Z  
> [26]\</Log.prototype.error@  
> [http://localhost/scripts/elasticsearch.js:19151:56](http://localhost/scripts/elasticsearch.js:19151:56)  
> checkRespForFailure@[http://localhost/scripts/elasticsearch.js:19817:9](http://localhost/scripts/elasticsearch.js:19817:9)  
> [23]\</XhrConnector.prototype.request/xhr.onreadystatechange@  
> [http://localhost/scripts/elasticsearch.js:18655:7](http://localhost/scripts/elasticsearch.js:18655:7)
> 
> " elasticsearch.js:19450
> 
> "WARNING: 2014-11-18T22:39:20Z  
> Unable to revive connection: [http://localhost:9200/](http://localhost:9200/)
> 
> " elasticsearch.js:19450  
> "WARNING: 2014-11-18T22:39:20Z  
> No living connections
> 
> " elasticsearch.js:19450
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZnxJ6YSchxV2FPmNZjT-FGXagHpaGiTtypw0YnhYbFixQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZnxJ6YSchxV2FPmNZjT-FGXagHpaGiTtypw0YnhYbFixQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [November 19, 2014, 3:01pm UTC](https://discuss.elastic.co/t/web-page-unable-to-render-nfl-elastic-aggregations-blog-d3-es/20821/3 "2014-11-19T15:01:06Z")

</div>

Thx.  
Will give those settings a go.

Tony

On Tuesday, November 18, 2014 3:08:51 PM UTC-8, Mark Walkom wrote:

> Regarding the CORS errors, see  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html#_settings_2)
> 
> On 19 November 2014 09:45, Tony Su \<[tony...@gmail.com](mailto:tony...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Attempting to work my way through the article at
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/data-visualization-elasticsearch-aggregations/)
> > 
> > Although the blog article was written for ES 1.0, I am attempting to run  
> > on current stable ES 1.4.  
> > Skimming the commands, I don't see anything I think should be an issue  
> > between the two ES versions, and I haven't located anything in the code  
> > that specifies an ES version.
> > 
> > _Main attempt:_  
> > Install ES 1.4 (single node in the cluster for this exercise).  
> > Successfully created the ES index and mappings, and loaded data into ES  
> > using the described commands
> > 
> > curl -XPOST localhost:9200/nfl?pretty  
> > curl -XPUT localhost:9200/nfl/2013/\_mapping?pretty -d @nfl\_mapping.json  
> > curl -XPOST localhost:9200/nfl/2013/\_bulk?pretty --data-binary  
> > @nfl\_2013.json
> > 
> > Besides visually seeing results, I can also run the first two curl  
> > commands with XGET instead of XPOST and XPUT with favorable results.
> > 
> > First anomaly I ran into is that the projects links point to a package  
> > "elasticsearch.js.zip" which contains a number of angular and other scripts  
> > rather than a single "elasticsearch.js" file. So, my first attempt was to  
> > unzip the package and place it in a directory "elasticsearch.js" but that  
> > continued to cause errors.
> > 
> > _Secondary attempt:_  
> > Unable to determine correct deployment of elasticsearch.js (there are a  
> > number of ad hoc possibiliites) I instead downloaded the project from  
> > github ([GitHub - stormpython/nfl-elastic-aggregations](https://github.com/stormpython/nfl-elastic-aggregations)), with  
> > the assumption that the files and website structure should be  
> > pre-configured to work.
> > 
> > The cloned github project indeed included an elasticsearch.js file  
> > instead of an elasticsearch.js directory containing individual scripts.  
> > However, when I deployed the files and index.html, the website page  
> > continues to display as empty with numerous errors relating to cross domain  
> > connections and search, the critical error follows
> > 
> > mutating the [[Prototype]] of an object will cause your code to run very  
> > slowly; instead create the object with the correct initial [[Prototype]]  
> > value using Object.create d3.v3.js:479  
> > _Cross-Origin Request Blocked_: The Same Origin Policy disallows reading  
> > the remote resource at [http://localhost:9200/nfl/\_search?size=5](http://localhost:9200/nfl/_search?size=5). This  
> > can be fixed by moving the resource to the same domain or enabling CORS.  
> > \_search  
> > "ERROR: 2014-11-18T22:39:20Z  
> > [26]\</Log.prototype.error@  
> > [http://localhost/scripts/elasticsearch.js:19151:56](http://localhost/scripts/elasticsearch.js:19151:56)  
> > checkRespForFailure@[http://localhost/scripts/elasticsearch.js:19817:9](http://localhost/scripts/elasticsearch.js:19817:9)  
> > [23]\</XhrConnector.prototype.request/xhr.onreadystatechange@  
> > [http://localhost/scripts/elasticsearch.js:18655:7](http://localhost/scripts/elasticsearch.js:18655:7)
> > 
> > " elasticsearch.js:19450
> > 
> > Cross-Origin Request Blocked: The Same Origin Policy disallows reading  
> > the remote resource at [http://localhost:9200/](http://localhost:9200/). This can be fixed by  
> > moving the resource to the same domain or enabling CORS. localhost:9200  
> > "WARNING: 2014-11-18T22:39:20Z  
> > Unable to revive connection: [http://localhost:9200/](http://localhost:9200/)
> > 
> > " elasticsearch.js:19450  
> > "WARNING: 2014-11-18T22:39:20Z  
> > No living connections
> > 
> > " elasticsearch.js:19450  
> > "ERROR: 2014-11-18T22:39:20Z  
> > [26]\</Log.prototype.error@  
> > [http://localhost/scripts/elasticsearch.js:19151:56](http://localhost/scripts/elasticsearch.js:19151:56)  
> > checkRespForFailure@[http://localhost/scripts/elasticsearch.js:19817:9](http://localhost/scripts/elasticsearch.js:19817:9)  
> > [23]\</XhrConnector.prototype.request/xhr.onreadystatechange@  
> > [http://localhost/scripts/elasticsearch.js:18655:7](http://localhost/scripts/elasticsearch.js:18655:7)
> > 
> > " elasticsearch.js:19450
> > 
> > "WARNING: 2014-11-18T22:39:20Z  
> > Unable to revive connection: [http://localhost:9200/](http://localhost:9200/)
> > 
> > " elasticsearch.js:19450  
> > "WARNING: 2014-11-18T22:39:20Z  
> > No living connections
> > 
> > " elasticsearch.js:19450
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a531197b-c543-403a-9684-e54bb7ff13bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a531197b-c543-403a-9684-e54bb7ff13bc%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:48am UTC](https://discuss.elastic.co/t/web-page-unable-to-render-nfl-elastic-aggregations-blog-d3-es/20821/4 "2017-07-06T00:48:59Z")

</div>


