Здравствуйте. Debian 9, xfce. Принтер Canon i-sensys mf-3010. Установил драйвер от производителя. При попытки печатать с локальной машины документ отправляется на печать и пропадает из очереди. При попытке распечатать пробную страницу, выдает ошибку — «Ошибка во время операции CUPS: «client-error-bad-request»». На дебиан 8 тоже при отправке документа он пропадал из очереди но все же через раз печатал. Подскажите пожалуйста как решить проблему?
Есть ли возможность показать логи (/var/log/cups/)?
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64,
LXQt/KDE/OpenBox AMD Phenon X4 / 16Gb RAM / ATI HD7750 Silent
_______________________________
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64, LXQt/KDE/OpenBox
Acer Aspire One 722 AMD C60 / 4Gb RAM / ATI HD6290
Цитата: ihammers от 28 июня 2017, 05:47:38
Есть ли возможность показать логи (/var/log/cups/)?
Да конечно. А какой именно? Тут их несколько.
Вот error_log.1:
Открыть содержимое (спойлер)
E [26/Jun/2017:09:50:01 +0300] [cups-deviced] PID 12622 (gutenprint52+usb) stopped with status 1!
E [26/Jun/2017:09:53:47 +0300] Scheduler shutting down due to program error.
E [26/Jun/2017:09:54:03 +0300] [Client 3] Returning IPP client-error-bad-request for Print-Job (ipp://localhost/printers/MF3010) from localhost
E [26/Jun/2017:09:58:04 +0300] [cups-deviced] PID 832 (gutenprint52+usb) stopped with status 1!
E [26/Jun/2017:10:07:46 +0300] [Client 178] Returning IPP client-error-bad-request for Print-Job (ipp://localhost/printers/MF3010) from localhost
[свернуть]
Вот access_log:
Открыть содержимое (спойлер)
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 349 Create-Printer-Subscriptions successful-ok
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 176 Create-Printer-Subscriptions successful-ok
[свернуть]
Вот access_log.1:
Открыть содержимое (спойлер)
localhost — — [27/Jun/2017:00:06:11 +0300] «POST / HTTP/1.1» 200 349 Create-Printer-Subscriptions successful-ok
localhost — — [27/Jun/2017:00:06:11 +0300] «POST / HTTP/1.1» 200 176 Create-Printer-Subscriptions successful-ok
localhost — — [27/Jun/2017:15:47:01 +0300] «POST / HTTP/1.1» 200 349 Create-Printer-Subscriptions successful-ok
localhost — — [27/Jun/2017:15:47:01 +0300] «POST / HTTP/1.1» 200 176 Create-Printer-Subscriptions successful-ok
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 401 123 Cancel-Subscription successful-ok
localhost — root [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 123 Cancel-Subscription successful-ok
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 152 Cancel-Subscription successful-ok
[свернуть]
Есть ещё error_log.1 и page_log но они пустые.
Есть предположение, что это происходит из-за выбранного протокола соединения принтера и вашего компьютера. Попробуйте изменить ipp, на socket или что-нибудь другое.
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64,
LXQt/KDE/OpenBox AMD Phenon X4 / 16Gb RAM / ATI HD7750 Silent
_______________________________
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64, LXQt/KDE/OpenBox
Acer Aspire One 722 AMD C60 / 4Gb RAM / ATI HD6290
Цитата: ihammers от 28 июня 2017, 07:56:20
Есть предположение, что это происходит из-за выбранного протокола соединения принтера и вашего компьютера. Попробуйте изменить ipp, на socket или что-нибудь другое.
Как ему сменить протокол? Он по usb подключен к компьютеру.
obana, логи видать старые (26/Jun/2017), нужны свежие логи. После обновления проблемы? http://localhost:631/admin нужно отметить пункт «Сохранять отладочную информацию в журнале» с дальнейшим сохранением. Удалите/пересините старые лог-фалы, пробуйте печатать и новые логи посмотрим. Убедитесь что printer-driver-gutenprint установлен. Заодно можно глянуть свежий /var/cache/cups/job.cache если имеется.
Цитата: mrgoodvin от 28 июня 2017, 12:24:16
obana, логи видать старые (26/Jun/2017), нужны свежие логи. После обновления проблемы? http://localhost:631/admin нужно отметить пункт «Сохранять отладочную информацию в журнале» с дальнейшим сохранением. Удалите/пересините старые лог-фалы, пробуйте печатать и новые логи посмотрим. Убедитесь что printer-driver-gutenprint установлен. Заодно можно глянуть свежий /var/cache/cups/job.cache если имеется.
Спасибо за подсказки. printer-driver-gutenprint установлен. Установил флаг — «Сохранять отладочную информацию в журнале». Удалил старые логи. Попробовал распечатать, новые логи не создаются. Содержимое файла job.cache:
Открыть содержимое (спойлер)
# Job cache file for CUPS v2.2.1
# Written by cupsd
NextJobId 9
<Job 1>
State 9
Created 1498459901
Completed 1498459910
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 2>
State 9
Created 1498459931
Completed 1498459940
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 3>
State 9
Created 1498460171
Completed 1498460180
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 4>
State 9
Created 1498460392
Completed 1498460401
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 5>
State 9
Created 1498460797
Completed 1498460806
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 6>
State 9
Created 1498460854
Completed 1498460862
Priority 50
Username obana
Name Test Page
Destination MF3010
DestType 0
KOctets 1
NumFiles 0
</Job>
<Job 7>
State 9
Created 0
Completed 1498644334
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 1
NumFiles 0
</Job>
<Job 8>
State 9
Created 0
Completed 1498644521
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 16
NumFiles 0
</Job>
[свернуть]
Попробовать распечатать что-то в pdf-файл. Будут ли при этом создаваться логи?
Не совсем понятно при двух последних записях job.cache:
<Job 7>
State 9
Created 0
Completed 1498644334
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 1
NumFiles 0
</Job>
<Job 8>
State 9
Created 0
Completed 1498644521
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 16
NumFiles 0
</Job>
название документа удалено из лога специально?
Проверить установку пакетов foomatic-db-gutenprint, ghostscript и gsfonts, ijsgutenprint и при отсутствии до установить.
Почитать это https://wiki.archlinux.org/index.php/CUPS_(Русский), может что-то от туда поможет. В частности заменить LogLevel warn на LogLevel debug в /etc/cups/cupsd.conf, посмотреть может логи будут создаваться. Поэкспериментировать с разделом «Проблемы в результате обновления» (хоть там о версии ниже, но может помочь).
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64,
LXQt/KDE/OpenBox AMD Phenon X4 / 16Gb RAM / ATI HD7750 Silent
_______________________________
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64, LXQt/KDE/OpenBox
Acer Aspire One 722 AMD C60 / 4Gb RAM / ATI HD6290
Всем спасибо. Откатил систему на 8.8 этой пользоваться пока невозможно.
Перейти к контенту
Здравствуйте. Debian 9, xfce. Принтер Canon i-sensys mf-3010. Установил драйвер от производителя. При попытки печатать с локальной машины документ отправляется на печать и пропадает из очереди. При попытке распечатать пробную страницу, выдает ошибку — «Ошибка во время операции CUPS: «client-error-bad-request»». На дебиан 8 тоже при отправке документа он пропадал из очереди но все же через раз печатал. Подскажите пожалуйста как решить проблему?
Есть ли возможность показать логи (/var/log/cups/)?
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64,
LXQt/KDE/OpenBox AMD Phenon X4 / 16Gb RAM / ATI HD7750 Silent
_______________________________
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64, LXQt/KDE/OpenBox
Acer Aspire One 722 AMD C60 / 4Gb RAM / ATI HD6290
Цитата: ihammers от 28 июня 2017, 05:47:38
Есть ли возможность показать логи (/var/log/cups/)?
Да конечно. А какой именно? Тут их несколько.
Вот error_log.1:
Открыть содержимое (спойлер)
E [26/Jun/2017:09:50:01 +0300] [cups-deviced] PID 12622 (gutenprint52+usb) stopped with status 1!
E [26/Jun/2017:09:53:47 +0300] Scheduler shutting down due to program error.
E [26/Jun/2017:09:54:03 +0300] [Client 3] Returning IPP client-error-bad-request for Print-Job (ipp://localhost/printers/MF3010) from localhost
E [26/Jun/2017:09:58:04 +0300] [cups-deviced] PID 832 (gutenprint52+usb) stopped with status 1!
E [26/Jun/2017:10:07:46 +0300] [Client 178] Returning IPP client-error-bad-request for Print-Job (ipp://localhost/printers/MF3010) from localhost
[свернуть]
Вот access_log:
Открыть содержимое (спойлер)
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 349 Create-Printer-Subscriptions successful-ok
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 176 Create-Printer-Subscriptions successful-ok
[свернуть]
Вот access_log.1:
Открыть содержимое (спойлер)
localhost — — [27/Jun/2017:00:06:11 +0300] «POST / HTTP/1.1» 200 349 Create-Printer-Subscriptions successful-ok
localhost — — [27/Jun/2017:00:06:11 +0300] «POST / HTTP/1.1» 200 176 Create-Printer-Subscriptions successful-ok
localhost — — [27/Jun/2017:15:47:01 +0300] «POST / HTTP/1.1» 200 349 Create-Printer-Subscriptions successful-ok
localhost — — [27/Jun/2017:15:47:01 +0300] «POST / HTTP/1.1» 200 176 Create-Printer-Subscriptions successful-ok
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 401 123 Cancel-Subscription successful-ok
localhost — root [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 123 Cancel-Subscription successful-ok
localhost — — [28/Jun/2017:00:07:02 +0300] «POST / HTTP/1.1» 200 152 Cancel-Subscription successful-ok
[свернуть]
Есть ещё error_log.1 и page_log но они пустые.
Есть предположение, что это происходит из-за выбранного протокола соединения принтера и вашего компьютера. Попробуйте изменить ipp, на socket или что-нибудь другое.
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64,
LXQt/KDE/OpenBox AMD Phenon X4 / 16Gb RAM / ATI HD7750 Silent
_______________________________
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64, LXQt/KDE/OpenBox
Acer Aspire One 722 AMD C60 / 4Gb RAM / ATI HD6290
Цитата: ihammers от 28 июня 2017, 07:56:20
Есть предположение, что это происходит из-за выбранного протокола соединения принтера и вашего компьютера. Попробуйте изменить ipp, на socket или что-нибудь другое.
Как ему сменить протокол? Он по usb подключен к компьютеру.
obana, логи видать старые (26/Jun/2017), нужны свежие логи. После обновления проблемы? http://localhost:631/admin нужно отметить пункт «Сохранять отладочную информацию в журнале» с дальнейшим сохранением. Удалите/пересините старые лог-фалы, пробуйте печатать и новые логи посмотрим. Убедитесь что printer-driver-gutenprint установлен. Заодно можно глянуть свежий /var/cache/cups/job.cache если имеется.
Цитата: mrgoodvin от 28 июня 2017, 12:24:16
obana, логи видать старые (26/Jun/2017), нужны свежие логи. После обновления проблемы? http://localhost:631/admin нужно отметить пункт «Сохранять отладочную информацию в журнале» с дальнейшим сохранением. Удалите/пересините старые лог-фалы, пробуйте печатать и новые логи посмотрим. Убедитесь что printer-driver-gutenprint установлен. Заодно можно глянуть свежий /var/cache/cups/job.cache если имеется.
Спасибо за подсказки. printer-driver-gutenprint установлен. Установил флаг — «Сохранять отладочную информацию в журнале». Удалил старые логи. Попробовал распечатать, новые логи не создаются. Содержимое файла job.cache:
Открыть содержимое (спойлер)
# Job cache file for CUPS v2.2.1
# Written by cupsd
NextJobId 9
<Job 1>
State 9
Created 1498459901
Completed 1498459910
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 2>
State 9
Created 1498459931
Completed 1498459940
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 3>
State 9
Created 1498460171
Completed 1498460180
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 4>
State 9
Created 1498460392
Completed 1498460401
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 5>
State 9
Created 1498460797
Completed 1498460806
Priority 50
Username obana
Name migration-notification.pdf
Destination MF3010
DestType 0
KOctets 141
NumFiles 0
</Job>
<Job 6>
State 9
Created 1498460854
Completed 1498460862
Priority 50
Username obana
Name Test Page
Destination MF3010
DestType 0
KOctets 1
NumFiles 0
</Job>
<Job 7>
State 9
Created 0
Completed 1498644334
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 1
NumFiles 0
</Job>
<Job 8>
State 9
Created 0
Completed 1498644521
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 16
NumFiles 0
</Job>
[свернуть]
Попробовать распечатать что-то в pdf-файл. Будут ли при этом создаваться логи?
Не совсем понятно при двух последних записях job.cache:
<Job 7>
State 9
Created 0
Completed 1498644334
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 1
NumFiles 0
</Job>
<Job 8>
State 9
Created 0
Completed 1498644521
Priority 50
Username obana
Destination MF3010
DestType 0
KOctets 16
NumFiles 0
</Job>
название документа удалено из лога специально?
Проверить установку пакетов foomatic-db-gutenprint, ghostscript и gsfonts, ijsgutenprint и при отсутствии до установить.
Почитать это https://wiki.archlinux.org/index.php/CUPS_(Русский), может что-то от туда поможет. В частности заменить LogLevel warn на LogLevel debug в /etc/cups/cupsd.conf, посмотреть может логи будут создаваться. Поэкспериментировать с разделом «Проблемы в результате обновления» (хоть там о версии ниже, но может помочь).
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64,
LXQt/KDE/OpenBox AMD Phenon X4 / 16Gb RAM / ATI HD7750 Silent
_______________________________
Debian GNU/Linux Stretch, kernel 4.9.0-5-amd64, LXQt/KDE/OpenBox
Acer Aspire One 722 AMD C60 / 4Gb RAM / ATI HD6290
Всем спасибо. Откатил систему на 8.8 этой пользоваться пока невозможно.
I have a little problem with CUPS 2.2.7
This is my /etc/hosts file:
127.0.0.1 example.com
127.0.0.1 localhost
in http://localhost:631/ CUPS is working right
but in http://example.com:631/ it doesn’t work on the same pc.
The message error in View error log is that one:
E [21/Feb/2019:11:54:18 +0100] [Client 33] Request from «localhost» using invalid Host: field «example.com:631».
The web page on Firefox print an error message Invalid request and give me an Error (error code: 400) but seems point on CUPS.
How to solve this problem so that example.com:631 points to localhost and CUPS answers it successfully instead of Error 400: Access Denied.
asked Feb 21, 2019 at 11:30
2
By default cups servers HTTP requests only with HTTP Host header equal to «localhost». To allow it servicing requests for additional HTTP host headers use ServerAlias
directive as described in the man cupsd.conf documentation. It’s common to do the most unsafe thing and add
ServerAlias *
to /etc/cupsd.conf
to allow all possible HTTP host headers to be serviced.
answered Feb 21, 2019 at 16:59
2
I know this is old, but I too was experiencing the same issue recently and I resolved it by updating the following line in cupsd.conf
from:
Listen 0.0.0.0:631
changed to:
Listen *:631
For those that maybe care to know, I’m running CUPS within a docker container, and this change corrects the «Bad Request» response.
answered Mar 19, 2020 at 14:54
1
- Печать
Страницы: [1] Вниз
Тема: Ошибка сервера CUPS (Прочитано 4813 раз)
0 Пользователей и 1 Гость просматривают эту тему.
kenny_957
извиняюсь если пишу не в тот раздел, но тем не менее, у меня возникла проблема с сервером печати.
ошибка возникла когда я вместо принтера Epson l210 подключил принтер Epson CX4300
пробовал переустановить сервер печати и настроиить как сказано в статье про CUPS
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original
sudo chmod a-w /etc/cups/cupsd.conf.original
ничего из этого мне не помогло, что можно еще предпринять ?
_angus_
ммм, а отчего не снести неверный принтер и поставить правильный? Хотя бы через http://localhost:631 ?
kenny_957
_angus_,
я не знаю, я сносил принтер, ставил его заново, сносил сервер печати и тоже ставил его заново, ничем это не помогло
- Печать
Страницы: [1] Вверх
#1 2013-02-04 18:40:22
- rsplenum
- Member
- Registered: 2013-01-10
- Posts: 25
[SOLVED]cups web interface bad request error
Installed cups, libcups and all the other pckages mentioned in CUPS archwiki page and also insatlled cups-pdf. Avahi-daemon is enabled and so does cupsd but on accessing web interface at archlinux:631 it give «Bad Request» message. Basically all I need is a virtual pdf printer like cups-pdf and my hp offficejet 5610 printer connected. any help is much appreciated.
Last edited by rsplenum (2013-02-04 20:10:28)
#2 2013-02-04 19:23:38
- olive
- Member
- From: Belgium
- Registered: 2008-06-22
- Posts: 1,490
Re: [SOLVED]cups web interface bad request error
Have you enabled cups (systemctl enable cups and reboot)? Try to access the web intercae with http://127.0.0.1:631
#3 2013-02-04 19:39:09
- rsplenum
- Member
- Registered: 2013-01-10
- Posts: 25
Re: [SOLVED]cups web interface bad request error
olive wrote:
Have you enabled cups (systemctl enable cups and reboot)? Try to access the web intercae with http://127.0.0.1:631
cupsd was enabled and running and so was avahi-daemon but localhost:631 was giving Bad Request error and 127.0.1.1:631 works, i wonder why the former doesn’t work ?
anyway BIG thanks to you.
#4 2013-02-04 19:46:00
- olive
- Member
- From: Belgium
- Registered: 2008-06-22
- Posts: 1,490
Re: [SOLVED]cups web interface bad request error
rsplenum wrote:
cupsd was enabled and running and so was avahi-daemon but localhost:631 was giving Bad Request error and 127.0.1.1:631 works, i wonder why the former doesn’t work ?
anyway BIG thanks to you.
What’s the content of /etc/hosts? You should have something like
127.0.0.1 archlinux.athome.net archlinux localhost
and have archlinux in /etc/hostname. If that is not setup correctly, you will experience other problems.
Last edited by olive (2013-02-04 19:46:42)
#5 2014-01-23 20:31:19
- theodoreward
- Member
- Registered: 2013-04-05
- Posts: 20
Re: [SOLVED]cups web interface bad request error
Just an FYI: I was getting bad request when trying to access localhost:631 as well, netstat showed cups was only listening for IPv6 connection so I had to add
::1 localhost.localdomain localhost
to /etc/hosts after which it worked fine.
#6 2014-02-04 19:47:57
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
Was this a really recent change? I haven’t had ipv6 enabled since I can remember in /etc/hosts, and only just today got this error for localhost:631.
Is there a way to stop this behavior and force ipv4?
#7 2014-02-09 15:00:32
- Nareto
- Member
- From: Pisa,Italy
- Registered: 2009-07-18
- Posts: 148
Re: [SOLVED]cups web interface bad request error
I too have this problem, and I’m not sure how OP solved it… simply starting the service??? anyhow I opened a new topic, since this is mark as solved, here
#8 2014-02-09 18:52:13
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
On my home computer, I still have my ipv6 host address commented out, yet I can access localhost:631 just fine. On my work laptop, the fix above works fine. I can open a new topic, but wondered if anyone who participated here could provide other ways to track down the issue, since it appears it’s not entirely related to /etc/hosts. I can’t find much at all on this from googling around, at least that’s recent. I think it’s related to 1.7.1, which was released around the time some of these issues started appearing.
#9 2014-02-09 20:11:14
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
As stated, my home laptop could still access localhost:631 with my ipv6 host line commented out in /etc/hosts. I just updated another post with what I think the problem is, which is a ListenStream=631 line in /usr/lib/systemd/system/cups.socket which did not exist in the 1.7.0 version of cups. The 1.7.1 version was pushed out sometime last month, which might explain these posts only coming up now (there’s at least three I’ve found). Read more via my post in the other thread.
I know this is solved, but wanted to leave breadcrumbs in related threads in case the solution here doesn’t work for those who stumble on this.
Last edited by jwhendy (2014-02-09 20:15:08)
#10 2014-02-09 21:45:28
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
For any interested, I was going to post a bug report, but in searching first, one had already been filed back on 1/27. I added links to the three pertinent threads there and will be following along.
#11 2014-02-27 12:36:58
- Gnux
- Member
- Registered: 2006-09-27
- Posts: 26
Re: [SOLVED]cups web interface bad request error
theodoreward wrote:
Just an FYI: I was getting bad request when trying to access localhost:631 as well, netstat showed cups was only listening for IPv6 connection so I had to add
::1 localhost.localdomain localhost
to /etc/hosts after which it worked fine.
That works for me, thanks for the tip
Skip to navigation
Skip to main content
Infrastructure and Management
- Red Hat Enterprise Linux
- Red Hat Virtualization
- Red Hat Identity Management
- Red Hat Directory Server
- Red Hat Certificate System
- Red Hat Satellite
- Red Hat Subscription Management
- Red Hat Update Infrastructure
- Red Hat Insights
- Red Hat Ansible Automation Platform
Cloud Computing
- Red Hat OpenShift
- Red Hat CloudForms
- Red Hat OpenStack Platform
- Red Hat OpenShift Container Platform
- Red Hat OpenShift Data Science
- Red Hat OpenShift Online
- Red Hat OpenShift Dedicated
- Red Hat Advanced Cluster Security for Kubernetes
- Red Hat Advanced Cluster Management for Kubernetes
- Red Hat Quay
- OpenShift Dev Spaces
- Red Hat OpenShift Service on AWS
Storage
- Red Hat Gluster Storage
- Red Hat Hyperconverged Infrastructure
- Red Hat Ceph Storage
- Red Hat OpenShift Data Foundation
Runtimes
- Red Hat Runtimes
- Red Hat JBoss Enterprise Application Platform
- Red Hat Data Grid
- Red Hat JBoss Web Server
- Red Hat Single Sign On
- Red Hat support for Spring Boot
- Red Hat build of Node.js
- Red Hat build of Thorntail
- Red Hat build of Eclipse Vert.x
- Red Hat build of OpenJDK
- Red Hat build of Quarkus
Integration and Automation
- Red Hat Process Automation
- Red Hat Process Automation Manager
- Red Hat Decision Manager
All Products
Issue
-
Printing works fine using CUPS in RHEL 6. but below messages keeps showing up in
/var/log/cups/error_log
:E [11/Feb/2016:14:08:34 -0500] Returning IPP client-error-bad-request for Send-Document (ipp://localhost:631/printers/prt123) from localhost I [11/Feb/2016:14:08:34 -0500] [Job 65584] Canceled by "root". E [11/Feb/2016:14:08:34 -0500] Returning IPP client-error-bad-request for Send-Document (ipp://localhost:631/printers/PRT234) from localhost I [11/Feb/2016:14:08:34 -0500] [Job 65585] Canceled by "root".
-
In RHEL 7, some jobs are not printing and we see the following messages in the error_log:
E [02/Feb/2019:12:23:52 -0500] Returning IPP client-error-bad-request for Send-Document (ipp://localhost:631/printers/prab2) from localhost E [02/Feb/2019:12:37:34 -0500] Returning IPP client-error-bad-request for Send-Document (ipp://localhost:631/printers/ltrpt08) from localhost
Environment
- Red Hat Enterprise Linux (RHEL) 6 & 7
- Common Unix Printing System (CUPS) 1.4.2 & 1.6.3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.
Current Customers and Partners
Log in for full access
Log In
понедельник, 28 июля 2014 г.
Решение проблемы CUPS ошибка «400 Bad Request»
Не работал cups по dns адресу компьютера comp.lan:631, лечится добавлением в файл cupsd.conf добавить параметр:
# nano /etc/cups/cupsd.conf
ServerAlias comp.lan
# service cups restart
Автор:
warlomak
на
13:51
Ярлыки:
принтеры,
cups,
ubuntu
1 комментарий:
-
developer
комментирует… -
Спасибо, помогло!
-
4 февраля 2021 г. в 01:02
Отправить комментарий
Следующее
Предыдущее
Главная страница
Подписаться на:
Комментарии к сообщению (Atom)
I have a little problem with CUPS 2.2.7
This is my /etc/hosts file:
127.0.0.1 example.com
127.0.0.1 localhost
in http://localhost:631/ CUPS is working right
but in http://example.com:631/ it doesn’t work on the same pc.
The message error in View error log is that one:
E [21/Feb/2019:11:54:18 +0100] [Client 33] Request from «localhost» using invalid Host: field «example.com:631».
The web page on Firefox print an error message Invalid request and give me an Error (error code: 400) but seems point on CUPS.
How to solve this problem so that example.com:631 points to localhost and CUPS answers it successfully instead of Error 400: Access Denied.
asked Feb 21, 2019 at 11:30
2
By default cups servers HTTP requests only with HTTP Host header equal to «localhost». To allow it servicing requests for additional HTTP host headers use ServerAlias
directive as described in the man cupsd.conf documentation. It’s common to do the most unsafe thing and add
ServerAlias *
to /etc/cupsd.conf
to allow all possible HTTP host headers to be serviced.
answered Feb 21, 2019 at 16:59
2
I know this is old, but I too was experiencing the same issue recently and I resolved it by updating the following line in cupsd.conf
from:
Listen 0.0.0.0:631
changed to:
Listen *:631
For those that maybe care to know, I’m running CUPS within a docker container, and this change corrects the «Bad Request» response.
answered Mar 19, 2020 at 14:54
1
#1 2013-02-04 18:40:22
- rsplenum
- Member
- Registered: 2013-01-10
- Posts: 25
[SOLVED]cups web interface bad request error
Installed cups, libcups and all the other pckages mentioned in CUPS archwiki page and also insatlled cups-pdf. Avahi-daemon is enabled and so does cupsd but on accessing web interface at archlinux:631 it give «Bad Request» message. Basically all I need is a virtual pdf printer like cups-pdf and my hp offficejet 5610 printer connected. any help is much appreciated.
Last edited by rsplenum (2013-02-04 20:10:28)
#2 2013-02-04 19:23:38
- olive
- Member
- From: Belgium
- Registered: 2008-06-22
- Posts: 1,490
Re: [SOLVED]cups web interface bad request error
Have you enabled cups (systemctl enable cups and reboot)? Try to access the web intercae with http://127.0.0.1:631
#3 2013-02-04 19:39:09
- rsplenum
- Member
- Registered: 2013-01-10
- Posts: 25
Re: [SOLVED]cups web interface bad request error
olive wrote:
Have you enabled cups (systemctl enable cups and reboot)? Try to access the web intercae with http://127.0.0.1:631
cupsd was enabled and running and so was avahi-daemon but localhost:631 was giving Bad Request error and 127.0.1.1:631 works, i wonder why the former doesn’t work ?
anyway BIG thanks to you.
#4 2013-02-04 19:46:00
- olive
- Member
- From: Belgium
- Registered: 2008-06-22
- Posts: 1,490
Re: [SOLVED]cups web interface bad request error
rsplenum wrote:
cupsd was enabled and running and so was avahi-daemon but localhost:631 was giving Bad Request error and 127.0.1.1:631 works, i wonder why the former doesn’t work ?
anyway BIG thanks to you.
What’s the content of /etc/hosts? You should have something like
127.0.0.1 archlinux.athome.net archlinux localhost
and have archlinux in /etc/hostname. If that is not setup correctly, you will experience other problems.
Last edited by olive (2013-02-04 19:46:42)
#5 2014-01-23 20:31:19
- theodoreward
- Member
- Registered: 2013-04-05
- Posts: 20
Re: [SOLVED]cups web interface bad request error
Just an FYI: I was getting bad request when trying to access localhost:631 as well, netstat showed cups was only listening for IPv6 connection so I had to add
::1 localhost.localdomain localhost
to /etc/hosts after which it worked fine.
#6 2014-02-04 19:47:57
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
Was this a really recent change? I haven’t had ipv6 enabled since I can remember in /etc/hosts, and only just today got this error for localhost:631.
Is there a way to stop this behavior and force ipv4?
#7 2014-02-09 15:00:32
- Nareto
- Member
- From: Pisa,Italy
- Registered: 2009-07-18
- Posts: 148
Re: [SOLVED]cups web interface bad request error
I too have this problem, and I’m not sure how OP solved it… simply starting the service??? anyhow I opened a new topic, since this is mark as solved, here
#8 2014-02-09 18:52:13
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
On my home computer, I still have my ipv6 host address commented out, yet I can access localhost:631 just fine. On my work laptop, the fix above works fine. I can open a new topic, but wondered if anyone who participated here could provide other ways to track down the issue, since it appears it’s not entirely related to /etc/hosts. I can’t find much at all on this from googling around, at least that’s recent. I think it’s related to 1.7.1, which was released around the time some of these issues started appearing.
#9 2014-02-09 20:11:14
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
As stated, my home laptop could still access localhost:631 with my ipv6 host line commented out in /etc/hosts. I just updated another post with what I think the problem is, which is a ListenStream=631 line in /usr/lib/systemd/system/cups.socket which did not exist in the 1.7.0 version of cups. The 1.7.1 version was pushed out sometime last month, which might explain these posts only coming up now (there’s at least three I’ve found). Read more via my post in the other thread.
I know this is solved, but wanted to leave breadcrumbs in related threads in case the solution here doesn’t work for those who stumble on this.
Last edited by jwhendy (2014-02-09 20:15:08)
#10 2014-02-09 21:45:28
- jwhendy
- Member
- Registered: 2010-04-01
- Posts: 621
Re: [SOLVED]cups web interface bad request error
For any interested, I was going to post a bug report, but in searching first, one had already been filed back on 1/27. I added links to the three pertinent threads there and will be following along.
#11 2014-02-27 12:36:58
- Gnux
- Member
- Registered: 2006-09-27
- Posts: 26
Re: [SOLVED]cups web interface bad request error
theodoreward wrote:
Just an FYI: I was getting bad request when trying to access localhost:631 as well, netstat showed cups was only listening for IPv6 connection so I had to add
::1 localhost.localdomain localhost
to /etc/hosts after which it worked fine.
That works for me, thanks for the tip