Description

After completing RE switchover some LDP session are closed

Symptoms

After completing RE switchover some LDP session are closed

 

user@router> show ldp session | refresh 1   

Feb 21 02:26:44

 

---(refreshed at 2026-02-21 02:27:20 CET)---

 

Warning: License key missing; requires 'ldp' license

 

 Address              State    Connection Hold time Adv. Mode

10.31.10.12             Operational Open     1     DU

10.31.10.15             Operational Open     1     DU

10.31.10.242             Operational Open     23     DU

---(refreshed at 2026-02-21 02:27:21 CET)---

 

Warning: License key missing; requires 'ldp' license

 

 Address              State    Connection Hold time Adv. Mode

10.31.10.12             Operational Open     0     DU

10.31.10.15             Operational Open     0     DU

10.31.10.242             Operational Open     22     DU

---(refreshed at 2026-02-21 02:27:22 CET)---

 

Warning: License key missing; requires 'ldp' license

 

 Address              State    Connection Hold time Adv. Mode

10.31.10.12             Nonexistent Closed    0     DU

10.31.10.15             Nonexistent Closed    0     DU

10.31.10.242             Operational Open     21     DU

---(refreshed at 2026-02-21 02:27:23 CET)---

 

Warning: License key missing; requires 'ldp' license

 

 Address              State    Connection Hold time Adv. Mode

10.31.10.12             Nonexistent Closed    0     DU

10.31.10.15             Nonexistent Closed    0     DU

10.31.10.242             Operational Open     20     DU

---(refreshed at 2026-02-21 02:27:25 CET)---

 

 

We enable traceoptions for LDP, we can see that LDP says it does not have a route to 10.31.10.9

 

 

Feb 21 04:28:32.600467 LDP hello from (interface ae0.1 [IFL 369]) absorbed

Feb 21 04:28:33.239295 task_timer_delete: LDP_LDP connect <Processing>

Feb 21 04:28:33.239312 Session 10.31.10.9 state Nonexistent -> Connecting

Feb 21 04:28:33.239321 task_timer_ucreate: created timer LDP_LDP connect flags <>

Feb 21 04:28:33.239327 task_timer_uset: timer LDP_LDP connect <Touched> set to interval 0 offset 30 with jitter 0 at 4:29:03.239274

Feb 21 04:28:33.239335 task_alloc: allocated task block for LDP Conn priority 40

Feb 21 04:28:33.239347 Connection 10.31.10.9 state Closed -> Opening

Feb 21 04:28:33.239381 task_get_socket: domain AF_INET type SOCK_STREAM protocol 0 socket 124

Feb 21 04:28:33.239390 task_set_socket: task LDP Conn.10.31.10.9+646 socket 124

Feb 21 04:28:33.239404 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option RecvBuffer(0) value 16384

Feb 21 04:28:33.239425 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option SendBuffer(1) value 16384

Feb 21 04:28:33.239433 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option NonBlocking(8) value 1

Feb 21 04:28:33.239440 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option ReUsePort(38) value 1

Feb 21 04:28:33.239447 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option PathMTUDiscovery(26) value 0

Feb 21 04:28:33.239454 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option TOS(16) value 192

Feb 21 04:28:33.239460 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option RecordInterface(29)

Feb 21 04:28:33.239470 task_set_option_internal: task LDP Conn.10.31.10.9+646 socket 124 option RoutingTable(27) value 8

Feb 21 04:28:33.239474 Connecting to 10.31.10.9

Feb 21 04:28:33.239507 JTASK_IO_CONNECT_FAILED: LDP Conn.10.31.10.9+646: Connecting to 10.31.10.9+646 failed: No route to host

Feb 21 04:28:33.239551 ldp_connect_start: connect 10.31.10.9: No route to host

Feb 21 04:28:33.239563 Session 10.31.10.9:0 release replication handle 00 00 00 00 00 00 00 00

Feb 21 04:28:33.239570 task_job_create_background: create prio 7 job LDP close for task LDP

Feb 21 04:28:33.239578 task_timer_reset: reset LDP_keepalive

Feb 21 04:28:33.239583 task_timer_reset: reset LDP_session hold

Feb 21 04:28:33.239587 task_timer_reset: reset LDP_LDP connect

Feb 21 04:28:33.239593 task_timer_reset: reset LDP_gr liveness

Feb 21 04:28:33.239597 task_timer_reset: reset LDP_gr cleanup

Feb 21 04:28:33.239602 Session 10.31.10.9 state Connecting -> Closing

Feb 21 04:28:33.239608 Connection 10.31.10.9 state Opening -> Closed

Feb 21 04:28:33.239612 task_close: close socket 124 task LDP Conn.10.31.10.9+646

Feb 21 04:28:33.239617 task_reset_socket: task LDP Conn.10.31.10.9+646 socket 124

Feb 21 04:28:33.239649 task_delete: deleting task LDP Conn.10.31.10.9+646

Feb 21 04:28:33.239656 task_job_delete_task: deleting all jobs for task LDP Conn.10.31.10.9+646

Feb 21 04:28:33.239661 task_job_deleted_task: no jobs found for task LDP Conn.10.31.10.9+646

Feb 21 04:28:33.239695 background dispatch running job LDP close for task LDP

Feb 21 04:28:33.239710 Session 10.31.10.9 state Closing -> Nonexistent

Feb 21 04:28:33.239720 task_timer_uset: timer LDP_LDP connect <Touched> set to interval 0 offset 1 with jitter 0 at 4:28:34.239694

Feb 21 04:28:33.239725 task_job_delete: delete background job LDP close for task LDP

Feb 21 04:28:33.239730 background dispatch completed job DELETED for task LDP

 

Solution

We realized that the LDP sessions that were closed belong to logical systems in which both BFD and Graceful Restart were configured together.


Example below :


set logical-systems TEST protocols ospf area 0.0.0.0 interface ae0.1 bfd-liveness-detection minimum-interval 150

set logical-systems TEST protocols ospf area 0.0.0.0 interface ae0.1 bfd-liveness-detection multiplier 3


set logical-systems TEST routing-options graceful-restart


-------------------------


BFD and GR shouldn't be configured together as they serve opposite purpose.

  

https://www.juniper.net/documentation/en_US/junos13.2/topics/task/configuration/graceful-restart-for-routing-protocols-configuring.html

Note: If you configure Bidirectional Forwarding Detection (BFD) and graceful restart for IS-IS, graceful restart might not work as expected.

 

https://www.juniper.net/documentation/us/en/software/junos/high-availability/topics/task/graceful-restart-for-routing-protocols-configuring.html

Note: Do not configure both Bidirectional Forwarding Detection (BFD) for BGP and graceful restart for BGP. Routing performance may be sub-optimal if you do this.


-------------------------


As described above please avoid configuring BFD protocol and graceful-restart feature together otherwise unexpected results may appear.








Modification History

2026-03-31 : Article Created