# Lost connection to API on CentOS 7

**URL:** <https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735>\
**Category:** Synology\
**Created:** [April 9, 2018, 6:48am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735 "2018-04-09T06:48:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 9, 2018, 6:48am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/1 "2018-04-09T06:48:34Z")

</div>

HI, I'm green on pihole and some question in it. Anyone Can help.. thank a lot.

[root@CentDNS ~]# systemctl status dnsmasq  
● dnsmasq.service - DNS caching server.  
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)  
Active: active (running) since 一 2018-04-09 14:01:17 CST; 30min ago  
Main PID: 1094 (dnsmasq)  
CGroup: /system.slice/dnsmasq.service  
└─1094 /usr/sbin/dnsmasq -k

4月 09 14:01:17 CentDNS systemd[1]: Started DNS caching server..  
4月 09 14:01:17 CentDNS systemd[1]: Starting DNS caching server....

[root@CentDNS ~]#

[root@CentDNS ~]# systemctl status pihole-FTL -l  
● pihole-FTL.service - LSB: pihole-FTL daemon  
Loaded: loaded (/etc/rc.d/init.d/pihole-FTL; bad; vendor preset: disabled)  
Active: active (exited) since 一 2018-04-09 14:01:20 CST; 32min ago  
Docs: man:systemd-sysv-generator(8)  
Process: 1107 ExecStart=/etc/rc.d/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

4月 09 14:01:17 CentDNS systemd[1]: Starting LSB: pihole-FTL daemon...  
4月 09 14:01:18 CentDNS pihole-FTL[1107]: Not running  
4月 09 14:01:19 CentDNS pihole-FTL[1107]: rm: 无法删除"/var/run/pihole/FTL.sock": 没有那个文件或目录  
4月 09 14:01:20 CentDNS su[1243]: (to pihole) root on none  
4月 09 14:01:20 CentDNS pihole-FTL[1107]: FTL started!  
4月 09 14:01:20 CentDNS systemd[1]: Started LSB: pihole-FTL daemon.

[root@CentDNS ~]# service pihole-FTL restart  
.Stopped  
rm: cannot remove '/var/run/pihole/FTL.sock': No such file or directory  
FTL started!

the web interface still in lost connection to api.

MY debug token is: 4h57wercuw

---

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 9, 2018, 6:52am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/2 "2018-04-09T06:52:11Z")

</div>

Oh,other information:  
Pi-hole Version v3.3.1 Web Interface Version v3.3 FTL Version v3.0

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [April 10, 2018, 7:58pm UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/3 "2018-04-10T19:58:35Z")

</div>

Can you tell me if you `/etc/init.d/pihole-FTL.service` file is equal to this: [https://github.com/pi-hole/pi-hole/blob/master/advanced/pihole-FTL.service](https://github.com/pi-hole/pi-hole/blob/master/advanced/pihole-FTL.service)

---

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 11, 2018, 3:17am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/4 "2018-04-11T03:17:38Z")

</div>

Thanks for your reply.

I compared the local file to the file on the server, which is consistent.

Pihole is a new installation. With the following command:  
yum -y install epel-release  
yum -y install net-tools  
yum -y update  
reboot  
...  
cd /opt  
curl -L [https://install.pi-hole.net](https://install.pi-hole.net) | bash

[root@CentDNS ~]# uname -a  
Linux CentDNS 3.10.0-693.21.1.el7.x86\_64 #1  
[root@CentDNS ~]# cat /etc/redhat-release  
Linux release 7.4.1708 (Core)

CentOS installed in the synology virtual machine . The iso file download from [https://www.centos.org](https://www.centos.org)

/var/run/pihole/FTL.sock is exists..

[root@CentDNS ~]# ls /var/run/pihole/FTL.sock -l

srwxrwxrwx. 1 pihole pihole 0 4月 9 15:05 /var/run/pihole/FTL.sock

![%E5%9B%BE%E7%89%87](https://discourse-cdn.pi-hole.net/uploads/default/optimized/2X/b/b1b0420498f83a13b1f7d117b0e0cf65968ad365_2_690x45.jpg)

BTW. pihole-FTL.service IS pihole-FTL ?

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [April 12, 2018, 10:10am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/5 "2018-04-12T10:10:02Z")

</div>

Can you try a `pihole -r` \> _Repair_?

---

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 12, 2018, 2:46pm UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/6 "2018-04-12T14:46:49Z")

</div>

Try to pihole -r. , but not work.

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [April 12, 2018, 11:36pm UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/7 "2018-04-12T23:36:03Z")

</div>

What behavior do you see now?

---

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 13, 2018, 12:50am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/8 "2018-04-13T00:50:44Z")

</div>

Refresh the web times. Same as the previous interface:

 ![pihole](https://discourse.pi-hole.net/uploads/default/original/2X/0/040f5b82f9cf3d3fc466cd203ed99ec3da2c46f9.jpg)

the services Status

 ![%E5%9B%BE%E7%89%87](https://discourse.pi-hole.net/uploads/default/original/2X/8/80e6beeea9e42485a2a4a73b7aa1c3aa1ee74bdd.jpg)

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [April 13, 2018, 1:32am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/9 "2018-04-13T01:32:54Z")

</div>

Can you run through the debugging steps here:

> **[GitHub - pi-hole/FTL: The Pi-hole FTL engine](https://github.com/pi-hole/FTL#debugging-pihole-ftl)**
>
> The Pi-hole FTL engine

---

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 13, 2018, 5:55am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/10 "2018-04-13T05:55:44Z")

</div>

![%E5%9B%BE%E7%89%87](https://discourse.pi-hole.net/uploads/default/original/2X/c/c9d71b0fadc3a79defe96c41e9c9ff0c294b12b5.jpg)

 ![%E5%9B%BE%E7%89%87](https://discourse.pi-hole.net/uploads/default/original/2X/3/336a01df9f4568a0b884fafd30d5601eeace8adc.jpg)

Is that so? What do I need to do next?

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [April 20, 2018, 8:43pm UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/11 "2018-04-20T20:43:44Z")

</div>

What is the output of this command?

```auto
echo ">stats" | nc localhost 4711

```

---

<div class="post-metadata">

**Author:** ![vincentwoo](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/e480ec/32.png) [@vincentwoo](https://discourse.pi-hole.net/u/vincentwoo)\
**Post date:** [April 21, 2018, 9:31am UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/12 "2018-04-21T09:31:41Z")

</div>

thank you for your reply..

result is follow:

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/e/e18053c7192b3797d0c8db1f00cb9f4e0969515e.jpg)

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 2, 2018, 4:32pm UTC](https://discourse.pi-hole.net/t/lost-connection-to-api-on-centos-7/8735/13 "2018-05-02T16:32:37Z")

</div>

Make a new debug token if you're still having this issue.
