![]() ![]() Installing ejabberdįirst we need to enable EPEL-Repository (EPEL = Extra Packages for Enterprise Linux) on your VPS. This tutorial will guide you through the installation process and basic setup on a CentOS VPS. About ejabberdĮjabberd is a very simple, stable, and powerful XMPP server written in Erlang. If available, we strongly recommend using a guide written for the version of CentOS you are using. This guide might still be useful as a reference, but may not work on other CentOS releases. For this reason, this guide is no longer maintained. If you are currently operating a server running CentOS 6, we highly recommend upgrading or migrating to a supported version of CentOS.ĬentOS 6 reached end of life (EOL) on November 30th, 2020 and no longer receives security patches or updates. Good took me hours & hours to wade through all of this.This article covers a version of CentOS that is no longer supported. delete the contents of /var/lock/ejabberdctl and make sure the directory is writable by user ejabberd chown the contents of /var/log/ejabberd to ejabberd:ejabberdĤ. If you modify the service, be sure to execute "systemctl daemon-reload" afterwards.ģ. Either modify /usr/lib/systemd/system/rvice to run the service as root, or remove /var/lib/ejabberd and create a new, blank directory of the same name and chown it to ejabberd:ejabberd. #!/usr/bin/pkexec /bin/sh needs to be #!/bin/shĢ. ![]() modify /usr/bin/ejabberdctl to modify it to use /bin/sh instead of /usr/bin/pkexec: So, the summary of how to get ejabberd to run as a service on CentOS 7 (and perhaps all systemd-based linuxes:ġ. modifying /etc/sudoers to allow this to proceed fixed this problem. sudo -u ejabberd ejabberdctl fixed that for the command line, but I had scripts that were executing as root that needed to call ejabberdctl to register users.that got me some warnings from sudo about needing a tty connection. Removing all of these files helped.įinally I had an issue with ejabberdctl running from the command line as root not being able to connect to the ejabberd process that was running as ejabberd:ejabberd. I also had some issues with the lock files in /var/lock/ejabberdctl. The next issue was with access permissions to ejabberd log files. In the end I just nuked the entire directory and re-created a blank /usr/lib/ejabberd and chown'ed the entire thing to ejabberd:ejabberd. chown'ing them to ejabberd:ejabberd fixed the access problem but then mnesia complained about changes in names or some such. I had been running ejabberdctl from the command line during installation and configuration, which resulted in a /var/lib/ejabberd that was owned by root:root, so when systemd ran ejabberdctl as ejabberd:ejabberd, mnesia had no access to its files. This change worked, and ejabberdctl started running successfully when systemd called it. Rather than try to get the systemd maintainers to change this, or the pkexec maintainers to fix their issue with double forking, I tried modifying the ejabberdctl script to call for /bin/sh instead of /usr/bin/pkexec. I appears that pkexec does not like being launched as part of a double fork exec, and that systemd does exactly this. After finding a cryptic log message about "refusing to render service to dead parents," I finally traced the problem to pkexec. The root problem is that it appears that systemd and pkexec do not play nice together. After spending several hours banging my head on the problem, I finally succeeded. I have seen a few discussions of problems getting ejabberd to run as a service but no conclusive explanation of how to do it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |