# Qmgr Unauthorized Request

**URL:** <https://community.openpbs.org/t/qmgr-unauthorized-request/1748>\
**Category:** Users/Site Administrators\
**Created:** [August 27, 2019, 12:37pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748 "2019-08-27T12:37:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://community.openpbs.org/u/paolo)\
**Post date:** [August 27, 2019, 12:37pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/1 "2019-08-27T12:37:04Z")

</div>

I have installed pbspro on a brand new cluster where Centos 7.4 is installed.

I built the rpms and installed the server one on the frontend and the execution one on a node.

Now I am trying to configure a first test queue, but any command I execute in qmgr ends with;

qmgr obj=\<—something—\> svr=default: Unauthorized Request  
qmgr: Error (15007) returned from server

I am launching qmgr as root; but the root user should be a manager by default, correct ? Am I missing something ?

Thank you for any assistance,  
Paolo

---

<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:** [August 27, 2019, 1:03pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/2 "2019-08-27T13:03:13Z")

</div>

Paolo,

1. are you running the command on the server itself ? or from the PBS clients commands from a remote host ?
2. Make sure the /etc/hosts is populated correctly and represents the PBS\_SERVER name mentioned in the /etc/pbs.conf
3. Also, please make sure the PBS\_SERVER name is resolvable (DNS)

Thank you

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://community.openpbs.org/u/paolo)\
**Post date:** [August 27, 2019, 1:46pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/3 "2019-08-27T13:46:49Z")

</div>

1. 

I am running the command on the server itself

1. 

I have two entries in /etc/host for the server, the “internal” and the “external” one;

192.168.33.1 werewolf.werewolf werewolf  
90.147.33.20 werewolf.lambrate.inaf.it

I have tried setting PBS\_SERVER to each of these values but the error still occurs

1. 

Yes, werewolf is resolvable.

Thank you,  
Paolo

---

<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:** [August 27, 2019, 1:53pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/4 "2019-08-27T13:53:15Z")

</div>

Please try below:

1. Comment the second entry in the /etc/hosts  
90.147.33.20 werewolf.lambrate.inaf.it

2. update the entry against PBS\_SERVER in the /etc/pbs.conf to werewolf

3. try the the qmgr commands that you were trying to run

Thank you,

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://community.openpbs.org/u/paolo)\
**Post date:** [August 27, 2019, 2:50pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/5 "2019-08-27T14:50:31Z")

</div>

Same error 😥

---

<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:** [August 27, 2019, 3:46pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/6 "2019-08-27T15:46:30Z")

</div>

For some reason , the PBS Server thinks, the commands originating from itself is coming from a different host. Hence, you are seeing this message **qmgr: Error (15007) returned from server**

---

<div class="post-metadata">

**Author:** ![vstumpf](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@vstumpf](https://community.openpbs.org/u/vstumpf)\
**Post date:** [August 27, 2019, 4:12pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/7 "2019-08-27T16:12:22Z")

</div>

If you open your server logs, you can see what the server thinks its hostname is:

08/27/2019 08:57:34.688203;0040; **Server@shecil** ;Svr;shecil;Scheduler sent command 3

In this case, the server thinks it’s running on shecil (Server@shecil)  
If you run a command that connects to the server, the server longs will print the hostname of the incoming request:

```auto
[vstumpf@shecil ~]$ qstat
[vstumpf@shecil ~]$ tail -n 4 /var/spool/pbs/server_logs/20190827 
08/27/2019 09:10:09.693158;0100;Server@shecil;Req;;Type 0 request received from vstumpf@shecil, sock=15

```

In this case, the request is coming from vstumpf@shecil. The server will do a string comparison of the two hosts.

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://community.openpbs.org/u/paolo)\
**Post date:** [September 3, 2019, 10:07am UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/8 "2019-09-03T10:07:31Z")

</div>

If I issue a “qstat” command or I try any qmgr command nothing is written in the server log. Do I need to enable the logging somewhere ?

Moreover, digging into documentation I found this troubleshooting suggestion

```
Additionally, try running pbs_iff by typing 
pbs_iff server_host 15001
If pbs_iff fails to print the garbage and/or exits with a nonzero status, either the Server is not running or it was installed with a different encryption system from that used for pbs_iff.

```

The command exists with zero status, but nothing is printed; could this be the problem ?

---

<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:** [September 3, 2019, 9:37pm UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/9 "2019-09-03T21:37:34Z")

</div>

Logging is enabled by default, so no configuration needs to be done.  
qmgr -c "set server log\_events = 511 "  
0. please check all your PBS Pro OSS commands are the same version as the PBS Server  
0. please check chmod 4755 $PBS\_EXEC/sbin/pbs\_iff

1. Do you have any jobs running in your PBS setup ?
2. try deleting a node and adding a node
3. create a queue and delete a queue

[root@admin ~]# pbs\_iff -t admin 15001 ( i do not get anything printed out after running this command )  
[root@admin ~]# echo $?  
0

Thank you

---

<div class="post-metadata">

**Author:** ![paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@paolo](https://community.openpbs.org/u/paolo)\
**Post date:** [September 5, 2019, 10:34am UTC](https://community.openpbs.org/t/qmgr-unauthorized-request/1748/10 "2019-09-05T10:34:08Z")

</div>

It seems that the

`chmod 4755 $PBS_EXEC/sbin/pbs_iff`

did the job!

Even if the setuid permission on this file seemed to me already setup before… anyway, now it works.

Thank you very much for the assistance,  
Paolo
