尝试在启动时启用大容量接收机卸载,但没有运气。 /etc/systemd/system/pxw-network-offload.service [Unit] Description=PXW Network Offload After=network.target mlnx-en.d.service [Service] Type=oneshot ExecStart=/usr/local/sbin/pxw-network-offload.sh RemainAfterExit=true User=root [Install] WantedBy=multi-user.target 所以我启用服务: systemctl daemon-reload systemctl enable pxw-network-offload.service 一切似乎都很好。 然而,在重新启动服务器….没有任何事情发生 ethtool lro留下来。 但是,如果我之后运行脚本: /usr/local/sbin/pxw-network-offload.sh 它工作正常….
我在一个数字海洋液滴工作。 突然间networking连接丢失了。 只有我可以通过控制面板和基于Web的terminallogin这是同样的问题, 这里 (很好地解释我认为),但它解决了我一段时间(足够的时间来恢复我的分贝),但对其他文件不够。 不能再复制一次。
我有一个单元文件,我想修改一些属性。 我已经能够使用/etc/systemd/system/unitname.service.d/目录扩展所有的属性,但无法获得WantedBy属性的扩展。 原始单元文件(deluged.service) [Unit] Description=Deluge Bittorrent Client Daemon Wants=network-online.target After=network-online.target [Service] Type=simple User=media Group=media ExecStart=/usr/local/bin/deluged -d -u 0.0.0.0 [Install] WantedBy=multi-user.target /etc/systemd/system/deluged.service.d/override.conf [Unit] BindTo=sys-subsystem-net-devices-tun0.device After=sys-subsystem-net-devices-tun0.device [Service] ExecStart= ExecStart=/usr/local/bin/deluged -d -i 10.10.10.1 -u 0.0.0.0 [Install] WantedBy= WantedBy=sys-subsystem-net-devices-tun0.device 除了WantedBy当我运行systemctl enable deluged它似乎仍然正常工作,它仍然创build了multi-user的符号链接,并且在新的位置没有创build链接。 我已经search了关于扩展/重写的文档,我还没有看到任何关于WantedBy讨论,所以我不知道是否有可能扩展它。 我做错了什么或者是不可能的?
是否有一个systemctl命令来启动一个服务,recursion(在它之前)它需要的所有依赖关系? 我有时间了 > systemctl start service2 A dependency job for service2.service failed. See 'journalctl -xe' for details. > journalctl -xe Aug 10 09:06:21 … systemd[1]: Dependency failed for service 2 Service. — Subject: Unit service2.service has failed — Defined-By: systemd — Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel — — Unit service2.service has failed. — — The result is dependency. […]
我创build了一个自定义的服务文件,如下所示: cat /etc/systemd/system/aaa.service [Unit] Description=aaa main application After=syslog.target network-online.target [Service] Type=forking PIDFile=/usr/local/aaa_path/aaa/aaa.pid WorkingDirectory=/usr/local/aaa_path/aaa/ ExecStart=/usr/local/aaa_path/aaa/run_aaa.sh Restart=always RestartSec=5 [Install] WantedBy=multi-user.target 在检查状态时: systemctl status aaa 一切看起来不错,除了: … systemd[1]: aaa.service: Supervising process 18285 which is not our child. We'll most likely not notice when it exits. 想知道为什么这个信息是显示,如果有什么需要关心的? 我的ExecStart是名为run_aaa.sh的bash脚本; 它所做的是准备一些环境variables,运行一些必需的维护脚本,最后在后台运行带有一些dynamic命令行选项的aaa二进制文件(作为守护进程) – 然后退出(run_aaa.sh脚本退出,aaa守护进程二进制文件继续在后台运行,并维护系统知道的自己的PID文件) 我知道systemd正在运行run_aaa.sh,并期望它fork(因为我指定了type = forking),它实际上是通过在后台运行“aaa”二进制守护进程并在之后退出来实现“fork”。 另外我指定了PIDFilepath,我的aaa二进制文件维护了这个PIDFile,所以为什么systemd会抱怨它可能无法监督我的守护进程? 有没有更好的方式来configuration这个用例的服务? (我必须使用run_aaa.sh脚本才能执行我的二进制文件)
当我们在远程机器上configuration和启动防火墙时,我们有非常奇怪的问题 当我们运行VIA ssh的以下命令(来自bash脚本)时, 我们有Redhat 7机器 systemctl启动firewalld.service 脚本示例: ssh $USER@$IP systemctl enable firewalld.service ssh $USER@$IP systemctl start firewalld.service 那么我们从命令中得到关于超时的消息 – systemctl start firewalld.service 但是当我们在机器上运行 – systemctl start firewalld.service手册 然后我们访问来运行它 那么为什么威盛SSH我们不能运行命令,但本地我们可以运行它? 这里有什么区别?
我正在尝试在Vagrant Ubuntu 16.04上设置一个名为project的简单uwsgi服务。 它应该启动一个简单的Flask应用程序,Nginx可以与之交谈。 在运行systemctl start project ,我可以使服务工作,但在systemctl start project启动后无法获取服务。 这是我的project.ini : [uwsgi] module = wsgi:app master = true processes = 5 socket = /tmp/project.sock uid = ubuntu gid = ubuntu chmod-socket = 666 vacuum = true die-on-term = true logto = /tmp/project.log 这是我的/etc/systemd/system/project.service : [Unit] Description=uWSGI instance to serve project After=network.target [Service] User=vagrant Group=vagrant […]
我试图运行一个PHP脚本24小时与systemd。 脚本的terminal输出通常是不相关的,所以我设置“StandardOutput = 0”和“StandardError = 0”,以避免千兆字节的数据混乱的日志文件。 但是当我不时地使用它时,看到这两者真是太棒了: sudo systemctl status xyz.service 我发现没有办法做到这一点 – 这就是我所拥有的: [Unit] Description=xyz.php [Service] ExecStart=/xyz.php Restart=always RestartSec=10 StandardOutput=null StandardError=null [Install] WantedBy=multi-user.target
我在/etc/init.d中有一个由init脚本pipe理的自定义服务,在升级到CentOS 7之后,在systemd中,“systemctl restart service”无法正常工作。 我需要执行两次'systemctl restart service'使其重新启动(第一次只停止它,停止后不启动它)。 我不知道到底发生了什么事,但是如果我使用'/etc/init.d/service stop'来停止这个服务,这个进程将被终止,并且不会显示在'ps aux'中,但是'systemctl status service'表示它是“活性”。 这是/etc/init.d中的init脚本: #!/bin/bash # # Startup script for the service # chkconfig: 2345 80 20 # description: a service PID_FILE=/var/run/pidfile.pid LOG_FILE=/var/log/serviceslogs #Necessary environment variables export JAVA_HOME="/usr/java/latest" #export JAVA_HOME="/root/java-8-oracle" if test \! -d "${JAVA_HOME}"; then echo "$0: the JAVA_HOME exported value is not defined correctly" […]
真的希望有人能帮助我。 我有一个CoreOS的etcd2成员的磁盘填满。 重启后etcd2的方式不好。 最后,我删除了/ var / lib / etcd2 /成员数据目录,并按照说明去除并重新将计算机添加到我的群集中: https : //coreos.com/etcd/docs/latest/runtime- configuration.html#删除-A-构件 但是,虽然我可以手动运行etcd2,但尝试使用systemctl启动它不起作用。 这是etcd2.service: [Unit] Description=etcd2 Conflicts=etcd.service [Service] User=etcd Type=notify Environment=ETCD_DATA_DIR=/var/lib/etcd2 Environment=ETCD_NAME=%m ExecStart=/usr/bin/etcd2 Restart=always RestartSec=10s LimitNOFILE=40000 TimeoutStartSec=0 [Install] WantedBy=multi-user.target # /run/systemd/system/etcd2.service.d/10-oem.conf [Service] Environment=ETCD_ELECTION_TIMEOUT=1200 # /run/systemd/system/etcd2.service.d/20-cloudinit.conf [Service] Environment="ETCD_ADVERTISE_CLIENT_URLS=http://172.31.9.22:2379,http://172.31.9.22:4001" Environment="ETCD_DISCOVERY=https://discovery.etcd.io/567d080563e28e62cf886e48425f632b" Environment="ETCD_INITIAL_ADVERTISE_PEER_URLS=http://172.31.9.22:2380" Environment="ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379" Environment="ETCD_LISTEN_PEER_URLS=http://172.31.9.22:2380" Environment="ETCD_DEBUG=true" 我添加了ETCD_DEBUG = true来尝试改进日志输出。 说到: Feb 26 07:23:36 geo-coreos-database-02 systemd[1]: Starting etcd2… […]