[Cppcms-users] cppblog and systemd
Brought to you by:
artyom-beilis
|
From: Paolo B. <pao...@gm...> - 2015-03-15 21:50:50
|
I wanted to write a systemd file to execute cppblog, here is the content: -------- >8 [Unit] Description=A high performance blog based on cppcms After=network.target [Service] Type=simple WorkingDirectory=/var/blog ExecStart=/usr/bin/cppblog -c config.js [Install] WantedBy=multi-user.target -------- >8 As you can see it is very simple and apparently it works, however I would like to execute cppblog as a http user, so I added User=http in the [Service] section. However just changing the executing user the cppblog crashes with a "address already in use error," here is the log: Failed: system: Address already in use 0x7f146c5f6ebb: booster::system::system_error::system_error(booster::system::error_code const&) + 0x13b in /usr/lib/libcppcms.so.1 0x7f146c2c7bb7: booster::aio::acceptor::bind(booster::aio::endpoint const&) + 0x67 in /usr/lib/libbooster.so.0 0x7f146c6cfce0: cppcms::impl::cgi::fastcgi_api_unix_socket_factory(cppcms::service&, std::string, int) + 0xc0 in /usr/lib/libcppcms.so.1 0x7f146c5f0bac: cppcms::service::setup_acceptor(cppcms::json::value const&, int, int) + 0x68c in /usr/lib/libcppcms.so.1 0x7f146c5f137e: cppcms::service::start_acceptor(bool) + 0x17e in /usr/lib/libcppcms.so.1 0x7f146c5f3e19: cppcms::service::run() + 0x29 in /usr/lib/libcppcms.so.1 0x41d036: main + 0x76 in /usr/bin/cppblog 0x7f146b30e800: __libc_start_main + 0xf0 in /usr/lib/libc.so.6 0x41de39: _start + 0x29 in /usr/bin/cppblog To make the situation even more confusing, if I try to execute via command line with sudo -u it works fine... What am I doing wrong? Any idea of what I can try? |