Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 418063

Summary: Eclipse cannot print if CUPS server requires encryption
Product: [Eclipse Project] Platform Reporter: Alex Korobkin <korobkin+ec>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact: Arun Thondapu <arunkumar.thondapu>
Severity: normal    
Priority: P3 CC: arunkumar.thondapu, ipun, Silenio_Quarti
Version: 4.8Keywords: helpwanted, triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Alex Korobkin CLA 2013-09-25 17:25:24 EDT
This problem occurs with Eclipse running on a Linux machine and printing to a central CUPS printserver over the network. Tested with Eclipse 3.8 and 4.3 on Ubuntu Linux 12.04 x64, CUPS 1.5.4 on the same platform. 

To reproduce, 

1. Open /etc/cups/cupsd.conf on the printserver, find <Location /> clause and insert "Encryption Required" there without quotes:

<Location />
  Encryption Required
  ...
</Location>

2. Restart CUPS (sudo restart cups) on the printserver. 

3. Launch Eclipse on your local machine with the remote printserver being your target printserver: 

CUPS_SERVER="printserver-hostname.example.com" /usr/bin/eclipse

Alternatively, you can specify remote printserver in /etc/cups/client.conf with the directive 
ServerName printserver-hostname.example.com
it makes no difference for the bug. You can even specify local machine this way, as long as it listens to network connections. 

4. Try printing a file. Printers will be visible on the list of the printers, but nothing will be printed. 

cups error_log reads: 

cupsdAcceptClient: 13 from 192.168.0.2:631 (IPv4)
cupsdReadClient: 13 POST /printers/Ricoh-Aficio-MP-C3300 HTTP/1.1
cupsdAuthorize: No authentication data provided.
cupsdIsAuthorized: Need upgrade to TLS...
cupsdCloseClient: 13

Which basically means that CUPS asked Eclipse to switch to TLS-encrypted connection, but it failed to do so. 

Changing the line in cupsd.conf to "Encryption IfRequested" or removing the line allows Eclipse to print again, but the jobs are sent over the network in plain text. 

I'd love to provide related debug logs, but cannot see anything printing-related when I try to collect traces from Eclipse.
Comment 1 Ian Pun CLA 2017-06-21 16:10:27 EDT
Hi Alex,

Would you be able to reproduce this with a newer version of Eclipse?
Comment 2 Alex Korobkin CLA 2017-06-21 16:23:11 EDT
(In reply to Ian Pun from comment #1)
> Hi Alex,
> 
> Would you be able to reproduce this with a newer version of Eclipse?

Yes, same results when tested on Version: Oxygen (4.7), Build id: I20170522-0800
Comment 3 Ian Pun CLA 2017-06-22 10:12:00 EDT
As this bug has been verified to be still existing in Oxygen, I will be triaging this. Visit https://www.eclipse.org/swt/triage.php for details.
Comment 4 Eclipse Genie CLA 2020-01-30 16:49:18 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.