Report this

What is the reason for this report?

Issue with Prosody when setting up a Jitsi server (returning a nil value).

Posted on October 24, 2020

I followed the tutorial and seem to have a problem with Prosody generating the error below (hostname removed for security reasons):

Oct 24 19:06:17 <my hostname> prosody[2325]: A problem occurred while reading the config file /etc/prosody/prosody.cfg.lua

Oct 24 19:06:17 <my hostname> prosody[2325]: Error: /etc/prosody/conf.d/<my hostname>.cfg.lua:98: attempt to call global ‘Virtualhost’ (a nil value)

Oct 24 19:06:17 <my hostname> prosody[2325]: More help on configuring Prosody can be found at https://prosody.im/doc/configure

Oct 24 19:06:17 <my hostname> prosody[2325]: Good luck!

I have checked both the cfg.lua files in both conf.d and conf.avail subfolders in case of a miss-spelling of the host name, and they checked out OK. When I go to use the Jitsi server, I’m not greeted with a log-in prompt when I want to start a meeting. I also am unable to create a user in the console using the line command:

sudo prosodyctl register user my_domain password 

Again I get an error as per the log entries above.

I’m a bit of a novice when it comes to server configuration, so any advice on how I can fix this would be of great help please. Many thanks.

The droplet I’ve set up is using Ubuntu 20.04.1LTS, and fully updated.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

The error you’re experiencing suggests that there might be a syntax error or a misconfiguration in your Prosody configuration files.

Here are a few steps you can take to further troubleshoot the issue:

  1. Double Check the Configuration Syntax: Ensure that there is no typographical error in your config file /etc/prosody/conf.d/<my hostname>.cfg.lua. This file should contain the following block:
VirtualHost "<my hostname>"
    authentication = "internal_plain"

Remember to replace “<my hostname>” with your actual hostname.

  1. Ensure Correct File Permissions: The Prosody service must have read access to its configuration files. You can ensure this with the following commands:
sudo chown -R prosody: /etc/prosody
sudo chmod -R 644 /etc/prosody
  1. Check Prosody Version: Some functions in Prosody, like VirtualHost, may not be available in older versions. Make sure you are running a recent version of Prosody. You can check the version with the command:
prosodyctl about
  1. Restart Prosody: After making any changes, ensure you restart the Prosody service for the changes to take effect.
sudo systemctl restart prosody
  1. Check Prosody Logs: If the issue persists, check the detailed logs for any additional errors.
sudo journalctl -u prosody

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.