Yun Server Error "Could not connect to YunServer 146 Connection refused"

II made a program that controls the relay module.

And it uses REST to control this module.

This works properly usual.

But I can not connect to the server when the network information is changed or Arduino is rebooted.

When you try to connect, you receive the following error.

Could not connect to YunServer 146 Connection refused (Connected web)

or

HTTP/1.1 500 Error (Connected app)

Control url : http://arduino_ip/arduino/digital/pinNum/Status (example source used)
Example source : http://www.arduino.cc/en/Guide/ArduinoYun#toc6
title : Using Bridge to pass information between processors

I have always been a newly compiled and uploaded to solve the problem.
This is very inefficient, and unstable.
I read some of the recent articles posted on this forum, I have not yet been resolved.

I discovered using REST api wthout password fixes this issue, but how to go with password option ?