Issue when i start trying to make a post commande

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
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:

		<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
		 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 {

		/* 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 {

		/* 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, {
		    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;

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

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

		<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>

		<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=";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"></a>.</p>


		<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>

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

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.


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 ""

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


Hy, thanks for your reply.
I try

curl -XPUT ""

and same the error appear

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

Or use

curl --noproxy "*" -XPUT "" -d '{ ... }'

Ok so the return of the command is:
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 :upside_down_face:

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

Ok thank you for your time.
have a nice day

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