WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can tinylinux be used as a stable DNS  (Read 5724 times)

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Can tinylinux be used as a stable DNS
« on: April 16, 2023, 06:00:00 PM »
Hello,everyone.I am using tinycore64, version 5.4.3.After tinylinux starts, all programs are placed in memory to run. The system has compiled and installed version 9.11.35. Recently, it has been found that the DNS service frequently experiences intermittent unresponsive states, such as telnet IP 53 failure and nslookup domain.name IP failure.I have modified and optimized some kernel parameters and also adjusted ulimit parameters, but the fault persists. I really don't quite understand why. Please ask everyone if tinylinux is not suitable for DNS service systems.
Code: [Select]
net.core.rmem_default = 67108864
net.core.rmem_max = 67108864
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.udp_rmem_min = 1501632
net.core.wmem_default = 67108864
net.core.wmem_max = 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.udp_wmem_min = 1501632
vm.lowmem_reserve_ratio = 256 256 32 0

Code: [Select]
netstat -s -u
IcmpMsg:
    InType3: 53854
    InType5: 29
    InType8: 103009
    InType11: 1912
    OutType0: 103009
    OutType3: 752672
Udp:
    35873971 packets received
    1116273 packets to unknown port received.
    127929 packet receive errors
    57372802 packets sent
    127819 receive buffer errors
    0 send buffer errors
    IgnoredMulti: 13692
UdpLite:
IpExt:
    InMcastPkts: 32074
    OutMcastPkts: 8271
    InBcastPkts: 13692
    InOctets: 1378192101
    OutOctets: -1523059425
    InMcastOctets: 2571852
    OutMcastOctets: 658752
    InBcastOctets: 2262805
    InNoECTPkts: 41282534
    InECT0Pkts: 5512

Code: [Select]
ifconfig eth0
eth0      Link encap:Ethernet  HWaddr D4:7C:44:D2:5B:69 
          inet addr:IP Bcast:  Mask:255.255.255.0
          inet6 addr: IPV6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41340621 errors:0 dropped:10 overruns:0 frame:0
          TX packets:61277449 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6253258711 (5.8 GiB)  TX bytes:12207575731 (11.3 GiB)
          Memory:92200000-9227ffff

In addition, I found that if quagga(v1.2.4) software is used for anycast deployment of ospf, the frequency of parsing failures is higher.

named:
Code: [Select]
cat /proc/770859/limits
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            102400000            102400000            bytes     
Max core file size        unlimited            unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             127717               127717               processes
Max open files            1048576              1048576              files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       127717               127717               signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                   
Max realtime priority     0                    0                   
Max realtime timeout      unlimited            unlimited            us
   

    [EDIT]: Added code tags.  Rich
« Last Edit: April 18, 2023, 05:43:01 PM by Rich »

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10974
Re: Can tinylinux be used as a stable DNS
« Reply #1 on: April 16, 2023, 11:07:18 PM »
You'd have to look at your DNS server logs etc. Could be anything.
The only barriers that can stop you are the ones you create yourself.

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Re: Can tinylinux be used as a stable DNS
« Reply #2 on: April 16, 2023, 11:39:00 PM »
This is the strange thing. When the fault occurs, the query.log file is empty, telnet IP 53 fails, and nslookup domain 127.0.0.1 fails./var/log/rond.log is also empty. It seems that when a malfunction occurs, the entire system seems to freeze, with cron not executing, SSH new connections waiting, and existing SSH connections functioning normally.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1023
Re: Can tinylinux be used as a stable DNS
« Reply #3 on: April 17, 2023, 03:30:24 AM »
The version you have is quite old. I've been using TC and bind as my internet facing domain DNS for years without any problems. Are you using iptables with logging also? The system logs from that could be quite helpful. Some information about your configuration would be helpful, such as if you are using master/slave replication, a chroot jail, split horizon, etc. I should have an updated extension for bind 9.18 available for TC 14 this week. I need to do some more testing. Would you be able to upgrade once the extensions are available on the mirrors?

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Re: Can tinylinux be used as a stable DNS
« Reply #4 on: April 17, 2023, 05:41:02 PM »
The version you have is quite old. I've been using TC and bind as my internet facing domain DNS for years without any problems. Are you using iptables with logging also? The system logs from that could be quite helpful. Some information about your configuration would be helpful, such as if you are using master/slave replication, a chroot jail, split horizon, etc. I should have an updated extension for bind 9.18 available for TC 14 this week. I need to do some more testing. Would you be able to upgrade once the extensions are available on the mirrors?
Thanks for your reply.The 9.11 version has not encountered similar issues on other Linux systems, but has encountered this issue on TC. I think it may not necessarily be a bind issue, because when this situation occurs, the crond. log that the system automatically runs every minute is not running when the fault occurs. The newly established SSH link from the client is also in the waiting phase, and the root prompt does not appear until the fault is automatically restored. Do you have any other suggestions for viewing?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Re: Can tinylinux be used as a stable DNS
« Reply #5 on: April 17, 2023, 09:58:44 PM »
Hi zbs888
... It seems that when a malfunction occurs, the entire system seems to freeze, with cron not executing, SSH new connections waiting, and existing SSH connections functioning normally.
If the system is still responsive enough to run commands from a terminal, here
are a few things you could try.

This will create 5 snapshots spaced 1 second apart called ps1.txt through ps5.txt:
Code: [Select]
for i in `seq 1 1 5`; do sleep 1; ps aux > ps"$i".txt; done
This will display the results:
Code: [Select]
grep -v "0.0  0.0      0     0" ps1.txt | lessEntries that have  %CPU %MEM    VSZ   RSS  all set to zero will be filtered out.
Check if any process is consistently hogging CPU or MEM.
Processes with high RSS values are using the most RAM.
This lists the meaning of the codes in the  STAT  column:
https://askubuntu.com/a/360253

Run:
Code: [Select]
free -mLook at the  -/+ buffers/cache:  row. If its free column is approaching zero, your
memory requirements are greater than your RAM.
Look at the  Swap:  row and see if you are filling up swap space.

Run:
Code: [Select]
vmstat 1Look at the  si  and  so  columns to see if the system is busy swapping.
This link describes the columns displayed by vmstat:
https://phoenixnap.com/kb/vmstat-command#ftoc-heading-3

Create a baseline to compare against by first running the commands
when the system is operating normally.

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Re: Can tinylinux be used as a stable DNS
« Reply #6 on: April 17, 2023, 11:46:44 PM »
Thanks,sir,here is some result:
file in ps1--ps5:
Code: [Select]
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
named    288374 18.9 15.4 5980300 5082544 ?     Ssl  00:01 158:24 /opt/bind9/sbin/named -u named -c /opt/bind9/etc/named.conf
Due to loading RPZ in multiple regions, it takes up a lot of memory.

vmstat 1:
(normal)
Code: [Select]
root@AAA:~# vmstat 1
procs     -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free    buff  cache     si   so    bi    bo   in   cs us sy id wa st
 1  0      0 24639664   3692 2108904    0    0    52    79   74   63  4  3 93  1  0
 0  0      0 24639656   3692 2108976    0    0     0     0 3735 16767  5  5 90  0  0
 0  0      0 24639800   3700 2109076    0    0     0   432 3609 16210  6  4 90  1  0
 0  0      0 24639800   3700 2109128    0    0     0     0 3821 16340  5  4 92  0  0
 0  0      0 24639800   3700 2109200    0    0     0    32 3671 16029  5  4 91  0  0
 0  0      0 24639800   3700 2109304    0    0     0     0 3717 15870  5  4 91  0  0
 0  0      0 24639800   3700 2109372    0    0     0     0 3869 17196  5  5 90  0  0
 0  0      0 24639548   3708 2109464    0    0     0   428 3996 17018  5  5 89  1  0
 0  0      0 24639296   3708 2109560    0    0     0     0 3992 18611  5  4 91  0  0
 0  0      0 24639296   3708 2109680    0    0     0     0 4203 18668  5  4 91  0  0
^C

(fault)
Code: [Select]
root@AAA:~# vmstat 1
procs     -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free    buff  cache     si   so    bi    bo   in   cs us sy id wa st
 1  0      0 24609900   3792 2110680    0    0    52    79   75   64  4  3 93  1  0
 0  0      0 24605324   3792 2110664    0    0     0     0  398  281  1  1 98  0  0
 0  0      0 24605072   3792 2110664    0    0     0     0  235   27  0  0 100  0  0
 0  0      0 24604568   3792 2110664    0    0     0     0  231   52  0  0 100  0  0
 0  0      0 24604316   3792 2110644    0    0     0     0  263   55  0  0 100  0  0
 0  0      0 24603812   3792 2110644    0    0     0     0  232   55  0  0 100  0  0
 0  0      0 24603308   3792 2110652    0    0     0   104  263   68  0  0 100  0  0
 0  0      0 24602552   3792 2110652    0    0     0     0  301  101  0  0 100  0  0
 0  0      0 24602300   3792 2110652    0    0     0     0  269   62  0  0 100  0  0
 0  0      0 24602048   3792 2110652    0    0     0     0  278   64  0  0 100  0  0


free:
Code: [Select]
root@AAA:~# free -m
              total        used        free      shared  buff/cache   available
Mem:          32169        6044       24065        1907        2058       23810
Swap:          8191           0        8191

I found nothing helpfull,need help,sir

    [EDIT]: Added code tags.  Rich
« Last Edit: April 18, 2023, 06:02:03 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Re: Can tinylinux be used as a stable DNS
« Reply #7 on: April 18, 2023, 06:03:16 PM »
Hi zbs888
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Re: Can tinylinux be used as a stable DNS
« Reply #8 on: April 18, 2023, 06:37:03 PM »
Hi zbs888
Are you running this in some kind of virtual environment
like qemu, vmware, etc.?  Or maybe chroot ?

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Re: Can tinylinux be used as a stable DNS
« Reply #9 on: April 18, 2023, 07:09:26 PM »
Hi zbs888
Are you running this in some kind of virtual environment
like qemu, vmware, etc.?  Or maybe chroot ?
No,sir.
I run the Tiny and Bind services on multiple physical machines.
And I found that when problems arise, using the iptables command for setting can lock until problems end.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1023
Re: Can tinylinux be used as a stable DNS
« Reply #10 on: April 18, 2023, 07:47:25 PM »
Is the console of the physical machine showing the same slowness in responding as the network connections, or is it just the networking part that seems to be having problems? Do you have access to another computer on the same network running wireshark or tcpdump?

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Re: Can tinylinux be used as a stable DNS
« Reply #11 on: April 18, 2023, 07:57:56 PM »
Is the console of the physical machine showing the same slowness in responding as the network connections, or is it just the networking part that seems to be having problems? Do you have access to another computer on the same network running wireshark or tcpdump?
Thanks for your reply.
I remotely access these machines located in the remote computer room through SSH.
Code: [Select]
dmesg
[150339.863197] myshell (527294): drop_caches: 3
[150844.672845] myshell (532878): drop_caches: 3
[151455.711752] myshell (538907): drop_caches: 3
[152056.927311] myshell (547089): drop_caches: 3
[152763.928666] myshell (556228): drop_caches: 3
[153244.841877] myshell (566220): drop_caches: 3
[153850.340627] myshell (576719): drop_caches: 3

Code: [Select]
tail /var/log/kernel.log
Apr 19 09:40:07 localhost kernel: myshell (521604): drop_caches: 3
Apr 19 09:51:41 localhost kernel: myshell (527294): drop_caches: 3
Apr 19 10:00:06 localhost kernel: myshell (532878): drop_caches: 3
Apr 19 10:10:17 localhost kernel: myshell (538907): drop_caches: 3
Apr 19 10:20:18 localhost kernel: myshell (547089): drop_caches: 3
Apr 19 10:32:05 localhost kernel: myshell (556228): drop_caches: 3
Apr 19 10:40:06 localhost kernel: myshell (566220): drop_caches: 3
Apr 19 10:50:12 localhost kernel: myshell (576719): drop_caches: 3

I have run quagga on each machine and enabled a virtual IP on lo:1 to provide DNS services externally. I can access other machines in the same segment. What information do I need to filter and crawl to run tcpdump? Could you please give me some guidance

Offline andyj

  • Hero Member
  • *****
  • Posts: 1023
Re: Can tinylinux be used as a stable DNS
« Reply #12 on: April 18, 2023, 08:09:19 PM »
What I'm really trying to do is figure out what kind of problem you are having. I haven't heard anything yet which tells me for sure it's a computer problem or a networking problem.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11283
Re: Can tinylinux be used as a stable DNS
« Reply #13 on: April 18, 2023, 08:20:49 PM »
Hi andyj
... (fault)
Code: [Select]
root@AAA:~# vmstat 1
procs     -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free    buff  cache     si   so    bi    bo   in   cs us sy id wa st
 1  0      0 24609900   3792 2110680    0    0    52    79   75   64  4  3 93  1  0
 0  0      0 24605324   3792 2110664    0    0     0     0  398  281  1  1 98  0  0
 0  0      0 24605072   3792 2110664    0    0     0     0  235   27  0  0 100  0  0
 0  0      0 24604568   3792 2110664    0    0     0     0  231   52  0  0 100  0  0
 0  0      0 24604316   3792 2110644    0    0     0     0  263   55  0  0 100  0  0
 0  0      0 24603812   3792 2110644    0    0     0     0  232   55  0  0 100  0  0
 0  0      0 24603308   3792 2110652    0    0     0   104  263   68  0  0 100  0  0
 0  0      0 24602552   3792 2110652    0    0     0     0  301  101  0  0 100  0  0
 0  0      0 24602300   3792 2110652    0    0     0     0  269   62  0  0 100  0  0
 0  0      0 24602048   3792 2110652    0    0     0     0  278   64  0  0 100  0  0
...
Base on this it almost looks like the system is sleeping.
CPU idle time (id) is hovering at 100%.
CPU waiting (wa) for Input/Output is 0%.
Context switches (cs) are almost non-existent.

Offline zbs888

  • Newbie
  • *
  • Posts: 42
Re: Can tinylinux be used as a stable DNS
« Reply #14 on: April 18, 2023, 08:22:24 PM »
What I'm really trying to do is figure out what kind of problem you are having. I haven't heard anything yet which tells me for sure it's a computer problem or a networking problem.
Dear sir.My problem is on my computer, there are intermittent issues with the bind service being unable to connect.This issue may seem like a bind issue, but through some testing, I always feel that it doesn't seem like a bind issue.For example, when a problem occurs, using iptables for rule setting may get stuck, but iptables - L - nv can be executed; The programs that execute every minute in crond. log are no longer running, and existing SSH links can operate normally, but creating a new SSH connection machine will get stuck.I currently have no clue where to start, so please give me some advice.