CUPS Error under OMV4

  • I had a problem adding a printer in the cups plugin so I thought I just do a reinstall.


    After uninstalling it there was a error (cups not found or sthg like that) I did a check for updates and installed the latest omv updates, which prompted in an error (cannot recall what it said).


    I reboot the system did a ckeck for updates - non found - and the system was running so I figured it may be ok after all??
    tried to reinstall cups now which gave me this error:

    Code
    Failed to execute command "blabla" with exit code100 E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem


    so I did run that and got to a graphic screen which says I must run omv-initsystem to complete, so I did and now this comes up:

    Code
    root@HOME-NAS:~# omv-initsystem
    W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
    W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
    W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

    I'm out of guesses what to do next - can anyone help?


    OMV Version now is 4.1.8.2-1

  • a closer examination of the graphic screen that appeared got me using the arrow keys so I was able to select "OK" at the bottom and confirm with enter
    the layout of that screen is not self explanatory it should be redesigned or at least added that you should use the arrow keys


    now i could reinstall the cups plugin, but when adding a printer i still get:



    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-cups-avahi 2>&1' with exit code '1': Traceback (most recent call last): File "/usr/sbin/omv-cups-avahi", line 298, in <module> files.append(genPrinterService(p, v, False)) File "/usr/sbin/omv-cups-avahi", line 120, in genPrinterService port_no = self.port NameError: global name 'self' is not defined

    what can be done?

  • The cups plugin is not used by many and no one is maintaining it. I only added it to the repo because people reported that it worked on OMV 4.x. Sorry, my python is not good enough to figure out what is wrong.

    omv 5.4.7 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I just used it to enable apple air-print for my network printer - it was a nice feature but I can live without it

    There are dockers available for air-print (https://hub.docker.com/r/quadportnick/cups-airprint/). Maybe that would work for you?

    omv 5.4.7 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Same Problem here


    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-cups 'enableSharing' 2>&1' with exit code '1': Traceback (most recent call last): File "/usr/sbin/omv-cups", line 305, in <module> apg = OMVCups() File "/usr/sbin/omv-cups", line 73, in __init__ self.conn = cups.Connection() RuntimeError: failed to connect to server


    What can i do ?
    I need the cups server :(


    Any idea ?

  • What can i do ?
    I need the cups server


    Any idea ?

    Did you read the posts in this thread? We don't have a maintainer for this plugin and I don't know python well enough to fix it. I suggested using docker for a cups server. The only reason the plugin is in the repo is because it still works for a few people.

    omv 5.4.7 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I also have same problem with cups on omv4. Due to this problem i have to stay on omv 3.99. It would be nice to solve this problem.

    Is there a reason you don't want to use a docker like I proposed? I don't know how we are going to solve this problem when no one is working on the plugin.

    omv 5.4.7 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • First i have no idea whats wrong with the python script.


    But why you dont use the cups server directly on debian? install it and configure it over https://localhost:631


    You can also test this but i dont no it is work and what it do!!

  • Hello Everyone,


    Finally I Found a trick to make CUPS + Airprint work on OMV 4


    Let me explain part of the problem I saw. On OMV 4 Python version 3.5 has the major issue.
    You have to Change de following lines on /usr/lib/python3.5/weakref.py


    Use:
    nano /usr/lib/python3.5/weakref.py



    Change line 109 to:


    def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):




    Change line 117 to:
    _atomic_removal(d, wr.key)


    Before install cups in Plugins
    I also open the port 2812 on Firewall (This helps)


    Install CUPS
    Setup your printer in Cups [omvipaddress]:631
    user: root
    password: your OMV root password


    After add your printer do a TEST.


    AirPrint (You will install service outside of plugin) Leave Airprint Option on plugin disabled
    Follow these steps on terminal as root:


    mkdir /opt/AirPrint
    cd /opt/AirPrint
    wget -O airprint-generate.py --no-check-certificate https://raw.github.com/tjfonta…ster/airprint-generate.py
    chmod +x airprint-generate.py
    ./airprint-generate.py -d /etc/avahi/services



    service cups restart
    service avahi-daemon restart


    Other issue for newbies: some printers that use foo2zjs driver for example requieres firmware file into foo2zjs/firmware folder, until you have it It will not print.

  • I just found a way to fix the issue. Now my CUPS work with Airprint natively. Running OMV 4.1.27-1, with CUPS 3.1.2.


    open /usr/sbin/omv-cups-avahi:


    goto line 120, change this:

    Python
    if not port_no:
    port_no = self.port




    into this:


    Python
    #if not port_no:
    # port_no = self.port


    Then everything works. I thought the develper may have forgotten to comment it since there is another "if not port_no" statement under this one and just commented it to correct it. I don't know if it is the right way to fix it, but my system now works fine with Airprint.

Participate now!

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