# Issue when i start trying to make a post commande

**URL:** <https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514>\
**Category:** Elasticsearch\
**Created:** [June 26, 2019, 8:10am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514 "2019-06-26T08:10:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![busan](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@busan](https://discuss.elastic.co/u/busan)\
**Post date:** [June 26, 2019, 8:10am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/1 "2019-06-26T08:10:51Z")

</div>

Hi, first of all i'am a complete beginner, like i have never use something like elasticsearch before.  
I'm on a ubuntu 16.04 Xenial server behind a corporate proxy.  
So i have followed this tutorial:  
[how to install elasticsearch on a ubuntu16.04 but in french](https://doc.ubuntu-fr.org/elasticsearch)  
i'm afraid that no english version exist, but the command are explicit  
and when i try this command:

```
curl -XPUT "http://localhost:9200/movies/movie/1" -d'
{
    "title": "The Godfather",
    "director": "Francis Ford Coppola",
    "year": 1972
}'

```

I get this monstruosity:

```
<html>
	<head>
		<meta type="copyright" content="">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>ERREUR : l'URL demandée n'a pas pu être chargée</title>
		<style type="text/css"><!--
		 /*
		 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
		 *
		 * Squid software is distributed under GPLv2+ license and includes
		 * contributions from numerous individuals and organizations.
		 * Please see the COPYING and CONTRIBUTORS files for details.
		 */

		/*
		 Stylesheet for Squid Error pages
		 Adapted from design by Free CSS Templates
		 http://www.freecsstemplates.org
		 Released for free under a Creative Commons Attribution 2.5 License
		*/

		/* Page basics */
		* {
		        font-family: verdana, sans-serif;
		}

		html body {
		        margin: 0;
		        padding: 0;
		        background: #efefef;
		        font-size: 12px;
		        color: #1e1e1e;
		}

		/* Page displayed title area */
		#titles {
		        margin-left: 15px;
		        padding: 10px;
		        padding-left: 100px;
		        background: url('/squid-internal-static/icons/SN.png') no-repeat left;
		}

		/* initial title */
		#titles h1 {
		        color: #000000;
		}
		#titles h2 {
		        color: #000000;
		}

		/* special event: FTP success page titles */
		#titles ftpsuccess {
		        background-color:#00ff00;
		        width:100%;
		}

		/* Page displayed body content area */
		#content {
		        padding: 10px;
		        background: #ffffff;
		}

		/* General text */
		p {
		}

		/* error brief description */
		#error p {
		}

		/* some data which may have caused the problem */
		#data {
		}

		/* the error message received from the system or other software */
		#sysmsg {
		}

		pre {
		    font-family:sans-serif;
		}

		/* special event: FTP / Gopher directory listing */
		#dirmsg {
		    font-family: courier;
		    color: black;
		    font-size: 10pt;
		}
		#dirlisting {
		    margin-left: 2%;
		    margin-right: 2%;
		}
		#dirlisting tr.entry td.icon,td.filename,td.size,td.date {
		    border-bottom: groove;
		}
		#dirlisting td.size {
		    width: 50px;
		    text-align: right;
		    padding-right: 5px;
		}

		/* horizontal lines */
		hr {
		        margin: 0;
		}

		/* page displayed footer area */
		#footer {
		        font-size: 9px;
		        padding-left: 10px;
		}

		body
		:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
		:lang(he) { direction: rtl; }
		 --></style>
	</head>

	<body id="ERR_CONNECT_FAIL">
		<div id="titles">
		<h1>ERREUR</h1>
		<h2>L'URL demandée n'a pas pu être trouvé</h2>
		</div>
		<hr>

		<div id="content">
		<p>L'erreur suivante s'est produite en essayant d'accéder à l'URL : <a href="http://localhost:9200/tutorial/helloworld/1">http://localhost:9200/tutorial/helloworld/1</a></p>

		<blockquote id="error">
		<p><b>La connexion ::1 a échouée.</b></p>
		</blockquote>

		<p id="sysmsg">Le système a retourné : <i>(111) Connection refused</i></p>

		<p>L'hôte distant ou le réseau sont peut-être défaillant. Veuillez renouveler votre requête.</p>

		<p>Votre administrateur proxy est <a href="mailto:informatique@ch-avranches-granville.fr?subject=CacheErrorInfo%20-%20ERR_CONNECT_FAIL&amp;body=CacheHost%3A%20proxy-squid-avr%0D%0AErrPage%3A%20ERR_CONNECT_FAIL%0D%0AErr%3A%20(111)%20Connection%20refused%0D%0ATimeStamp%3A%20Wed,%2026%20Jun%202019%2007%3A52%3A22%20GMT%0D%0A%0D%0AClientIP%3A%2010.50.40.157%0D%0AServerIP%3A%20localhost%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Ftutorial%2Fhelloworld%2F1%20HTTP%2F1.1%0AProxy-Authorization%3A%20Basic%20cDA5MDk6R2xvcGU0%0D%0AUser-Agent%3A%20curl%2F7.47.0%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%2029%0D%0AContent-Type%3A%20application%2Fx-www-form-urlencoded%0D%0AHost%3A%20localhost%3A9200%0D%0A%0D%0A%0D%0A">informatique@ch-avranches-granville.fr</a>.</p>

		<br>
		</div>

		<hr>
		<div id="footer">
		<p>Générée le Wed, 26 Jun 2019 07:52:22 GMT par proxy-squid-avr (squid/3.5.27)</p>
		<!-- ERR_CONNECT_FAIL -->
		</div>
	</body>
</html>

```

but twice in the same error message.  
The same error message but in the firefox way:

 ![2019-06-26%2010_08_23-ERREUR%20_%20l'URL%20demand%C3%A9e%20n'a%20pas%20pu%20%C3%AAtre%20charg%C3%A9e](https://us1.discourse-cdn.com/elastic/original/3X/4/8/48ad85f08baf7523e7570b69cc94054132f214bb.png)

Sorry it's in french but you get the idea.

So if you can help me, this will made my day, jeebus be with y'all.

Busan

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2019, 8:24am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/2 "2019-06-26T08:24:55Z")

</div>

Welcome! If you're french, you can also ask in french in #in-your-native-tongue:discussions-en-francais.

Here the problem is that you are trying to call a proxy and not elasticsearch directly.  
The page you are getting is not from elasticsearch but generated by Squid.

You should may be try:

```
curl -XPUT "http://127.0.0.1:9200/movies/movie/1"

```

Or ask your network admin how to disable the proxy for local addresses.

HTH

---

<div class="post-metadata">

**Author:** ![busan](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@busan](https://discuss.elastic.co/u/busan)\
**Post date:** [June 26, 2019, 8:37am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/3 "2019-06-26T08:37:43Z")

</div>

Hy, thanks for your reply.  
I try

```auto
curl -XPUT "http://127.0.0.1:9200/movies/movie/1"

```

and same the error appear

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2019, 8:49am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/4 "2019-06-26T08:49:35Z")

</div>

Ask your network admin how to disable the proxy for local addresses.

Or use

```auto
curl --noproxy "*" -XPUT "http://127.0.0.1:9200/movies/movie/1" -d '{ ... }'

```

---

<div class="post-metadata">

**Author:** ![busan](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@busan](https://discuss.elastic.co/u/busan)\
**Post date:** [June 26, 2019, 8:57am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/5 "2019-06-26T08:57:16Z")

</div>

Ok so the return of the command is:  
`{"_index":"movies","_type":"movie","_id":"1","_version":1,"created":true}`  
so i guess i'm good now.  
What's wrong with the proxy ? Because i work for an Hopital and we need the proxy for everything.

Ps: When i reply i can't see the cursor, this is very disturbing 🙃

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 26, 2019, 9:00am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/6 "2019-06-26T09:00:48Z")

</div>

You don't need to go through the proxy when you are running something on your machine.

---

<div class="post-metadata">

**Author:** ![busan](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@busan](https://discuss.elastic.co/u/busan)\
**Post date:** [June 26, 2019, 9:02am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/7 "2019-06-26T09:02:53Z")

</div>

Ok thank you for your time.  
have a nice day

---

<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 24, 2019, 9:02am UTC](https://discuss.elastic.co/t/issue-when-i-start-trying-to-make-a-post-commande/187514/8 "2019-07-24T09:02:56Z")

</div>

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