ec2 implementation - CUPS issues

Hi guys I am working on implementing open on an AWS ec2 server printing back via google cloud print to the relevant local printers....

Couple of issues that I am working through but if anyone has a more recent process they used to implement on ubuntu let me know!

My current issues are I am using a t1.micro instance...so I have limited resources

and spreading load buy using a rds server to host mysql.  I have no idea if the CUPS cloud printer driver is going to work, but my main focus now is getting openvpms to deploy on tc7.   As I work through I will post my various hiccups and if anyone can throw me a bone do so!.

I want to get it done using libreoffice and openjdk (as they are standard in ubuntu)

 

Cheers.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: ec2 implementation - CUPS issues

I am having a few issues getting cups to play nice

This is my current error

at net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:286)
... 65 more
Caused by: java.io.IOException: error=1 running: '/usr/bin/lpr' '-PBrother_HL-2270DW_series' '-JJasperReports - Patient Medical Records' '/tmp/tomcat7-tomcat7-tmp/javaprint2253959080408729201.ps'
lpr: Brother_HL-2270DW_series: unknown printer
at sun.print.PSPrinterJob$PrinterSpooler.handleProcessFailure(PSPrinterJob.java:699)

I will say that jasperreports printing is apparently dependent on lpr which isnt installed in a server install of ubuntu always by default

you should sudo apt-get install lpr 

Now error would seem obvius I dont have a printer called 

 Brother_HL-2270DW_series

except.

ubuntu@ip-172-31-3-93:/home/openvpms/openvpms$ lpstat -v
device for Brother_HL-2270DW_series: cloudprint://myemail%40myemail.com.au/f......b
ubuntu@ip-172-31-3-93:/home/openvpms/openvpms$

So you can see cups does show the printer

however 

lpq shows no entries so i suspect I will need an instance restart for lpr to pick up the cups entries...

any other tips throw them in!@!!

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: ec2 implementation - CUPS issues

Can you use lpr to print to it from the command line?

See also http://serverfault.com/questions/364112/lpr-command-wont-recognize-cups-...

 

Re: ec2 implementation - CUPS issues

Thanks Tim,

Go figure there it was the lpr command in cups-bsd that java.awt is dependent on for printing rather than lpr in the lpr package.

I removed lpr and installed cups-bsd and now lpr is picking up the printer and working from command line 

Given java-awt just calls the command line to print a generated postscript file.

 

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: ec2 implementation - CUPS issues

Yep brilliant working as intended and I will point out that it prints in under 15 seconds (which is about normal for our printer.  The cups-cloudprinter driver is definitely an option for printing remotely using Openvpms on a virtual machine.

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: ec2 implementation - CUPS issues

Ben,

  Thanks for your above work.  Just wondering - did you get cloudprint to print with label printers?  I have got it to work with standard A4 laser printers, but am struggling with the label printer (see http://www.niftiestsoftware.com/cups-cloud-print/comment-page-3/#comment...).

 

 

Re: ec2 implementation - CUPS issues

To be honest I never actually tried....and the ec2 instance I used as a testbed has been repurposed.

 

I think with cups my workflow was pretty simple.

1.  Is the printer listed in the Google Cloud Printers setup that you access with your google account.

https://www.google.com/cloudprint/#printers

2. Can i print to it from google. and more importantly does the document format correctly.

3. If I install google cloud print on a windows machine can I print to the printer using the google cloud print driver.

4. Is the printer listed by CUPS.

5.  Can I print or check the queu using the http server that comes by default with CUPS

6.  Is the printer listed via OPENVPMS 

7. Test print from OPEN.

 

It was designed to break down the printer issues.

1. Google cloud client software issues. if 1-3 cant be completed

2. 4 and 5 Cups - cloud integration issues

3. 6 and 7 Java CUPS integration issues.

 

 

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content