CUPS Error under OMV4

    • OMV 4.x
    • 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:

      Source Code

      1. 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:

      Source Code

      1. root@HOME-NAS:~# omv-initsystem
      2. W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
      3. W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
      4. 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
      meet me and many other on overclockers.at :thumbup:
      hear my podcast (german) at get.started.at :!:
    • 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:


      Source Code

      1. 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?
      meet me and many other on overclockers.at :thumbup:
      hear my podcast (german) at get.started.at :!:

      The post was edited 1 time, last by master_burn ().

    • 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 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • master_burn wrote:

      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 (hub.docker.com/r/quadportnick/cups-airprint/). Maybe that would work for you?
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Same Problem here

      Source Code

      1. 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 ?
    • trafki wrote:

      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 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • jurajbj wrote:

      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 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      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 localhost:631

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

      Source Code

      1. Nein, es gibt keine Lösung. Vermutlich sind andere Dinge wichtiger. Ich verstehe zu wenig von dem Pythonzeugs. Aber einen Hack kann ich Dir anbieten:
      2. Python-Quellcode
      3. # if not port_no:
      4. # port_no = self.port
      5. Mit anderen Worten, diese beiden Zeilen auskommentieren.
      6. lg.
    • 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 raw.github.com/tjfontaine/airp…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.