Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #196246 > unrolled thread
| Started by | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| First post | 2018-05-30 12:50 +0200 |
| Last post | 2018-08-12 16:10 +0200 |
| Articles | 8 — 4 participants |
Back to article view | Back to linux.debian.user
Tea4CUPS: TEABILLING reports error Rainer Dorsch <ml@bokomoko.de> - 2018-05-30 12:50 +0200
Re: Tea4CUPS: TEABILLING reports error Brian Potkin <brian@copernicus.org.uk> - 2018-05-30 16:50 +0200
Re: Tea4CUPS: TEABILLING reports error Rainer Dorsch <ml@bokomoko.de> - 2018-05-30 23:20 +0200
Re: Tea4CUPS: TEABILLING reports error Brian <ad44@cityscape.co.uk> - 2018-05-31 20:30 +0200
Re: Tea4CUPS: TEABILLING reports error Rainer Dorsch <ml@bokomoko.de> - 2018-06-18 22:10 +0200
Re: Tea4CUPS: TEABILLING reports error Brian <ad44@cityscape.co.uk> - 2018-06-19 15:10 +0200
Re: Tea4CUPS: TEABILLING reports error daniel-mailinglists@dadosch.de - 2018-08-11 18:00 +0200
Re: Tea4CUPS: TEABILLING reports error Rainer Dorsch <ml@bokomoko.de> - 2018-08-12 16:10 +0200
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2018-05-30 12:50 +0200 |
| Subject | Tea4CUPS: TEABILLING reports error |
| Message-ID | <vV6Q2-7Fj-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi, I have tea4cups configured to power on my printer before printing. In order to do this, I prepended tea4cups:/ to the DeviceURI in printers.conf (if I remove this and power on the printer manually before printing, everything works as expected): /etc/cups/printers.conf: DeviceURI tea4cups:/http://hpljwlan:631/ipp/ I configured the printer power on script: /etc/cups/tea4cups.conf: but I get unfortunately an error in /var/log/cups/error_log E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback (most recent call last): Is seems something goes wrong while setting the TEABILLING environement variable. Has anybody an idea why that could be? Many thanks Rainer -- Rainer Dorsch http://bokomoko.de/
[toc] | [next] | [standalone]
| From | Brian Potkin <brian@copernicus.org.uk> |
|---|---|
| Date | 2018-05-30 16:50 +0200 |
| Message-ID | <vVaAh-1mK-3@gated-at.bofh.it> |
| In reply to | #196246 |
On Wed 30 May 2018 at 12:40:35 +0200, Rainer Dorsch wrote: > I have tea4cups configured to power on my printer before printing. In order to do this, I > prepended tea4cups:/ to the DeviceURI in printers.conf (if I remove this and power on the > printer manually before printing, everything works as expected): I suppose this should work ok if done when cupsd is not running. I'd be inclined to modify the existing queue or set up a new one. A virtual queue would allow testing Tea4CUPS without wrapping the backend. The printer is being powered on by some type of electronic switch? > /etc/cups/printers.conf: > DeviceURI tea4cups:/http://hpljwlan:631/ipp/ http:// is a symlink the ipp backend. It's always useful to know what model of printer is being used. > I configured the printer power on script: > > /etc/cups/tea4cups.conf: > > > but I get unfortunately an error in /var/log/cups/error_log > > > E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback (most recent call > last): > > Is seems something goes wrong while setting the TEABILLING environement variable. > > Has anybody an idea why that could be? tea4cups.conf is the configuration file for Tea4CUPS. I guess you are using a prehook or posthook to activate the printer; we really need to know what you have for it (including any associated script). What part does TEABILLING play in the process? -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2018-05-30 23:20 +0200 |
| Message-ID | <vVgFI-51E-5@gated-at.bofh.it> |
| In reply to | #196254 |
On Mittwoch, 30. Mai 2018 16:44:42 CEST Brian Potkin wrote: > On Wed 30 May 2018 at 12:40:35 +0200, Rainer Dorsch wrote: > > I have tea4cups configured to power on my printer before printing. In > > order to do this, I prepended tea4cups:/ to the DeviceURI in > > printers.conf (if I remove this and power on the > > printer manually before printing, everything works as expected): > I suppose this should work ok if done when cupsd is not running. I'd be > inclined to modify the existing queue or set up a new one. A virtual > queue would allow testing Tea4CUPS without wrapping the backend. I do the modification after a systemd stop cups.service > The printer is being powered on by some type of electronic switch? Yes, this one: http://energenie.com/item.aspx?id=7415&lang=en Works well with the sispmctl package. > > /etc/cups/printers.conf: > > DeviceURI tea4cups:/http://hpljwlan:631/ipp/ > > http:// is a symlink the ipp backend. It's always useful to know what > model of printer is being used. I was not aware of that, I need to dig into more detail here in the next days. The printer is a HP CP1525NW. > > I configured the printer power on script: > > > > /etc/cups/tea4cups.conf: > > > > > > but I get unfortunately an error in /var/log/cups/error_log > > > > > > E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback > > (most recent call last): > > > > Is seems something goes wrong while setting the TEABILLING environement > > variable. > > > > Has anybody an idea why that could be? > > tea4cups.conf is the configuration file for Tea4CUPS. I guess you are > using a prehook or posthook to activate the printer; we really need to > know what you have for it (including any associated script). What part > does TEABILLING play in the process? Yes, a prehook and the TEABILLING shows in the stack trace, I am not using it intentionally at all... Aaah...now I see what went wrong: My orignal post contained the information, but it seems only in the HTML view, not sure why kmail decided to leave out this information in the text representation :-/ Avoided HTML view now in this mail, sorry for that. For easier reference I append the previous post: I have tea4cups configured to power on my printer before printing. In order to do this, I prepended tea4cups:/ to the DeviceURI in printers.conf (if I remove this and power on the printer manually before printing, everything works as expected): /etc/cups/printers.conf: DeviceURI tea4cups:/http://hpljwlan:631/ipp/ I configured the printer power on script: /etc/cups/tea4cups.conf: prehook_sispmctl : /usr/local/bin/printeron but I get unfortunately an error in /var/log/cups/error_log with every print job and the job is stopped. E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback (most recent call last): E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : File \"/usr/ lib/cups/backend/tea4cups\", line 1502, in <module> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : wrapper.exportAttributes() E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : File \"/usr/ lib/cups/backend/tea4cups\", line 1214, in exportAttributes E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : os.environ[\"TEABILLING\"] = self.JobBilling or \"\" E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : File \"/usr/ lib/python2.7/os.py\", line 473, in __setitem__ E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : putenv(key, item) E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : TypeError: putenv() argument 2 must be string, not int Is seems something goes wrong while setting the TEABILLING environment variable. Many thank Rainer -- Rainer Dorsch http://bokomoko.de/
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-05-31 20:30 +0200 |
| Message-ID | <vVAuJ-8vj-17@gated-at.bofh.it> |
| In reply to | #196265 |
On Wed 30 May 2018 at 23:18:27 +0200, Rainer Dorsch wrote:
> On Mittwoch, 30. Mai 2018 16:44:42 CEST Brian Potkin wrote:
> > On Wed 30 May 2018 at 12:40:35 +0200, Rainer Dorsch wrote:
> > > I have tea4cups configured to power on my printer before printing. In
> > > order to do this, I prepended tea4cups:/ to the DeviceURI in
> > > printers.conf (if I remove this and power on the
> > > printer manually before printing, everything works as expected):
> > I suppose this should work ok if done when cupsd is not running. I'd be
> > inclined to modify the existing queue or set up a new one. A virtual
> > queue would allow testing Tea4CUPS without wrapping the backend.
>
> I do the modification after a systemd stop cups.service
It is intended that printers.conf is managed by cupsd and not by user
editing. Into the bargain, future CUPS is planned to rename and relocate
the file. (But this is not the cuase of your problem).
> > The printer is being powered on by some type of electronic switch?
>
> Yes, this one: http://energenie.com/item.aspx?id=7415&lang=en
>
> Works well with the sispmctl package.
I don't have one of these. But it is easy to pretend I do. (See below).
> > > /etc/cups/printers.conf:
> > > DeviceURI tea4cups:/http://hpljwlan:631/ipp/
> >
> > http:// is a symlink the ipp backend. It's always useful to know what
> > model of printer is being used.
>
> I was not aware of that, I need to dig into more detail here in the next days.
Not the cause of your problem and not really an issue. I was just a bit
surprised to see http:// used instead of ipp://.
> The printer is a HP CP1525NW.
An oldish printer. I wonder how well the ipp protocol is implemented on
it? socket:// might be better.
[...]
> > tea4cups.conf is the configuration file for Tea4CUPS. I guess you are
> > using a prehook or posthook to activate the printer; we really need to
> > know what you have for it (including any associated script). What part
> > does TEABILLING play in the process?
>
> Yes, a prehook and the TEABILLING shows in the stack trace, I am not using it
> intentionally at all...
>
> Aaah...now I see what went wrong: My orignal post contained the information,
> but it seems only in the HTML view, not sure why kmail decided to leave out
> this information in the text representation :-/ Avoided HTML view now in this
> mail, sorry for that.
>
> For easier reference I append the previous post:
>
> I have tea4cups configured to power on my printer before printing. In order to
> do this, I prepended tea4cups:/ to the DeviceURI in printers.conf (if I remove
> this and power on the printer manually before printing, everything works as
> expected):
>
> /etc/cups/printers.conf:
> DeviceURI tea4cups:/http://hpljwlan:631/ipp/
> I configured the printer power on script:
>
> /etc/cups/tea4cups.conf:
> prehook_sispmctl : /usr/local/bin/printeron
What are the script contents?
> but I get unfortunately an error in /var/log/cups/error_log
> with every print job and the job is stopped.
>
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : Traceback (most
> recent call last):
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : File \"/usr/
> lib/cups/backend/tea4cups\", line 1502, in <module>
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :
> wrapper.exportAttributes()
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : File \"/usr/
> lib/cups/backend/tea4cups\", line 1214, in exportAttributes
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) :
> os.environ[\"TEABILLING\"] = self.JobBilling or \"\"
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : File \"/usr/
> lib/python2.7/os.py\", line 473, in __setitem__
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : putenv(key,
> item)
> E [30/May/2018:08:51:40 +0200] [Job 16] Tea4CUPS (PID 9689) : TypeError:
> putenv() argument 2 must be string, not int
>
> Is seems something goes wrong while setting the TEABILLING environment
> variable.
Your tea4cups.conf is poorly. Here is a minimal one which works for me:
[Global]
debug : yes
directory : /var/spool/cups/
prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL
1. touch /tmp/SISPMCTL
2. Set up a raw queue:
lpadmin -p virtq -v tea4cups:// -E -m raw
3. Print to virtq:
lp -d virtq /etc/services
4. cat /tmp/SISPMCTL and look at the error_log.
5. Test with your original queue and my tea4cups.conf.
--
Brian.
[toc] | [prev] | [next] | [standalone]
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2018-06-18 22:10 +0200 |
| Message-ID | <w28Do-1yQ-11@gated-at.bofh.it> |
| In reply to | #196304 |
Hi Brian,
thank you for your response and please apologize for my slow response.
On Donnerstag, 31. Mai 2018 20:04:22 CEST Brian wrote:
> Your tea4cups.conf is poorly. Here is a minimal one which works for me:
> [Global]
> debug : yes
> directory : /var/spool/cups/
> prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL
Hmm....mine does not look so much different, I edited them template shipped by
Debian:
rd@b370:/var/log/cups$ grep -v '^#' /etc/cups/tea4cups.conf |grep -v '^$'
[global]
directory : /var/spool/cups/
prehook_sispmctl : /usr/local/bin/printeron
rd@b370:/var/log/cups$
...
I had to change [Global]-> [global] in your config (?)
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : Traceback (most
recent call last):
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : File \"/usr/
lib/cups/backend/tea4cups\", line 1503, in <module>
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : returncode
= wrapper.runBranches()
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : File \"/usr/
lib/cups/backend/tea4cups\", line 1302, in runBranches
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : branches =
self.enumBranches(self.PrinterName, \"prehook\")
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : File \"/usr/
lib/cups/backend/tea4cups\", line 1010, in enumBranches
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : raise
ConfigError, \"Invalid configuration file : %s\" % msg
E [18/Jun/2018:21:25:15 +0200] [Job 37] Tea4CUPS (PID 19895) : ConfigError:
Invalid configuration file : No section: \'global\'
rd@b370:~$ cat /etc/cups/tea4cups.conf
[global]
debug : yes
directory : /var/spool/cups/
prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL
rd@b370:~$
> 1. touch /tmp/SISPMCTL
rd@b370:~$ ls -l /tmp/SISPMCTL
-rw-rw-rw- 1 root root 0 Jun 18 21:29 /tmp/SISPMCTL
rd@b370:~$
> 2. Set up a raw queue:
>
> lpadmin -p virtq -v tea4cups:// -E -m raw
root@b370:/etc/cups# lpadmin -p virtq -v tea4cups:// -E -m raw
lpadmin: Raw queues are deprecated and will stop working in a future version
of CUPS.
root@b370:/etc/cups#
> 3. Print to virtq:
>
> lp -d virtq /etc/services
root@b370:/etc/cups# lp -d virtq /etc/services
Anfrage-ID ist virtq-40 (1 Datei(en))
root@b370:/etc/cups#
> 4. cat /tmp/SISPMCTL and look at the error_log.
rd@b370:~$ cat /tmp/SISPMCTL
rd@b370:~$
not sure why this is empty... (?)
but no entry in the error_log
> 5. Test with your original queue and my tea4cups.conf.
same behavior as above, printeron is executed when issuing
lp -d virtq /etc/services
But when printing on my queue
<Printer CP1525NW>
UUID urn:uuid:2b1f194f-d781-33a6-7340-1b2f4d154ce4
AuthInfoRequired none
Info CP1525NW
MakeModel HP Color LaserJet cp1518ni pcl3, hpcups 3.17.10
DeviceURI tea4cups:/http://hpljwlan:631/ipp/
State Idle
StateTime 1529351306
ConfigTime 1526331301
Reason cups-ipp-conformance-failure-report
Reason cups-ipp-missing-send-document
Type 36892
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
Attribute marker-colors \#00FFFF,#FF00FF,#FFFF00,#000000
Attribute marker-levels 44,46,46,48
Attribute marker-low-levels 6,6,6,7
Attribute marker-high-levels 100,100,100,100
Attribute marker-names Cyan Cartridge HP CE321A,Magenta Cartridge HP
CE323A,Yellow Cartridge HP CE322A,Black Cartridge HP CE320A
Attribute marker-types toner,toner,toner,toner
Attribute marker-change-time 1527675649
</Printer>
I get the same error_log again:
[18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : Traceback (most
recent call last):
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : File \"/usr/
lib/cups/backend/tea4cups\", line 1502, in <module>
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) :
wrapper.exportAttributes()
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : File \"/usr/
lib/cups/backend/tea4cups\", line 1214, in exportAttributes
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) :
os.environ[\"TEABILLING\"] = self.JobBilling or \"\"
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : File \"/usr/
lib/python2.7/os.py\", line 473, in __setitem__
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : putenv(key,
item)
E [18/Jun/2018:21:48:26 +0200] [Job 45] Tea4CUPS (PID 20932) : TypeError:
putenv() argument 2 must be string, not int
Is my DeviceURI wrong?
For reference, my printeron:
rd@b370:~$ cat /usr/local/bin/printeron
#!/bin/sh
sispmctl -o 3
date > /tmp/printeron
# Wait until printer is active
while ! nc -vzw 1 hpljwlan 80 2> /dev/null; do
sleep 5
done
date >> /tmp/printeron
rd@b370:~$
Thanks
Rainer
--
Rainer Dorsch
http://bokomoko.de/
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-06-19 15:10 +0200 |
| Message-ID | <w2oyt-2TT-7@gated-at.bofh.it> |
| In reply to | #196758 |
On Mon 18 Jun 2018 at 22:04:50 +0200, Rainer Dorsch wrote: > Hi Brian, > > thank you for your response and please apologize for my slow response. No problem. > On Donnerstag, 31. Mai 2018 20:04:22 CEST Brian wrote: > > Your tea4cups.conf is poorly. Here is a minimal one which works for me: > > [Global] > > debug : yes > > directory : /var/spool/cups/ > > prehook_sispmctl : sispmctl -ng 4 2> /tmp/SISPMCTL > > Hmm....mine does not look so much different, I edited them template shipped by > Debian: > > rd@b370:/var/log/cups$ grep -v '^#' /etc/cups/tea4cups.conf |grep -v '^$' > [global] > directory : /var/spool/cups/ > prehook_sispmctl : /usr/local/bin/printeron > rd@b370:/var/log/cups$ > > ... > > I had to change [Global]-> [global] in your config (?) A typo. Sorry. [Snip] > root@b370:/etc/cups# lpadmin -p virtq -v tea4cups:// -E -m raw > lpadmin: Raw queues are deprecated and will stop working in a future version > of CUPS. > root@b370:/etc/cups# Nothing to worry about (yet). > > 3. Print to virtq: > > > > lp -d virtq /etc/services > > root@b370:/etc/cups# lp -d virtq /etc/services > Anfrage-ID ist virtq-40 (1 Datei(en)) > root@b370:/etc/cups# > > > > 4. cat /tmp/SISPMCTL and look at the error_log. > > rd@b370:~$ cat /tmp/SISPMCTL > rd@b370:~$ > > not sure why this is empty... (?) The hook completes without a warning. I get told that no GEMBIRD SIS-PM is found. > but no entry in the error_log So, the hook works. > > 5. Test with your original queue and my tea4cups.conf. > > same behavior as above, printeron is executed when issuing > > lp -d virtq /etc/services > > But when printing on my queue [Snip] > I get the same error_log again: [Snip] > Is my DeviceURI wrong? You mean "tea4cups:/http://hpljwlan:631/ipp/"? Advice on an IPP URI is at https://wiki.debian.org/PrintQueuesCUPS Or use tea4cups:/socket://... instead. [Snip] -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | daniel-mailinglists@dadosch.de |
|---|---|
| Date | 2018-08-11 18:00 +0200 |
| Message-ID | <wlEt4-6Ov-9@gated-at.bofh.it> |
| In reply to | #196304 |
Hey there, I'm having this error too, on my KDE Neon System as well as on my (now) Arch System. It works most of the times, but not all. Did you finally manage to find a solution, Rainer? -- Daniel
[toc] | [prev] | [next] | [standalone]
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2018-08-12 16:10 +0200 |
| Message-ID | <wlZe9-2mw-1@gated-at.bofh.it> |
| In reply to | #198630 |
Hi Daniel, no unfortunately I have not yet resolved the problem. I still issue the prehook manually. But I did not yet dig too deep into this issue... If you find the root cause, please let me know....and good to know that this is a cross distri issue, even Arch is affected. Rainer On Samstag, 11. August 2018 17:29:35 CEST daniel-mailinglists@dadosch.de wrote: > Hey there, > I'm having this error too, on my KDE Neon System as well as on my (now) > Arch System. It works most of the times, but not all. > > Did you finally manage to find a solution, Rainer? > > > -- > Daniel -- Rainer Dorsch http://bokomoko.de/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web