** Known Issues and How to Fix **

Below are some known issues and workarounds/fixes for them:

OSP Hangs When Going to the My Channels Page and Gives a Redirect Error
This is due to OSP being unable to access the ejabberd data for each of the chat channels you own due to a bad ejabberd admin password. This can be fixed by an admin by doing the following:

  1. Log into a server with access to OSP Core
  2. Record the expected ejabberd admin password in the config.py file for OSP in /opt/osp/conf
cat /opt/osp/conf/config.py
  1. If not on a single install server, log into a server with access to ejabberd
  2. Unregister the ejabberd local admin
sudo /usr/local/ejabberd/bin/ejabberdctl unregister admin localhost
  1. Reregister the ejabberd local admin with the expected password
sudo /usr/local/ejabberd/bin/ejabberdctl register admin localhost <Password from Step 2>
  1. Restart the OSP Core Servers
sudo systemctl restart osp.target

OSP Gives an Error about Field ‘id’ Doesn’t have a Default Value When Users are Registering
This is caused due to a migration issue from a previous version and can be corrected by the following:

  1. Log into the database
sudo mysql
  1. Select the OSP Database
use osp;
  1. Run the following commands to rebuild the IDs
ALTER TABLE roles_users DROP COLUMN id;
ALTER TABLE roles_users ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY;
  1. Quit
quit;

Database Upgrades Fail with an error similar to: ERROR [root] Error: Can’t locate revision identified by '$SOMEHASH’
Sometimes Flask-Migrate runs into issues when performing version upgrades. You can reset the Flask-Migrate database doing the following:

  1. Open the OSP Database
sudo mysql
  1. Select the OSP Database
use osp;
  1. Delete the alembic_version Table;
drop table alembic_version;
  1. Quit MySQL
quit;
  1. Delete the Migrations Directory on the Core Server
sudo rm -rf /opt/osp/migrations
  1. Run the Database Upgrade Commands
cd /opt/osp
sudo bash osp-config.sh upgrade db

Chat Hangs on Connecting or Immediately Fails with Error Code 999
Chat hanging while trying to connect can occur for multiple reasons. Most can be diagnosed by checking the network tab in a browser while vising the page. For a connection to the chat system to work, the following must be true:

  • The ejabberd server must be resolvable
  • Clients must be able to reach the BOSH http-bind location (ex: https://fqdn/http-bind)
  • The BOSH http-bind location must be served using the same web protocol as the main site (HTTPS/HTTP)
  • The ejabberd server’s auth_osp.py file must be configured (auto configured on single server) and able to access OSP’s API at http(s)://fqdn/apiv1/

If you are having issues connecting, it is most likely one of the above are the problem.

Some simple checks can identify the root cause or at least help in troubleshooting the issue:

  1. Check the Admin Panel and make sure the Site Protocol & Site Address are correct
  2. Open a web browser and manually go to http(s)://ejabberdfqdn/http-bind
  3. Check your /usr/local/nginx/conf/nginx.conf file on the ejabberd server and ensure it matches near to the format here: SSL with LetsEncrypt | Open Streaming Platform Wiki
  4. Check the /usr/local/ejabberd/conf/auth_osp.py and ensure the protocol and api address listed at the top match your OSP Core server.
    Note: If running on a single server, http://127.0.0.1:5010 is designated as a local control port for internal processes, such as the ejabberd connection.