CUPS docker problem "Internal server error"

  • I've just freshly reinstalled OMV5 on my server (previously running 3 and 4 for many years) and have tried to get CUPS back up and running in docker. I've tried four different docker images, including the suggested olbat/cupsd, but they all give me "internal server error" when I go to the administration page. Since they all do it I suspect there is an configuration issue on my OMV docker instance, but it is default running as omv-extras installs it. I've not been able to find any resolution elsewhere on the net.


    I've already got OpenVPN, Plex, Transmission and Kerberos.io running in docker without issue.


    Any assistance would be much appreciated.

  • but they all give me "internal server error"

    Not a lot of information but I have installed and tested olbat cups docker using this in the cli, then in a browser <ip of omv>:631 and it works

    Code
    docker run -d -p 631:631 -v /var/run/dbus:/var/run/dbus --name cupsd olbat/cupsd

    Raid is not a backup! Would you go skydiving without a parachute?

  • I've tried that a few times and it always results in the error.


    I did manage to find the error log of one instance I had running, but it doesn't make much sense so not sure if it's a red herring or not. I've attached it to this post.


    I also get bad file descriptor error when going to printers page.

  • The CUPS log entry when I try to access the admin page is

    Code
    E [07/Mar/2021:03:30:01 +0000] [CGI] Unable to connect to cupsd: Bad file descriptor

    Also mods can you please move this into the docker forum. Sorry :)

  • :/ where did you find any logs, because according to Portainer it doesn't generate any.


    I've deployed mine as a test on VM and it just worked it even detected my network printer, I have also run an auto docker on the container;

    which doesn't supply a lot of information.


    I have looked at the config file in the cups webui, that 'appears' to display the changes you would have to make manually if cups were to be installed locally.


    Are you deploying this on a Raspberry Pi?

    Raid is not a backup! Would you go skydiving without a parachute?

  • Running docker container diff I can see which files are modified, some logs are created:

    Code
    C /var/log
    C /var/log/cups
    C /var/log/cups/error_log

    Among other things, I tried copying a default cups config file and it had the same error.


    It's running on an x86 (Intel Skylake) machine.

  • I've just redployed that docker with the command you pasted above and the config file is /etc/cups/cupsd.conf.


    Logs are also in /var/log/cups


    Output from logs when I access admin page right now

    Code
    oot@367d923f0fc7:/etc/cups# cat /var/log/cups/error_log
    E [06/Mar/2021:04:05:40 +0000] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
    E [07/Mar/2021:19:58:30 +0000] [CGI] Unable to connect to cupsd: Bad file descriptor
    root@367d923f0fc7:/etc/cups# uptime
    20:03:01 up 6 min, 0 users, load average: 0.16, 0.44, 0.27
    root@367d923f0fc7:/etc/cups#

    Interestingly there is a log entry from yesterday but I literally just deleted the container and created it again.

  • I've decided to install cups directly on the server using apt. I configured the config file to allow access to the web console remotely and it's working perfectly.


    Don't know why docker wouldn't behave for me, but doesn't matter now.


    Thanks for your help geaves.

  • jbrizz

    Added the Label resolved
  • I've just redployed that docker with the command you pasted above and the config file is /etc/cups/cupsd.conf.

    No it's not!! If you deploy cups as in apt install cups from the cli then yes there is and there are log files, how do I know that because I tried deploying cups as per apt install and the configuration of the cups config file is a BIG PIA.


    The installation of the above docker has a preconfigured cups config and it's accessible and can be edited within the cups WebUI :)

    Raid is not a backup! Would you go skydiving without a parachute?

  • No it's not!! If you deploy cups as in apt install cups from the cli then yes there is and there are log files, how do I know that because I tried deploying cups as per apt install and the configuration of the cups config file is a BIG PIA.


    The installation of the above docker has a preconfigured cups config and it's accessible and can be edited within the cups WebUI :)


    I know that. The log output was from by connecting to the docker console. The log was there before cups was installed via apt, cups was never installed on the server itself until just now. The web console was only loading when the docker container was running, cups was definitely running in docker. But as I said, it was broken and I was getting those errors in the web console. I'm an IT professional (cyber security currently and previously 10 years of sys admin) so you can trust that I have a rough idea what I'm doing :)


    Here's the diff output, showing the container writes those files



    I just deleted the cups docker container and installed it's directly on server, edited the config file, and now it's working correctly. So, there might be a misconfiguration in my docker instance as I tried four of those cups dockers available on docker hub and they all produced the same error. Docker is not something I have experience with, and every other container I've configured over the last two has works perfectly, so I'm stumped.

  • So, there might be a misconfiguration in my docker instance as I tried four of those cups dockers available on docker hub and they all produced the same error

    That would suggest there is something residual from each install, if I do docker diff cupsd on that olbat/cups I get this;

    so I then do ls -l on /etc


    based on the above output C at the beginning of /etc/cups must refernce container, so it's not written to the system.


    If you had access to a config file in /etc/cups then that must have been residual.

    I'm an IT professional (cyber security currently with 10 years of sys admin) so you can trust that I have a rough idea what I'm doing

    TBH more tech nerds on here the better, me I try and work on a process of elimination to try and help, I also have VM with omv5 to try out on which is where I have this docker deployed

    Raid is not a backup! Would you go skydiving without a parachute?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!