What's new

Prosody 0.9.10 from Entware-ng - offline messages storage not implemented

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

BaudelaireNG

Occasional Visitor
Hello,
running Prosody XMPP server on RT-N66U - most basic functions runs fine. Trying to enable 'mod_offline' for offline message storage in flat files, I discover following error in log file:
Code:
datamanager  error  Unable to write to offline storage ('Function not implemented') for user: username@someserver
Any hints on enabling messages offline storage in this system?

Thanks.
 
Unable to write to offline storage ('Function not implemented') for user: username@someserver

File permissions in the working directory - the error msg - it's telling what's wrong...
 
File permissions in the working directory - the error msg - it's telling what's wrong...
Hello!! It has been done with chmod -R prosody:prosody /opt/etc/prosody/ also made that alltogether world writable. That aswell was my first thought, but it fails.
I'll copy/paste relevant (IMO) configuration and data.
Relevant inputs of prosody.cfg.lua:
Code:
modules_enabled = {
         <different modules here>
         "offline"; -- loading target module
}
modules_disabled = {
             <nothing special here>
}
storage = "internal"
data_path = "/opt/etc/prosody/data"
prosody_user = "prosody"
prosody_group = "prosody"
Changing /opt/etc/prosody/data to be owned by prosody user with chown.
Server startup debug log related to data storage:
Code:
datamanager  debug  Assuming empty persistent storage ('cannot open /opt/etc/prosody/data/chat%2edomain/persistent.dat: No such file or directory') for user: nil@chat.domain
The above log is around initialization of conference chats module. Similar log entry is being put whenever some user connects, feels like aroud initialization of 'offline' module, like so:
Code:
datamanager  debug  Assuming empty offline storage ('cannot open /opt/etc/prosody/data/domain/offline/user1.list: No such file or directory') for user: user1@domain
After sending off-line message to user1 mentioned in above log msg file is being created with size of zero.
And the log of sending off-line message:
Code:
c2s79a848  debug  Received[c2s]: <message id='m_125' type='chat' to='user2@domain'>
datamanager  error  Unable to write to offline storage ('Function not implemented') for user: user2@domain
Error log at /opt/var/log/prosody.err doesnt gain any entries during all that.
Output of prosodyctl about:
Code:
Prosody 0.9.10

# Prosody directories
Data directory:  /opt/etc/prosody/data
Plugin directory:  /opt/lib/prosody/modules/
Config directory:  /opt/etc/prosody
Source directory:  /opt/lib/prosody

# Lua environment
Lua version:  Lua 5.1

Lua module search paths:
  /opt/lib/prosody/?.lua
  /opt/share/lua/?.lua
  /opt/share/lua/?/init.lua
  /opt/lib/lua/?.lua
  /opt/lib/lua/?/init.lua

Lua C module search paths:
  /opt/lib/prosody/?.so
  /opt/lib/lua/?.so
  /opt/lib/lua/loadall.so

LuaRocks:  Not installed

# Lua module versions
lfs:  LuaFileSystem 1.6.2
lxp:  LuaExpat 1.3.0
pposix:  0.3.6
socket:  LuaSocket 3.0-rc1
ssl:  0.5.1
[/FONT]
Reason I'm posting on snbforums.com is that I have that feeling Entware-ng strips functionality of some packages to tailor embeds, or modify it in any other way, and Entware-ng wiki points to here for problem resolutions. Kind of weird that I post such thing on Asus-Wireless section. Issue tracker of prosody gives nothing about given problem.

So guys let us know if you've gotten into same problem, would be nice to have that function!
Cheers!
 
Check perms on that directory that it wants to write to, and who that user is... my guess is either bad perms, or bad user... hence the error

old school unix user/group/world...
 
SOLVED
@sfx2000 your guess was kinda right. Prosody was unable to append data to files with 'offline' module, but not on perms level, but on Lua/kernel/ext3 innards level. I get from Prosody community that this error along with using ext3 filesystem "likely means it [Prosody] can't reserve space for appending to a file, which is only used for offline messages". The reason I get was "fallocate() not supported in ext3".
And what solved my problem was "In your config file, add require "util.pposix".fallocate = nil"
Offline messages begin to work after adding
require "util.pposix".fallocate = nil in top section of prosody.cfg.lua

Credits to Zash at prosody community chatroom and Prosody friendly community for resolution, also sfx2000 for insight and motivation.

Cheers!
 
Last edited:
@sfx2000 your guess was kinda right. Prosody was unable to append data to files with 'offline' module, but not on perms level, but on Lua/kernel/ext3 innards level.

Cool - odd though that posix would be an issue - there's mod_posix that should be enabled on *nix based systems, and one would think that would solve the fallocate() problem..

Maybe something with how that package was built in the entware repository...
 
SOLVED
And what solved my problem was "In your config file, add require "util.pposix".fallocate = nil"
Offline messages begin to work after adding
"util.pposix".fallocate = nil in top section of prosody.cfg.lua
Cheers!

But how about this?

Code:
Apr 13 12:52:40 chatServe prosody[4734]: A problem occured while reading the config file /etc/prosody/prosody.cfg.lua:
Apr 13 12:52:40 chatServe prosody[4734]: Error: /etc/prosody/prosody.cfg.lua:191: unexpected symbol near '"util.pposix"'
Apr 13 12:52:40 chatServe prosody[4734]: More help on configuring Prosody can be found at http://prosody.im/doc/configure
Apr 13 12:52:40 chatServe prosody[4734]: Good luck!
Apr 13 12:52:40 chatServe prosody[4734]: **************************

I inserted:
Code:
"util.pposix".fallocate = nil
 
But how about this?

Code:
Apr 13 12:52:40 chatServe prosody[4734]: A problem occured while reading the config file /etc/prosody/prosody.cfg.lua:
Apr 13 12:52:40 chatServe prosody[4734]: Error: /etc/prosody/prosody.cfg.lua:191: unexpected symbol near '"util.pposix"'
Apr 13 12:52:40 chatServe prosody[4734]: More help on configuring Prosody can be found at http://prosody.im/doc/configure
Apr 13 12:52:40 chatServe prosody[4734]: Good luck!
Apr 13 12:52:40 chatServe prosody[4734]: **************************

I inserted:
Code:
"util.pposix".fallocate = nil

My bad. Propper line is
Code:
require "util.pposix".fallocate = nil
. Already edited edited my "solved" post. Thanks!
 
Similar threads
Thread starter Title Forum Replies Date
JEofMPK Can I wake a PC that is offline due to sleep mode? ASUS Wireless 5

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top