Connection closed by foreign host


I am very new with Arduino and now I am trying to make a project with my Arduino Uno and a Arduino Yun Shield connected to it.

I already have the Yun Shield configured and is connected to my local area network. The problem is when I upload the "HttpClientConsole" example sketch using the Arduino IDE (using the Yun as connection port), it uploads perfectly but then when I open the Serial Port, I always get the same message:

Unable to connect: retrying (1)... connected!
Connection closed by foreign host

I have tried with different examples and with my own simple sketch and always the same error.

Can somebody help me? I am completely sure that is a lack of concept but I don't know what to do.

I have an Arduino Uno Rev.3, the Arduino Yun shield (connected and configured) and the Arduino IDE 1.6.12. I am powering the arduino using the USB port.