# Qsub: cannot connect to server centos7 (errno=113)

**URL:** https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366
**Category:** Users/Site Administrators
**Created:** [December 21, 2018, 12:25am UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366 "2018-12-21T00:25:31Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![nekcorp](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nekcorp](https://community.openpbs.org/u/nekcorp)
#### Post date: [December 21, 2018, 12:25am UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/1 "2018-12-21T00:25:31Z")

</div>

Hi,

When I want to submit job I have this message error : **qsub :cannot connect to server centos7 (errno=113)**

qstat command return the same message.

who can help me please ?

---

<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: [December 21, 2018, 7:00am UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/2 "2018-12-21T07:00:43Z")

</div>

1. Is centos7 resolvable from your system or on the PBS Server itself ?
2. Is PBS Pro server service up and running ?
3. Can you ping centos7 from your system or on the system ?
4. what is the output of the command **pbs\_hostn -v centos7** on the PBS Server system ?
  - is centos7 mentioned in the /etc/hosts files ?

5. you can do strace qstat and you will come to know the reason.

---

<div class="post-metadata">

### Author: ![nekcorp](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nekcorp](https://community.openpbs.org/u/nekcorp)
#### Post date: [December 21, 2018, 11:49pm UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/3 "2018-12-21T23:49:17Z")

</div>

> [@adarsh](#):
>
> pbs\_hostn -v centos7

pbs\_hostn -v centos7 return

> primary name: centos7.home (from gethostbyname())  
> aliases: -none-  
> address length: 4 bytes  
> address: 192.168.1.97 (1627498688 dec) name: centos7.home

in /etc/hostname it is only written **localhost**

---

<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: [December 23, 2018, 8:59am UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/4 "2018-12-23T08:59:58Z")

</div>

Please add the below line the /etc/hosts file

192.168.1.97 centos7.home

and then restart the pbs services and check the below command

ps -ef | grep pbs\_

---

<div class="post-metadata">

### Author: ![nekcorp](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nekcorp](https://community.openpbs.org/u/nekcorp)
#### Post date: [December 23, 2018, 2:17pm UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/5 "2018-12-23T14:17:29Z")

</div>

into my /etc/hosts file :

> 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4  
> ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6  
> 192.168.1.97 centos7.home

Then I have restart my pbs server :

> sudo ./pbs\_server

Command ps -ef | grep pbs\_ return :

> root 6554 1 0 15:11 ? 00:00:00 /opt/pbs/sbin/pbs\_ds\_monitor monitor  
> root 6836 1 0 15:12 ? 00:00:00 /opt/pbs/sbin/pbs\_server.bin  
> nekcorp 8159 20891 0 15:12 pts/4 00:00:00 grep --color=auto pbs\_

when I want to submit job I have this message :

> No route to host  
> qsub: cannot connect to server centos7 (errno=113)

---

<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: [December 24, 2018, 8:24am UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/6 "2018-12-24T08:24:04Z")

</div>

> [@nekcorp](#):
>
> Then I have restart my pbs server :

Please follow the below to restart the services.

1. /etc/init.d/pbs stop or systemctl stop pbs
2. check ps -ef | grep pbs\_ for any zombie services , if there are still there kill them
3. /etc/init.d/pbs start or systemctl start pbs
4. /etc/init.d/pbs status or systemctl status pbs

for example on my system:

# /etc/init.d/pbs status

pbs\_server is pid 1793  
pbs\_sched is pid 1523  
pbs\_comm is 1507

Check the for the services which are up and running:  
ps -ef | grep pbs\_  
netstat -tunap | grep pbs

Share the contents of /etc/pbs.conf

Added/updated/edited:

1. check firewalls are not blocking the communication
2. check selinux is disabled and system is rebooted

---

<div class="post-metadata">

### Author: ![nekcorp](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nekcorp](https://community.openpbs.org/u/nekcorp)
#### Post date: [December 25, 2018, 2:25pm UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/7 "2018-12-25T14:25:50Z")

</div>

I have follow your recommandation to restart the services, but I have the same message when I use qsub command or qstat command :

> No route to host  
> qstat: cannot connect to server centos7 (errno=113)  
> No route to host  
> qsub: cannot connect to server centos7 (errno=113)

_ **/etc/init.d/pbs status** _ command return :

> pbs\_server is pid 9043  
> pbs\_mom is pid 4803  
> pbs\_sched is pid 4869  
> pbs\_comm is 4686

**ps -ef | grep pbs** commad returns :

> root 4686 1 0 15:08 ? 00:00:00 /opt/pbs/sbin/pbs\_comm  
> root 4803 1 0 15:08 ? 00:00:00 /opt/pbs/sbin/pbs\_mom  
> root 4869 1 0 15:08 ? 00:00:00 /opt/pbs/sbin/pbs\_sched  
> root 5531 1 0 15:08 ? 00:00:00 /opt/pbs/sbin/pbs\_ds\_monitor monitor  
> root 9043 1 0 15:08 ? 00:00:00 /opt/pbs/sbin/pbs\_server.bin  
> nekcorp 30691 22213 0 15:21 pts/2 00:00:00 grep --color=auto pbs\_

_ **netstat -tunap | grep pbs** _ command returns :

> tcp 0 0 0.0.0.0:17001 0.0.0.0:\* LISTEN 4686/pbs\_comm  
> tcp 0 0 0.0.0.0:15002 0.0.0.0:\* LISTEN 4803/pbs\_mom  
> tcp 0 0 0.0.0.0:15003 0.0.0.0:\* LISTEN 4803/pbs\_mom  
> tcp 0 0 0.0.0.0:15004 0.0.0.0:\* LISTEN 4869/pbs\_sched  
> tcp 0 1 192.168.1.49:89 192.168.1.97:17001 SYN\_SENT 4803/pbs\_mom  
> tcp 0 1 192.168.1.49:88 192.168.1.97:17001 SYN\_SENT 4869/pbs\_sched

The contents of /etc/pbs.conf are :

> PBS\_SERVER=centos7  
> PBS\_START\_SERVER=1  
> PBS\_START\_SCHED=1  
> PBS\_START\_COMM=1  
> PBS\_START\_MOM=1  
> PBS\_EXEC=/opt/pbs  
> PBS\_HOME=/var/spool/pbs  
> PBS\_CORE\_LIMIT=unlimited  
> PBS\_SCP=/bin/scp

Firewall is disable and selinux too.

To be honnest I do not understand what I am doing and what is the problem.

---

<div class="post-metadata">

### Author: ![nekcorp](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nekcorp](https://community.openpbs.org/u/nekcorp)
#### Post date: [December 25, 2018, 2:42pm UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/8 "2018-12-25T14:42:07Z")

</div>

So I do not know why but in my file /etc/pbs.conf the ip adress was not correct, the hostname too. I have change it and now when I use qsub and qstat I have not the error message.

but When I use qstat I have this :

> Job id Name User Time Use S Queue  
> '---------------- ---------------- ---------------- -------- - -----  
> 57.centos7 OPTISTRUCT12 nekcorp 00:00:01 E optistruct

This is a old job before I have the errno=113 message error.

when I want to kill them with qdel 57.centos7 I have this message :

> No route to host  
> qdel: cannot connect to server centos7 (errno=113)

---

<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: [December 25, 2018, 11:20pm UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/9 "2018-12-25T23:20:26Z")

</div>

Thank you for sharing your findings. Much appreciate it. Could you please update this line in the /etc/hosts to

192.168.1.97 centos7.home centos7

And then restart the pbs services.

Please delete the old job as below and restart the pbs services and then submit a job

`qdel -W force 57.centos7`

`qsub — /bin/hostname`

If it errors out then get strace output of qstat and qsub  
strace -o qstat\_strace.txt -tt -f -s 8192 qstat  
strace -o qsub\_strace.txt -tt -f -s 8192 qsub — /bin/hostname

---

<div class="post-metadata">

### Author: ![nekcorp](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@nekcorp](https://community.openpbs.org/u/nekcorp)
#### Post date: [December 26, 2018, 2:22pm UTC](https://community.openpbs.org/t/qsub-cannot-connect-to-server-centos7-errno-113/1366/10 "2018-12-26T14:22:39Z")

</div>

Thank a lot for your help, everything works.
