Error initializing module 'muc_size', module 'net.url' not found:Failed loading module net.url in LuaRocks rock net-url 0.9-1

I wanted to use “muc_size” module to monitor some basic things in a server. and in the process I did:

  1. config /usr/lib/prosody/modules/mod_muc_size.lua
  2. created location for accessibility to other in /etc/nginx/sites-enabled/vc1.mydomain.conf (actually isn’t working,I tried the hard coded url-404 page not found)
  3. enable module in /etc/prosody/conf.d/vc1.mydomain.cfg.lua
  4. did
    apt install luarocks
    luarocks install net-url
  5. restarted prosody and nginx

but I am facing 404 error(no page) while trying to query.
prosody log says net.url not found though I installed it via luarocks.there is really no url.lua.
prosody log:

what is the problem and what should I do? :slightly_smiling_face:
@hkhait @damencho @saghul
Thanx in advance :heart:

Probably luarocks is pointed to lua 5.1, you can see that the error is for lua 5.2, you need to install net.url for lua 5.2.

How? I downloaded the source code but didnt get any idea. actually how should I install appropriate net-url so jitsi prosody would automatically configure other files finding all files in appropriate places.
Thanx in advance :heartpulse:

I tried purging lua5.1 and installing lua5.2 then install luarocks pointing lua5.2. but somehow lua5.1 remains and luarocks always tries to install liblua-5.1 and others though I have already lua5.2 installed and lua5.1 purged. how can I solve this? :slightly_smiling_face:
meaning point luarocks to lua5.2 instead of 5.1 during installation? do I have to set the path or install manually? because I saw some lua issues to be solved by manual installation with setting path.
Thanx in advance :heart:

shit, now my jitsi server is down :sweat: :sob:

may be purging lua5.1 did this… I didnt know whether these were connected since jitsi installation or not… even “var/log/” has no folder called “prosody”. what is happening…!
this is my jicofo log :
jicofo.log (215.5 KB)
yesterday I was facing problem with java home path while working with lua and fixed that. today when I opened my pc, I saw some unusual error console screen indicating java problem and then restarted. is this connected to this problem?
can u plz help me to get out of this situation? I just stuck badly… :slightly_smiling_face: :slightly_smiling_face:
@damencho @saghul

Here are my notes about lua5.2:

apt-get install liblua5.2-dev
./configure --lua-version=5.2 --versioned-rocks-dir
make build
sudo make install
luarocks-5.2 install net-url
 Error trying to reconnect with the server
org.xmpp.component.ComponentException: Connection refused (Connection refused)

Prosody is not running, probably when purging lua you stopped or removed prosody

is this a java settings problem or prrosody?
how can I revert back? should I have to install prosody from scratch or there is other way?

@damencho’s solution worked for me. You need to install all your prosody modules this way luarocks-5.2 install module_name

actually I dont know what happened but now I have no prosody now… may be some how it has been removed… /etc/prosody/conf.d has no file “mydomain.cfg.lua”
what should I do now? install prosody from scratch?

Yes, try to reinstall prosody. in my case I have Prosody 0.11.2.