Troubleshooting & FAQ
Most commands below need root rights on the Pi: connect via SSH and run sudo -i first.
Where is the log?
CocktailPi logs to /var/log/cocktailpi.log:
tail -f /var/log/cocktailpi.log # follow the log
tail -n 200 /var/log/cocktailpi.log # the last 200 linesThe built-in updater writes to /root/cocktailpi/updater.log. When you ask for help on Discord or GitHub, the relevant part of the log helps a lot.
Restarting CocktailPi
CocktailPi runs as the systemd service cocktailpi, which starts at boot and restarts by itself after a crash:
systemctl status cocktailpi # is it running?
systemctl restart cocktailpi # restart itAfter a (re)start it takes a moment until the web UI answers, especially on older Pis.
I can't open the web UI
- Use
http://, nothttps://, and port 80:http://<hostname>/. - If the hostname doesn't resolve, use the IP address of the Pi instead (e.g.
http://192.168.1.20/). You find it in your router, withhostname -Ion the Pi, or – if you can still log in somewhere – under Administration → System → Network. - If your browser asks whether the page may access devices in your local network, allow it, or open CocktailPi via its IP address as above.
- Check that the service is running (see above) and look at the log.
The message Connection lost! Reconnecting in: … means the browser lost the connection to the Pi: it was restarted, is still booting or the network dropped.
I forgot the admin password
Reset it on the Pi with the command line tool:
cd /root/cocktailpi
java -jar cocktailpi.jar user reset-password <username>java -jar cocktailpi.jar user list shows all users, user unlock <username> unlocks a locked one.
The installer stops right away
- You need root privileges – run
sudo -ifirst. - The "pi"-user could not be found! – the installer expects the user
pi. Flash the SD card again and create the userpiin the settings of the Raspberry Pi Imager. - No internet connection! – the installer downloads packages and CocktailPi itself; connect the Pi to the internet.
A pump doesn't run, or runs all the time
- BCM, not physical pins. Pin numbers of the Pi's own GPIOs are BCM numbers, not the position on the header. See the warning in First steps.
- Power state. Many relay boards switch on when the pin is low. If a pump runs when it should be off (and the other way round), switch Power state between High and Low in the pump's setup assistant (step Hardware pins).
- Pin already in use! – every pin can only be used once (pumps, load cell, reverse pumping, I²C).
- Is the pump Ready? Incomplete pumps (missing calibration or tube capacity) are not used for cocktails.
Pumps run the wrong way
- A single DC pump pumps backwards: swap its two motor wires.
- All pumps run backwards with reverse pumping enabled: flip Forward state in the reverse pumping settings.
- For a stepper pump, swap the wires of one coil, or the direction wiring of its driver.
A recipe I should be able to make can't be ordered
The order dialog says why. The usual reasons:
- Not enough liquid left in a pump – after refilling a bottle, set the filling level again (Fill in the Pumps section of the order dialog, or in the pump's setup assistant).
- Pumps are running (cleaning or pumping up) – stop them on the Pumps page (Stop all).
- Choose the marked ingredient – an ingredient group couldn't be resolved, choose an ingredient.
- Place a glass in the dispensing area – the load cell doesn't see a glass.
If a recipe isn't listed as makeable at all, check that all its ingredients are on a pump or in the bar.
I²C expanders are not found
- Administration → GPIO → I2C → Configure: Enable I2C and choose the SDA Pin and SCL Pin (usually BCM 2 and 3). CocktailPi enables the I²C bus of the Pi for you. Only the bus
/sys/bus/i2c/devices/i2c-1is supported. - Check the wiring: SDA to SDA, SCL to SCL, common ground, and power for the expander.
- When adding the expander, the dialog lists the Reachable I2C devices / address. Press Check again after changing the wiring. No devices connected to the I2C bus! means the Pi sees nothing at all.
- On the command line,
i2cdetect -y 1lists the addresses the Pi can see on the bus. The address of the expander is set by its address pins/jumpers.
Supported are MCP23017 boards and XL9535-based relay boards.
Valves can't be used
Valves dispense by weight and need a calibrated load cell. Until the load cell is enabled and calibrated, valves stay Incomplete.
The WiFi settings say "not available"
They need NetworkManager, i.e. Raspberry Pi OS Bookworm or newer. See Network & hotspot.
The touchscreen UI is too small or too large
Run the installer again and choose Configuration: Change size of Touchscreen UI, see Installation.
A backup restore failed
CocktailPi puts the previous data back by itself and shows The last restore (…) failed. The previous database stays in /root/cocktailpi/cocktailpi-data.db.before-restore. See Backup, import/export & updates.