LXC 中的两个网络接口 → Systemd 被阻止 5 分钟(服务停止)

LXC 中的两个网络接口 → Systemd 被阻止 5 分钟(服务停止)

我使用 proxmox 来虚拟化一些 LXC。最近我想在 Debian 11 LXC 版本的 Turnkey 上添加第二个接口……但 systemd 有一个奇怪的问题。当我配置两个静态接口时,systemctl 会停止工作或类似情况。apache2 pihole 或 postfix 等服务会停止,当我启动它们时什么都没有发生,没有输出和日志……什么都没有。我必须通过 DHCP 配置第二个接口才能使其工作。启动五分钟后一切正常……根据 journalctl 有一个服务停止了,但我不知道该怎么办 :(

-- Journal begins at Sun 2023-03-26 20:45:28 CEST, ends at Thu 2023-03-30 04:48:44 CEST. --
Mar 30 04:31:22 dns-sturm systemd-journald[45]: Journal started
Mar 30 04:31:22 dns-sturm systemd-journald[45]: Runtime Journal (/run/log/journal/edf9400ae9bb497ebdae3986c16f8a90) is 8.0M, max 1.2G, 1.2G free.
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Flush Journal to Persistent Storage...
Mar 30 04:31:22 dns-sturm mount[49]: mount: /sys/kernel/config: permission denied.
Mar 30 04:31:22 dns-sturm systemd-journald[45]: Time spent on flushing to /var/log/journal/edf9400ae9bb497ebdae3986c16f8a90 is 3.742ms for 4 entries.
Mar 30 04:31:22 dns-sturm systemd-journald[45]: System Journal (/var/log/journal/edf9400ae9bb497ebdae3986c16f8a90) is 16.0M, max 4.0G, 3.9G free.
Mar 30 04:31:22 dns-sturm systemd[1]: Finished Flush Journal to Persistent Storage.
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Create Volatile Files and Directories...
Mar 30 04:31:22 dns-sturm systemd-networkd[62]: Failed to increase receive buffer size for general netlink socket, ignoring: Operation not permitted
Mar 30 04:31:22 dns-sturm systemd-networkd[62]: Enumeration completed
Mar 30 04:31:22 dns-sturm systemd[1]: Started Network Service.
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Wait for Network to be Configured...
Mar 30 04:31:22 dns-sturm systemd[1]: Finished Create Volatile Files and Directories.
Mar 30 04:31:22 dns-sturm systemd-networkd[62]: eth0: Lost carrier
Mar 30 04:31:22 dns-sturm systemd-networkd[62]: eth0: Gained carrier
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Network Name Resolution...
Mar 30 04:31:22 dns-sturm systemd-journald[45]: Forwarding to syslog missed 1 messages.
Mar 30 04:31:22 dns-sturm systemd[1]: Condition check resulted in Network Time Synchronization being skipped.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target System Time Set.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target System Time Synchronized.
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Update UTMP about System Boot/Shutdown...
Mar 30 04:31:22 dns-sturm systemd[1]: Finished Update UTMP about System Boot/Shutdown.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target System Initialization.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Daily apt download activities.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Daily apt upgrade and clean activities.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Periodic ext4 Online Metadata Check for All Filesystems.
Mar 30 04:31:22 dns-sturm systemd[1]: Condition check resulted in Discard unused blocks once a week being skipped.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Daily rotation of log files.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Daily man-db regeneration.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Clean PHP session files every 30 mins.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Daily Cleanup of Temporary Directories.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target Timers.
Mar 30 04:31:22 dns-sturm systemd[1]: Listening on D-Bus System Message Bus Socket.
Mar 30 04:31:22 dns-sturm systemd[1]: Listening on OpenBSD Secure Shell server socket.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target Sockets.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target Basic System.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Regular background program processing daemon.
Mar 30 04:31:22 dns-sturm systemd[1]: Started D-Bus System Message Bus.
Mar 30 04:31:22 dns-sturm cron[99]: (CRON) INFO (pidfile fd = 3)
Mar 30 04:31:22 dns-sturm cron[99]: (CRON) INFO (Running @reboot jobs)
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Remove Stale Online ext4 Metadata Check Snapshots...
Mar 30 04:31:22 dns-sturm systemd[1]: Condition check resulted in getty on tty2-tty6 if dbus and logind are not available being skipped.
Mar 30 04:31:22 dns-sturm systemd[1]: Starting System Logging Service...
Mar 30 04:31:22 dns-sturm systemd[1]: Starting User Login Management...
Mar 30 04:31:22 dns-sturm systemd[1]: Finished Wait for Network to be Configured.
Mar 30 04:31:22 dns-sturm CRON[105]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:31:22 dns-sturm CRON[103]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:31:22 dns-sturm CRON[104]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:31:22 dns-sturm CRON[111]: (root) CMD (sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y)
Mar 30 04:31:22 dns-sturm CRON[112]: (root) CMD (   PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker reboot)
Mar 30 04:31:22 dns-sturm CRON[113]: (root) CMD (/usr/sbin/logrotate --state /var/lib/logrotate/pihole /etc/pihole/logrotate)
Mar 30 04:31:22 dns-sturm systemd-networkd[62]: eth1: Link UP
Mar 30 04:31:22 dns-sturm systemd-networkd[62]: eth1: Gained carrier
Mar 30 04:31:22 dns-sturm rsyslogd[108]: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd.  [v8.2102.0]
Mar 30 04:31:22 dns-sturm systemd[1]: Started System Logging Service.
Mar 30 04:31:22 dns-sturm rsyslogd[108]: imklog: cannot open kernel log (/proc/kmsg): Permission denied.
Mar 30 04:31:22 dns-sturm rsyslogd[108]: activation of module imklog failed [v8.2102.0 try https://www.rsyslog.com/e/2145 ]
Mar 30 04:31:22 dns-sturm rsyslogd[108]: [origin software="rsyslogd" swVersion="8.2102.0" x-pid="108" x-info="https://www.rsyslog.com"] start
Mar 30 04:31:22 dns-sturm sudo[115]:     root : PWD=/root ; USER=root ; COMMAND=/usr/bin/apt-get update
Mar 30 04:31:22 dns-sturm sudo[115]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:31:22 dns-sturm CRON[104]: pam_unix(cron:session): session closed for user root
Mar 30 04:31:22 dns-sturm ifup[122]: RTNETLINK answers: File exists
Mar 30 04:31:22 dns-sturm ifup[61]: ifup: failed to bring up eth1
Mar 30 04:31:22 dns-sturm systemd-resolved[90]: Positive Trust Anchors:
Mar 30 04:31:22 dns-sturm systemd-resolved[90]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Mar 30 04:31:22 dns-sturm systemd-resolved[90]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa 168.192.in-addr.arpa d.f.ip6.arpa corp home internal intranet lan local private test
Mar 30 04:31:22 dns-sturm systemd-resolved[90]: Using system hostname 'dns-sturm'.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Network Name Resolution.
Mar 30 04:31:22 dns-sturm systemd-logind[109]: New seat seat0.
Mar 30 04:31:22 dns-sturm systemd[1]: Started User Login Management.
Mar 30 04:31:22 dns-sturm systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 04:31:22 dns-sturm systemd[1]: networking.service: Failed with result 'exit-code'.
Mar 30 04:31:22 dns-sturm systemd[1]: Failed to start Raise network interfaces.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target Network.
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Permit User Sessions...
Mar 30 04:31:22 dns-sturm systemd[1]: Starting Unbound DNS server...
Mar 30 04:31:22 dns-sturm systemd[1]: Finished Permit User Sessions.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Console Getty.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Container Getty on /dev/tty1.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Container Getty on /dev/tty2.
Mar 30 04:31:22 dns-sturm systemd[1]: Reached target Login Prompts.
Mar 30 04:31:22 dns-sturm unbound[158]: [1680143482] unbound[158:0] warning: so-rcvbuf 1048576 was not granted. Got 425984. To fix: start with root permissions(linux) or sysctl bigger net.core.rmem_max(linux) or kern.ipc.maxsockbuf(bsd) values.
Mar 30 04:31:22 dns-sturm systemd[1]: Started Unbound DNS server.
Mar 30 04:31:22 dns-sturm systemd[1]: Condition check resulted in Unbound DNS server via resolvconf being skipped.
Mar 30 04:31:22 dns-sturm unbound[158]: [158:0] info: start of service (unbound 1.13.1).
Mar 30 04:31:22 dns-sturm systemd[1]: e2scrub_reap.service: Succeeded.
Mar 30 04:31:22 dns-sturm systemd[1]: Finished Remove Stale Online ext4 Metadata Check Snapshots.
Mar 30 04:31:23 dns-sturm sudo[115]: pam_unix(sudo:session): session closed for user root
Mar 30 04:31:23 dns-sturm sudo[162]:     root : PWD=/root ; USER=root ; COMMAND=/usr/bin/apt-get upgrade -y
Mar 30 04:31:23 dns-sturm sudo[162]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:31:23 dns-sturm sudo[162]: pam_unix(sudo:session): session closed for user root
Mar 30 04:31:23 dns-sturm sudo[166]:     root : PWD=/root ; USER=root ; COMMAND=/usr/bin/apt-get autoremove -y
Mar 30 04:31:23 dns-sturm sudo[166]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:31:23 dns-sturm sudo[166]: pam_unix(sudo:session): session closed for user root
Mar 30 04:31:23 dns-sturm CRON[105]: pam_unix(cron:session): session closed for user root
Mar 30 04:31:24 dns-sturm systemd-networkd[62]: eth0: Gained IPv6LL
Mar 30 04:31:24 dns-sturm systemd-networkd[62]: eth1: Gained IPv6LL
Mar 30 04:31:34 dns-sturm login[151]: pam_unix(login:session): session opened for user root(uid=0) by LOGIN(uid=0)
Mar 30 04:31:34 dns-sturm login[151]: pam_systemd(login:session): Failed to create session: Seat has no VTs but VT number not 0
Mar 30 04:31:34 dns-sturm login[209]: ROOT LOGIN  on '/dev/tty1'
Mar 30 04:31:52 dns-sturm CRON[103]: pam_unix(cron:session): session closed for user root
Mar 30 04:31:52 dns-sturm systemd-journald[45]: Forwarding to syslog missed 45 messages.
Mar 30 04:36:23 dns-sturm systemd[1]: ifupdown-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 04:36:23 dns-sturm systemd[1]: ifupdown-wait-online.service: Failed with result 'exit-code'.
Mar 30 04:36:23 dns-sturm systemd[1]: Failed to start Wait for network to be configured by ifupdown.
Mar 30 04:36:23 dns-sturm systemd[1]: Reached target Network is Online.
Mar 30 04:36:23 dns-sturm systemd[1]: Starting Pi-hole FTL...
Mar 30 04:36:23 dns-sturm systemd[1]: Started Pi-hole FTL.
Mar 30 04:36:23 dns-sturm systemd[1]: Reached target Host and Network Name Lookups.
Mar 30 04:36:23 dns-sturm systemd[1]: Starting The Apache HTTP Server...
Mar 30 04:36:23 dns-sturm systemd[1]: Starting Postfix Mail Transport Agent (instance -)...
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] Using log file /var/log/pihole/FTL.log
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] ########## FTL started on dns-sturm! ##########
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] FTL branch: master
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] FTL version: v5.22
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] FTL commit: eb197891
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] FTL date: 2023-03-22 21:21:35 +0000
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] FTL user: pihole
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] Compiled for x86_64 (compiled on CI) using gcc (Debian 8.3.0-6) 8.3.0
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    SOCKET_LISTENING: only local
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    AAAA_QUERY_ANALYSIS: Show AAAA queries
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    MAXDBDAYS: max age for stored queries is 365 days
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    RESOLVE_IPV6: Resolve IPv6 addresses
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    RESOLVE_IPV4: Resolve IPv4 addresses
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    DBINTERVAL: saving to DB file every minute
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    DBFILE: Using /etc/pihole/pihole-FTL.db
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    MAXLOGAGE: Importing up to 24.0 hours of log data
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    PRIVACYLEVEL: Set to 0
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    IGNORE_LOCALHOST: Show queries from localhost
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    BLOCKINGMODE: Null IPs for blocked domains
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    DBIMPORT: Importing history from database
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    PIDFILE: Using /run/pihole-FTL.pid
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    SOCKETFILE: Using /run/pihole/FTL.sock
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    MACVENDORDB: Using /etc/pihole/macvendor.db
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    GRAVITYDB: Using /etc/pihole/gravity.db
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    PARSE_ARP_CACHE: Active
Mar 30 04:36:23 dns-sturm systemd-journald[45]: Forwarding to syslog missed 16 messages.
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    CNAME_DEEP_INSPECT: Active
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    DELAY_STARTUP: No delay requested.
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    NICE: Cannot change niceness to -10 (permission denied)
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    MAXNETAGE: Removing IP addresses and host names from network table after 365 days
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    NAMES_FROM_NETDB: Enabled, trying to get names from network database
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    EDNS0_ECS: Overwrite client from ECS information
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    REFRESH_HOSTNAMES: Periodically refreshing IPv4 names
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    RATE_LIMIT: Rate-limiting client making more than 10000 queries in 60 seconds
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    LOCAL_IPV4: Automatic interface-dependent detection of address
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    LOCAL_IPV6: Automatic interface-dependent detection of address
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    BLOCK_IPV4: Automatic interface-dependent detection of address
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    BLOCK_IPV6: Automatic interface-dependent detection of address
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    SHOW_DNSSEC: Enabled, showing automatically generated DNSSEC queries
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    MOZILLA_CANARY: Enabled
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    PIHOLE_PTR: internal PTR generation enabled (pi.hole)
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    ADDR2LINE: Enabled
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    REPLY_WHEN_BUSY: Drop queries when the database is busy
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    BLOCK_TTL: 2 seconds
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    BLOCK_ICLOUD_PR: Enabled
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    CHECK_LOAD: Enabled
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    CHECK_SHMEM: Warning if shared-memory usage exceeds 90%
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M]    CHECK_DISK: Warning if certain disk usage exceeds 90%
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M] Finished config file parsing
Mar 30 04:36:23 dns-sturm pihole-FTL[1197]: [2023-03-30 04:36:23.025 1197M
Mar 30 04:36:23 dns-sturm systemd[1]: Started The Apache HTTP Server.
Mar 30 04:36:23 dns-sturm postfix/postfix-script[1383]: starting the Postfix mail system
Mar 30 04:36:23 dns-sturm postfix/master[1385]: daemon started -- version 3.5.17, configuration /etc/postfix
Mar 30 04:36:23 dns-sturm systemd[1]: Started Postfix Mail Transport Agent (instance -).
Mar 30 04:36:23 dns-sturm systemd[1]: Starting Postfix Mail Transport Agent...
Mar 30 04:36:23 dns-sturm systemd[1]: Finished Postfix Mail Transport Agent.
Mar 30 04:36:23 dns-sturm systemd[1]: Reached target Multi-User System.
Mar 30 04:36:23 dns-sturm systemd[1]: Reached target Graphical Interface.
Mar 30 04:36:23 dns-sturm systemd[1]: Starting Update UTMP about System Runlevel Changes...
Mar 30 04:36:23 dns-sturm postfix/pickup[1386]: 334A822095A: uid=0 from=<root>
Mar 30 04:36:23 dns-sturm systemd[1]: systemd-update-utmp-runlevel.service: Succeeded.
Mar 30 04:36:23 dns-sturm systemd[1]: Finished Update UTMP about System Runlevel Changes.
Mar 30 04:36:23 dns-sturm systemd[1]: Startup finished in 5min 662ms.
Mar 30 04:36:23 dns-sturm postfix/cleanup[1390]: 334A822095A: message-id=<[email protected]>
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 334A822095A: from=<[email protected]>, size=1781, nrcpt=1 (queue active)
Mar 30 04:36:23 dns-sturm postfix/pickup[1386]: 344ED220933: uid=0 from=<root>
Mar 30 04:36:23 dns-sturm postfix/cleanup[1390]: 344ED220933: message-id=<[email protected]>
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 344ED220933: from=<[email protected]>, size=919, nrcpt=1 (queue active)
Mar 30 04:36:23 dns-sturm postfix/pickup[1386]: 349FF220936: uid=0 from=<root>
Mar 30 04:36:23 dns-sturm postfix/cleanup[1390]: 349FF220936: message-id=<[email protected]>
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 349FF220936: from=<[email protected]>, size=919, nrcpt=1 (queue active)
Mar 30 04:36:23 dns-sturm postfix/pickup[1386]: 34ED7220932: uid=0 from=<root>
Mar 30 04:36:23 dns-sturm postfix/cleanup[1390]: 34ED7220932: message-id=<[email protected]>
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 34ED7220932: from=<[email protected]>, size=1781, nrcpt=1 (queue active)
Mar 30 04:36:23 dns-sturm postfix/local[1392]: 334A822095A: to=<[email protected]>, orig_to=<root>, relay=local, delay=300, delays=300/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 334A822095A: removed
Mar 30 04:36:23 dns-sturm postfix/local[1392]: 344ED220933: to=<[email protected]>, orig_to=<root>, relay=local, delay=270, delays=270/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 344ED220933: removed
Mar 30 04:36:23 dns-sturm postfix/local[1392]: 34ED7220932: to=<[email protected]>, orig_to=<root>, relay=local, delay=589, delays=589/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 30 04:36:23 dns-sturm postfix/qmgr[1387]: 34ED7220932: removed
Mar 30 04:36:24 dns-sturm postfix/local[1393]: 349FF220936: to=<[email protected]>, orig_to=<root>, relay=local, delay=561, delays=560/0/0/0.97, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 30 04:36:24 dns-sturm postfix/qmgr[1387]: 349FF220936: removed
Mar 30 04:37:23 dns-sturm systemd-journald[45]: Forwarding to syslog missed 24 messages.
Mar 30 04:39:01 dns-sturm CRON[1407]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:39:01 dns-sturm CRON[1408]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Mar 30 04:39:01 dns-sturm systemd[1]: Starting Clean php session files...
Mar 30 04:39:01 dns-sturm CRON[1407]: pam_unix(cron:session): session closed for user root
Mar 30 04:39:01 dns-sturm systemd[1]: phpsessionclean.service: Succeeded.
Mar 30 04:39:01 dns-sturm systemd[1]: Finished Clean php session files.
Mar 30 04:46:23 dns-sturm systemd[1]: Starting Cleanup of Temporary Directories...
Mar 30 04:46:23 dns-sturm systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Mar 30 04:46:23 dns-sturm systemd[1]: Finished Cleanup of Temporary Directories.
Mar 30 04:47:52 dns-sturm sudo[1497]:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/journalctl
Mar 30 04:47:52 dns-sturm sudo[1498]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 30 04:47:52 dns-sturm sudo[1498]: pam_unix(sudo:session): session closed for user root
Mar 30 04:48:44 dns-sturm sudo[1510]:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/journalctl -b
Mar 30 04:48:44 dns-sturm sudo[1510]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)

这是我的网络配置:

root@dns-sturm:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0@if415: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 72:0c:09:0b:63:3e brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.4.49.1/20 brd 10.4.63.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::700c:9ff:fe0b:633e/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1@if419: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether c6:6e:82:7f:2b:d3 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.4.49.2/20 brd 10.4.63.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::c46e:82ff:fe7f:2bd3/64 scope link 
       valid_lft forever preferred_lft forever
root@dns-sturm:~# 
root@dns-sturm:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 10.4.49.1/20
        gateway 10.4.48.3

auto eth1
iface eth1 inet static
        address 10.4.49.2/20
        gateway 10.4.48.3

也许有人遇到了同样的问题或者知道该怎么做... :) 乔纳森

答案1

apache2 pihole 或 postfix 等服务已停止运行,当我启动它们时,什么也没有发生,也没有输出和日志

他们的启动作业可能正在等待另一项服务。使用systemctl list-jobs

当我配置两个静态接口时

请注意实际配置它们的失败:

Mar 30 04:31:22 dns-sturm ifup[122]: RTNETLINK answers: File exists
Mar 30 04:31:22 dns-sturm ifup[61]: ifup: failed to bring up eth1

一旦该参数转换为路由,它gateway实际上就不再是特定于接口的;唯一键就是“目的地 + 网关 + 度量”。如果您有两条相同的路由,它们具有相同的网关和相同的度量(即成本值),则第二条路由将无法成功添加。

当您使用 Debian 的 ifupdown 时,就会出现问题,它 1) 不关注要求使用的一个接口之外的全局配置,2) 以相当糟糕的方式处理这种情况 - 只要任何操作失败它就会中止,即使目标已经实现(例如路由已经存在或接口已经启动)。

避免这种情况的一种方法是手动metric为每个接口配置不同的参数。另一种方法是首先避免重复配置,删除其中一个参数,gateway因为它们大多是多余的。(事实上,您只需在相同的接口,具有两个iface eth0块并避免了对 eth1 的需要。

相关内容