Collect & Review AutoDJ (liquidsoap) log files
By default Liquidsoap logs are disabled as they can contain a lot of information and can grow to a large size very quickly. The log files provide valuable information when trying to troubleshoot the service. Once enabled, the log file can be located from the Log Manager from the individual Service in the control panel.
The relative location on disk would be in /usr/local/mediacp/content/user_{user_id}/{service_type}/{port}_{id}/logs/liquidsoap.log
Please note the timestamps in the log file are relative to your system time.
It is possible to enable log files by following the below procedure:
- Enable Log Output from System Config -> Plugins -> Liquidsoap
- Restart the AutoDJ service (stop and then start it)
- The log file should now be available within the Log Manager
Common Issues
Liquidsoap shows buffer emptied, or DJ connection drops out
The error indicates that the client is not sending enough data to the AutoDJ service and the connection is being dropped after the buffer is exhausted. We recommend reviewing the clients error logs as it may show similar errors in sending the transmission.
AutoDJ (liquidsoap) will not start
Here are some common reasons and solutions for AutoDJ failing to start.
1. Liquidsoap installation or update might have failed
You can check if liquidsoap is installed and operating normally by running the following as root user via SSH:
/usr/local/mediacp/liquidsoap/bin/liquidsoap --version
You should see a result similar to below if it is installed correctly.
Liquidsoap 2.1.4
Copyright (c) 2003-2022 Savonet team
Liquidsoap is open-source software, released under GNU General Public License.
See <http://liquidsoap.info> for more information.
Should you see an error message then we recommend to first attempting to reinstall liquidsoap by following the steps in this Knowledgebase article.
2. AutoDJ ‘DJ Listen Port’ could be in use by another process
- Enable Liquidsoap logging output (image right)
- Attempt to start AutoDJ on the service
- A file called liquidsoap.log should be generated in the Log Manager
- Open this file and search for the term “Address already in use in bind”.
- If you find this term then the problem is due to the port being used already and you will need to change the DJ Listen Port to another. You can simply clear the DJ Listen Port field and press save, the MediaCP will automatically select another port to use,
- Be sure to disable Liquidsoap logging output after troubleshooting or it will use a lot of disk space
3. AutoDJ is started but not playing any audio
In some rare circumstances we find that the shoutcast or icecast process running on the port might be from a previously “deleted” service in the MediaCP. This can occur when the shutdown process for the service previously utilising this port was not successful. In this scenario, AutoDJ is online but is unable to connect because the password is not valid.
To resolve the problem involves terminating the process running on the shoutcast/icecast port, then restarting from the control panel.
In the example below, we’re using a service on port 8000; be sure to change port 8000 to the portbase that your service is utilizing.
- Install netstat on the system, it will be used to see which process is running on the port:
# CentOS / Almalinux yum install net-tools
or
# Debian / Ubuntu apt install net-tools
- Switch the service to Offline in the MediaCP
- Identify any processes still running on the port
netstat -tulpn | grep 8000
- In this example, i can see that there is a process for icecast running on port 8000
- Because we already stopped the service in the control panel, we should terminate the remaining processes.
kill -9 30199;
- Now restart the service from the MediaCP
4. Other issues
If you reach this step and the problem is still not solved, then there may be another error generated.
Sometimes a specific combination of settings, corrupted or incompatible mp3/aac track may cause failures to start.
You can review the end of the liquidsoap.log file (described in step 2 above) to locate any “Error” messages that may be relevant.
Reinstall Liquidsoap or Install a Custom Version
You can find the guide for reinstalling liquidsoap in our Knowledgebase. Liquidsoap reinstall – Knowledgebase