tried to use the import_prosody command from ejabberdctl
# ejabberdctl status
The node ejabberd@localhost is started with status: started
ejabberd 18.12.1-2 is running in that node
# chmod a+rw -R /var/lib/prosody/
# ejabberdctl import_prosody /var/lib/prosody/migration
Error: nofile
there seems to be no way to debug what's happening, nor is there a verbose-flag or any documentation what type of file is expected.
I would like to migrate to ejabberd, but that just doesn't seem possible currently. Any hints?
I did read that - that's how I created my prosody export.
and idk if it's a duplicate - but my error message (if you want to call it that) is different, so I'd say it's not.
Hard to really say though, since that error handling sucks hard.
As what user do you run ejabberdctl ? You gave the folder RW but not X?
What does stat /var/lib/prosody/migration say?
I ran it as root - the same user that just copied that files to where they are
believe me, it's not access rights! I really checked. (and the only reason why there's that chmod line in my listing was to indicate this)
directories are 0777, files 0666 there - yes, including all subfolders
so, looking into your code, the only place where there's a occurance of "nofile" is /src/misc.erl in compile_exprs - no idea from where that's called though, as I currently don't get erlang at all (have never written a single line of that) and "compile_exprs" isn't to be found in any of your other files.
but still… this doesn't look as it's about a file of my export and more like some internal script that can't be loaded or such.
Why do you want to import in a version that's one and a half years old? What OS is this? Don't have any newer backports version?
I knew there would be the typical "your debian stable is much too old" argument.
As if the software in question had suddenly become much better over the last half year.
This is a server. I set it up to be stable, not to maximize breaking changes I have to keep up with.
# ejabberdctl status
The node ejabberd@localhost is started with status: started
ejabberd 20.02-2~bpo10+1 is running in that node
# ejabberdctl import_prosody /var/lib/prosody/migration/
Error: eacces
are you happy now?
because I am not.
Different error, might be helpful.
Hello,
Could you also check ejabberd logs after that operations, there may be more info there.
You probably are getting this eaccess because user that ejabberd server is using don't have access to this directory, easiest thing would be probably copying this to place that is accessible to ejabberd and change path that you giving to this command.
@prefiks runs as root, see above
[...] check ejabberd logs [...]
What a simple, typically obvious, yet here still unattempted idea. Thanks! - sometimes I'm an idiot. :-/
2020-05-04 09:51:19.589 [error] <0.1763.0>@prosody2ejabberd:from_dir:58 Failed to list /var/lib/prosody/migration/: permission denied
okay
File: /var/lib/prosody/migration/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 803h/2051d Inode: 658644 Links: 4
Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
now I'm even more confused
how should any user be unable to list a 0777-dir? even more so if the user is root, who owns that dir? (at least I'm asuming it to be root when I run ejabberdctl as root - but that migth be wrong)
@licaon-kter
What matters here is user that ejabberd server is using, ejabberdctl something just sends command to main ejabberd process, so this command will use ejabberd server user for accessing this data.
okay, user ejabberd can't access that migration-dir for some reason... I can work with that
@DrAzraelTod
Probably you need to also change permission to parent directory, make sure that everyone have r and x permission to it.
For those just coming across this thread via a search... I ran into this issue with ejabberd installed via pkg(8) on FreeBSD. Checking the logs, the installed version was not compiled with lua support. So, I had to compile using ports while selecting the TOOLS=on option with make config.