Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash Systemd服务日志文件中充斥着dhclient和Systemd日志_Bash_Amazon Web Services_Systemd - Fatal编程技术网

Bash Systemd服务日志文件中充斥着dhclient和Systemd日志

Bash Systemd服务日志文件中充斥着dhclient和Systemd日志,bash,amazon-web-services,systemd,Bash,Amazon Web Services,Systemd,我正在使用cron自动运行一个软件。为此,我提供了系统服务。从昨天开始,syslog文件有一些奇怪的内容 systemd[1]: Starting Cleanup of Temporary Directories... systemd[1]: systemd-tmpfiles-clean.service: Succeeded. systemd[1]: Finished Cleanup of Temporary Directories. dhclient[572]: DHCPREQUEST fo

我正在使用cron自动运行一个软件。为此,我提供了系统服务。从昨天开始,syslog文件有一些奇怪的内容


systemd[1]: Starting Cleanup of Temporary Directories...
systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
systemd[1]: Finished Cleanup of Temporary Directories.
dhclient[572]: DHCPREQUEST for IP on ens5 to 10.0.40.1 port 67 (xid=0x7a760631)
dhclient[572]: DHCPACK of IP from 10.0.40.1 (xid=0x3106767a)
dhclient[572]: bound to IP -- renewal in 1713 seconds.
systemd[1]: Created slice User Slice of UID 1000.
systemd[1]: Starting User Runtime Directory /run/user/1000...
systemd[1]: Finished User Runtime Directory /run/user/1000.
systemd[1]: Starting User Manager for UID 1000...
systemd[1914519]: Reached target Paths.
systemd[1914519]: Reached target Timers.
systemd[1914519]: Starting D-Bus User Message Bus Socket.
systemd[1914519]: Listening on GnuPG network certificate management daemon.
systemd[1914519]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
systemd[1914519]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
systemd[1914519]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
systemd[1914519]: Listening on GnuPG cryptographic agent and passphrase cache.
systemd[1914519]: Listening on debconf communication socket.
systemd[1914519]: Listening on REST API socket for snapd user session agent.
systemd[1914519]: Listening on D-Bus User Message Bus Socket.
systemd[1914519]: Reached target Sockets.
systemd[1914519]: Reached target Basic System.
systemd[1914519]: Reached target Main User Target.
systemd[1914519]: Startup finished in 97ms.
systemd[1]: Started User Manager for UID 1000.
systemd[1]: Started Session 996 of user ubuntu.
CRON[1914622]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
dhclient[572]: DHCPREQUEST for IP on ens5 to 10.0.40.1 port 67 (xid=0x7a760631)
dhclient[572]: DHCPACK of IP from 10.0.40.1 (xid=0x3106767a)
dhclient[572]: bound to IP -- renewal in 1417 seconds.
systemd[1]: Started Session 999 of user ubuntu.
dhclient[572]: DHCPREQUEST for IP on ens5 to 10.0.40.1 port 67 (xid=0x7a760631)
dhclient[572]: DHCPACK of IP from 10.0.40.1 (xid=0x3106767a)
dhclient[572]: bound to IP -- renewal in 1652 seconds.


用于执行cron的Bash脚本:


#!/bin/bash
result=$(curl --header Connection:close --no-keepalive --http2 "https://example.com")
resp=($result)
if [ ${#resp[@]} -gt 0 ]; then
    for i in "${resp[@]}"
    do
        command_string="https://example.com/$i"
        space_string=" "
       final_command_string=${final_command_string}${command_string}${space_string} 
    done
    curl --header Connection:close --no-keepalive --http2 $final_command_string
fi

我在我的服务中第一次得到这些日志。我使用的是AWS EC2机器

有什么不对劲吗