# Primary server unseccessfully takes over again

**URL:** <https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126>\
**Category:** Users/Site Administrators\
**Created:** [May 23, 2025, 4:08am UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126 "2025-05-23T04:08:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 23, 2025, 4:08am UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126/1 "2025-05-23T04:08:26Z")

</div>

I am testing the failover feature. During the job execution, I shut down the primary server (`systemctl stop pbs`), the secondary server took over after a delay, and I could see the pbs\_sched process started on the secondary server. After the job execution was completed, I restarted the primary server (`systemctl start pbs`), and then submitted the next job on the primary server, but the job kept being queued, and the following error kept repeating in the sched log:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/5b67a008c7b0d532f237eccb32ca8ee031c35c77.jpeg)  
It should not be the normal behavior for the secondary server to detect the activity of the primary server and then change itself back to the idle state. But it can’t work normally now.

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [May 23, 2025, 6:51am UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126/2 "2025-05-23T06:51:58Z")

</div>

> [@wakaka](#):
>
> I restarted the primary server (`systemctl start pbs`), and then submitted the next job on the primary server, but the job kept being queued, and the following error kept repeating in the sched log:

- stop the secendory PBS Server first , make sure the pbs\_sched is not running. Then start the primary server , wait until the services have started and you are sure that qstat -Bf , pbsnodes -av works. Then start the secondary PBS server. Please note while doing these tests you would need to allow some time , doing it in quick sessions might get into issues.Also, always start the scheduler once the pbs server is up and running.

---

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 23, 2025, 8:52am UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126/3 "2025-05-23T08:52:43Z")

</div>

This operation obviously becomes more complicated.  
I tried it, and the job stayed in the queued state for a very long time before changing to the running state. The delay time is very terrible.  
The expected startup behavior did not take effect.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/d05b651caf4c279a9c0ae9b184ab02faf70297ef.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/a005657ccdca90e0060a8e0021d770b35b95407f.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/1bb765a271283b2c8d6a88cda955bf021cf91fdf.jpeg)

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [May 23, 2025, 6:30pm UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126/4 "2025-05-23T18:30:10Z")

</div>

> [@wakaka](#):
>
> I tried it, and the job stayed in the queued state for a very long time before changing to the running state.

There will be time delay - 5 minutes i suppose  
Also, nodes will be informed to connect to primary , so that change also takes some time.

---

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 24, 2025, 2:30am UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126/5 "2025-05-24T02:30:23Z")

</div>

> [@adarsh](#):
>
> There will be time delay - 5 minutes i suppose  
> Also, nodes will be informed to connect to primary , so that change also takes some time.

Is this inevitable?  
And why does the comment disapper when the secondary server takes over?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/59a2276ed64bc09504be4b4262181361617aa1b2.jpeg)

---

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 27, 2025, 12:04pm UTC](https://community.openpbs.org/t/primary-server-unseccessfully-takes-over-again/4126/6 "2025-05-27T12:04:25Z")

</div>

`netstat -antlp | grep pbs` shows that:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/1fde24657f6188cb35be783d317c534a0cc387a9.png)  
That’s very strange.  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/b7c7c0eda7d6622ee0b779e30d1dc56afce61217.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/d7d8f4931df11c1ca9d589ed4190bf7cebe0e21d.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/optimized/1X/39c14ad187244d4293fdcc41e5bfc73baa94917e_2_690x51.png)  
So the primary server always can’t take over.
