# Reload with state file does not take the updated IP of the server in latest version

**URL:** https://discourse.haproxy.org/t/reload-with-state-file-does-not-take-the-updated-ip-of-the-server-in-latest-version/2302
**Category:** Help!
**Created:** [March 25, 2018, 2:43pm UTC](https://discourse.haproxy.org/t/reload-with-state-file-does-not-take-the-updated-ip-of-the-server-in-latest-version/2302 "2018-03-25T14:43:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Swapnil](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Swapnil](https://discourse.haproxy.org/u/Swapnil)
#### Post date: [March 25, 2018, 2:43pm UTC](https://discourse.haproxy.org/t/reload-with-state-file-does-not-take-the-updated-ip-of-the-server-in-latest-version/2302/1 "2018-03-25T14:43:04Z")

</div>

Has anyone else faced similar issue.

reload with state file does not take the updated IP of the server in latest version. However the changes in ports and status ready/maint are reloaded from state file, but IP address is not.

Any help is appreciated

---

<div class="post-metadata">

### Author: ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)
#### Post date: [March 25, 2018, 3:50pm UTC](https://discourse.haproxy.org/t/reload-with-state-file-does-not-take-the-updated-ip-of-the-server-in-latest-version/2302/2 "2018-03-25T15:50:10Z")

</div>

Any particular [init-addr](https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-init-addr) setting? Please share the configuration.

---

<div class="post-metadata">

### Author: ![Swapnil](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Swapnil](https://discourse.haproxy.org/u/Swapnil)
#### Post date: [March 25, 2018, 6:17pm UTC](https://discourse.haproxy.org/t/reload-with-state-file-does-not-take-the-updated-ip-of-the-server-in-latest-version/2302/3 "2018-03-25T18:17:27Z")

</div>

Thanks @lukastribus, below are my configuration

```
global
   daemon
   stats socket /root/haproxy-1.8.4/hapee-lb.sock mode 777 level admin expose-fd listeners
   server-state-file /root/haproxy-1.8.4/state
defaults
   load-server-state-from-file global
   default-server init-addr last,libc,none
frontend appFrontEnd
   bind *:8089
   default_backend appBackend
backend appBackend
    balance roundrobin
    server app1 0.0.0.0:8080 maxconn 1
    server app2 0.0.0.0:8080 maxconn 1

echo "set server appBackend/app1 addr 9.9.9.9" | socat stdio /root/haproxy-1.8.4/hapee-lb.sock

 echo "show servers state" | socat stdio /root/haproxy-1.8.4/hapee-lb.sock > /root/haproxy-1.8.4/state

```

new state file looks like

```
# be_id be_name srv_id srv_name srv_addr srv_op_state srv_admin_state srv_uweight srv_iweight srv_time_since_last_change srv_check_status srv_check_result srv_check_health srv_check_state srv_agent_state bk_f_forced_id srv_f_forced_id srv_fqdn srv_port
3 appBackend 1 app1 9.9.9.9 2 0 1 1 992 1 0 2 0 0 0 0 - 8080
3 appBackend 2 app2 0.0.0.0 2 0 1 1 992 1 0 2 0 0 0 0 - 8080

```

after this I reloaded ha-proxy

`./haproxy -f haproxy.cfg -sf <PID>`

and then  
`echo "show servers state" | socat stdio /root/haproxy-1.8.4/hapee-lb.sock > /root/haproxy-1.8.4/state`  
new state file has no change in app1 IP

```
   # be_id be_name srv_id srv_name srv_addr srv_op_state srv_admin_state srv_uweight srv_iweight srv_time_since_last_change srv_check_status srv_check_result srv_check_health srv_check_state srv_agent_state bk_f_forced_id srv_f_forced_id srv_fqdn srv_port
    3 appBackend 1 app1 0.0.0.0 2 0 1 1 992 1 0 2 0 0 0 0 - 8080
    3 appBackend 2 app2 0.0.0.0 2 0 1 1 992 1 0 2 0 0 0 0 - 8080

```

\*\*Note change in port number works
