Project

General

Profile

Bug #305

Problem Connecting to XMPP Server After Container Migration

Added by Daniel Curtis over 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XMPP Server
Target version:
-
Start date:
01/15/2014
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

I encountered a problem after I moved the Unified Communications server to a new VPS hosting server using:

ssh old-vps.example.com
rsync -avhz -n /var/lib/lxc/container -e ssh root@new-vps.example.com:/var/lib/lxc/

Note: Remove the -n flag to enable the actual transfer, not a dry-run.

The first problem was that I had not updated the network information in the containers configuration at /var/lib/lxc/container/config. Even though this would normally be the issue, it did not solve the problem.

I received an error while starting prosody:

Error: Error loading included /etc/prosody/conf.d/localhost.cfg.lua: /etc/prosody/conf.d/localhost.cfg.lua: Permission denied

I noticed that the ownership of a few files and folders did not match the correct ones from the previous container:

ls -l /etc/prosody

drwxr-x--- 2 root ntp 4096 Dec 11 17:03 certs
drwxr-xr-- 2 root ntp 4096 Jan 15 17:05 conf.avail
drwxr-xr-- 2 root ntp 4096 Jan 15 17:07 conf.d
rw-r--r- 1 root root 353 Sep 27 2012 migrator.cfg.lua
rw-r---- 1 root prosody 8096 Dec 11 17:02 prosody.cfg.lua
rw-r--r- 1 root root 292 Jul 30 2009 README

I fixed this by running:

chgrp prosody /etc/prosody/certs/
chgrp prosody /etc/prosody/conf.*

I then noticed that there were no records in /var/lib/prosody, so I went to add a user. Only to get an error:

prosodyctl adduser someuser@example.com

datamanager error Unable to write to accounts storage ('/var/lib/prosody/example%2ecom/accounts/someuser.dat: Permission denied') for user:
Error saving to storage

This happened because /var/lib/prosody had bad ownership as well, to fix this I ran:

chown prosody.prosody /var/lib/prosody

I added the user one more time, and restarted the server for good measure:

prosodyctl adduser someuser@example.com
service prosody restart

This restored the functionality of the XMPP service.

#1

Updated by Daniel Curtis about 10 years ago

  • Status changed from Resolved to Closed
#2

Updated by Daniel Curtis about 9 years ago

  • Project changed from 42 to GNU/Linux Administration
  • Category set to XMPP Server

Also available in: Atom PDF