systemd

Ubuntu 16.04 systemd redis issues with ulimit

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been having issues with our new redis server after swapping from Ubuntu 14.04 to 16.04. The configuration of the open files limit using all the guides says to change the /etc/security/limits.conf with the following settings * soft nofile 65535 * hard nofile 65535 root soft nofile 65535 root hard nofile 65535 And also to add to /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive session required pam_limits.so I have made all of these changes but redis is still starting up with a file limit of 4096 which under

Systemd node app failing to start

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a node app, that I'm trying to add as a service, the app works fine if I go to the directory where it's installed and do node start.js however when I do systemctl start app it just hangs for a few mins then journalctl -u darknet shows: Dec 24 01:46:33 Skynet systemd[1]: Started darknet. Dec 24 01:46:33 Skynet systemd[1]: Starting darknet... Dec 24 01:46:34 Skynet darknet[32246]: module.js:434 Dec 24 01:46:34 Skynet darknet[32246]: return process.dlopen(module, path._makeLong(filename)); Dec 24 01:46:34 Skynet darknet[32246]: ^ Dec 24

Python daemon and systemd service

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have simple Python script with works as a daemon. I am trying to create systemd script to be able to start this script during startup. Current systemd script: [ Unit ] Description = Text After = syslog . target [ Service ] Type = forking User = node Group = node WorkingDirectory = /home/ node / Node / PIDFile = /var/ run / zebra . pid ExecStart = /home/ node / Node / node . py [ Install ] WantedBy = multi - user . target node.py: if __name__ == '__main__' : with daemon . DaemonContext (): check = Node () check . run () run

How to redirect output of systemd service to a file

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to redirect o/p of a systemd service to a file but it doesn't seem to work. I am doing it as follows: [Unit] Description=customprocess After=network.target [Service] Type=forking ExecStart=/usr/local/bin/binary1 agent -config-dir /etc/sample.d/server StandardOutput=/var/log1.log StandardError=/var/log2.log Restart=always [Install] WantedBy=multi-user.target Please suggest the correct approach to redirect o/p to a file 回答1: I think there's a more elegant way to solve the problem: send the stdout/stderr to syslog with an identifier

VNC 远程连接vmware下centOS7

北城以北 提交于 2019-12-03 01:48:59
VNC ( Virtual Network Computing)是一个linux下提供远程桌面支持的服务,类似于windows下的远程桌面服务,本来我是准备用xmanager来远程连我虚拟机中的centos的,但是由于xmanager据说不支持centos7下的gnome,其他的xfce好像支持度也不好。既然这样,我就用了VNC。 1.如果没有安装X-Windows 桌面的话要先安装Xwindows [root@localhost ~]# yum check-update [root@localhost ~]# yum groupinstall "X Window System" [root@localhost ~]# yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts [root@localhost ~]# unlink /etc/systemd/system/default.target [root@localhost ~]# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target [root@localhost

kubelet fails to get cgroup stats for docker and kubelet services

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm running kubernetes on bare-metal Debian (3 masters, 2 workers, PoC for now). I followed k8s-the-hard-way, and I'm running into the following problem on my kubelet: Failed to get system container stats for "/system.slice/docker.service": failed to get cgroup stats for "/system.slice/docker.service": failed to get cgroup stats for "/system.slice/docker.service": failed to get container info for "/system.slice/docker.service": unknown container "/system.slice/docker.service" And I have the same message for kubelet.service. I have some files

How can I configure a systemd service to restart periodically?

我的梦境 提交于 2019-12-03 01:37:59
问题 I have a simple systemd service that needs to be periodically restarted to keep its process from bugging out. Is there a configuration option for systemd services to periodically restart them? All of the Restart* options seem to pertain to restarting the service when it exits. 回答1: Yes, you can make your service to restart it periodically by making your service of Type=notify . Add this option in [Service] section of your service file along with Restart=always and give WatchdogSec=xx , where

How to Enable Systemd service in openshift/jenkins-1-centos7 docker container?

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a situation where I need to start some services within this jenkins container to make it work in our project. So i need Systemd enabled in order to do that... As of now I get the below error when I try to run "systemctl" command within this container: Failed to get D-Bus connection: Operation not permitted Which is expected. Now on my research, I found that if we use the below docker file to create an image and then run a container, we should be able to run systemctl commands: FROM docker.io/openshift/jenkins-1-centos7 MAINTAINER "you

Can not increase max_open_files for Mysql max-connections in Ubuntu 15

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am running this version of Mysql Ver 14.14 Distrib 5.6.24, for debian-linux-gnu (x86_64) On this version of Ubuntu Distributor ID: Ubuntu Description: Ubuntu 15.04 Release: 15.04 Codename: vivid This is the config I set for Mysql: key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 innodb_buffer_pool_size=20G innodb_log_buffer_size=16M tmp_table_size = 32M max_heap_table_size = 32M open-files-limit=4510 max_connections=500 myisam-recover = BACKUP query_cache_type=1 query_cache_limit = 32M query_cache

Unable to install Docker on Ubuntu Xenial: invoke-rc.d: initscript docker, action “start” failed

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been trying to install Docker on Ubuntu 16.04, but it throws me an error that I am unable to resolve myself. Using the install script located at get.docker.com: root@m2dcs44rnq:~# wget -qO- https://get.docker.com/ | sh # Executing docker install script, commit: 92d5116 + sh -c apt-get update -qq >/dev/null + sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null + sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null + sh -c echo "deb [arch=amd64] https://download.docker