Question

linux print server win & linux clients

Asked by: phirephly

Looking to set up a print server on a linux (Fedora Core 2) machine. I have the printer connected to it and it can print locally. The server doesn't have X on it, so we need to edit the .conf files (cupsd.conf or whatever). I am plenty comfortable in vi, etc...

I have a windows machine and a linux machine (also FC2) i want to print to this server. I have not tried to mess with the windows machine at all, because of the numerous problems I have been having with the Linux client.

Someone please step me through this process. I'll give diagnostic outputs or whatever. I don't even know what to post to help get started. The server is set up so that it can print locally. I have tried to connect to it wirh the client using the printer configuration utility, but it doesn't seem to connect properly. Right now the error is "Network host busy will retry in 30 seconds... INFO: connecting to printserver on port 631"  before i was getting an error: "client-error-forbidden". Don't know which is better... Hopefully someone can help me learn what's really going on here. I've seen a lot of pages with the client-error-forbidden, but nobody really had a solution for it that matched mine.

Here's the server's cupsd.conf, if that's any help:

<Location /printers/lp0>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
Allow from <ip>
</Location>
# Lines below are automatically generated - DO NOT EDIT
<Location /printers/deskjet>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
Allow from <ip>
</Location>
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
BrowseAddress 255.255.255.255
Listen *:631

With the windows machine is there any way around using SAMBA, or that's my only option? am using Win98.

Thanks so much for your help. I've wasted the whole weekend trying to figure it out myself and even had someone in IRC that couldn't debug an almost identical setup. It should be so much more simple, and i'm sure it is...  I just don't know what I'm not seeing.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-10-03 at 21:32:35ID21154435
Tags

linux

,

print

,

server

Topic

Linux Printing

Participating Experts
3
Points
500
Comments
28

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. CUPS & samba printers
    HI Was playing around with CUPS for the first time this weekend, and tried to configure a SAMBA printer connected to a win98 box ( Canon LBP4 lite ). However, I seem to be doing something wrong as it won't even print a test page. Can someone give me the "ins and outs&q...
  2. Cups errors, but not even using cups
    Hi there, Got a fileserving machine running Fedora 5, it's using Samba to share files to about 5 windows pcs. I have just noticed when I look in the /var/logs/samba log files I see error messages about cups like "unable to connect to ups server - connection refused"...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: owensleftfootPosted on 2004-10-04 at 01:32:09ID: 12215382

You cant print from your other fedora box because of the Deny ALL, Allow from 127.0.0.1 option. This will only accept jobs from the machine cups is actually running from. If security isnt an issue, you could use Allow from ALL. If you want to limit access to hosts from your own network, you can  do this too. If  the cups box ip address is 192.168.1.1 you can allow the local network to print with Allow from 192.168.1.*
You probably do need samba  for the win98 box to print but it shouldnt be hard. Add the line printing = cups  to smb.conf and make sure the [printers] share is uncommented. You'll need to restart cups & samba after making changes.

 

by: phirephlyPosted on 2004-10-04 at 20:11:19ID: 12223561

Here is what it looks like now... shouldn't this do it? First I just commented out the Deny lines, and it just sat there and said "connecting.... " forever. So then I added the Deny From None lines, thinking that the Order Deny, Allow made it look for a Deny first. Now I'm getting the Network Host Busy error again. I've made two entries with the client, one with the server's name, the other with the IP, just in case that was the problem. Both are acting the same, though. The order of the Allow Froms doesn't really matter, does it? Shouldn't it just be a list of the allowed IPs? hrm... Also, I'll just check, but since I can get different errors, I think I'm doing this right... to restart (and reread the cupsd.conf file) I can just do a service cups restart, right?  Thanks owensleftfoot.


<Location /printers/lp0>
Order Deny,Allow
#Deny From All
Deny From None
Allow From 127.0.0.1
Allow From 192.168.1.1
AuthType None
Allow from 192.168.1.1
</Location>
# Lines below are automatically generated - DO NOT EDIT
<Location /printers/deskjet>
Order Deny,Allow
#Deny From All
Deny From None
Allow From 127.0.0.1
Allow From 192.168.1.1
AuthType None
Allow from All
</Location>
<Location />
Order Deny,Allow
#Deny From All
Deny From None
Allow From 127.0.0.1
Allow From 192.168.1.1
</Location>
Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
BrowseAddress 255.255.255.255
Listen *:631

 

by: owensleftfootPosted on 2004-10-05 at 01:56:44ID: 12224840

Is 192.168.1.1 the ip address of the second FC box? The firewall is turned on by default  in FC. Its worth turning it off just to check that it isnt interfereing - service iptables stop. Have a look at /var/log/spool/cups/access.log and post any relevant info here. Also what type of printer did you configure on the client FC box? It should have been lpd or ipp.

 

by: phirephlyPosted on 2004-10-05 at 19:26:29ID: 12233370

that's a placeholder that has the actual IP of my client machine. since i'll be doing things like turning off firewalls (i tried it before to no avail also, but tried it again tonight in case there was something different) and possibly exposing my print server as I learn how to get my Allows in order, I wanted to be a bit careful. However, the actual IP used is a world-readable IP.

I turned off iptables and now it gives me a server-error-service-unavailable error, even when i turn the firewall back on.

The client queue is set up as Networked CUPS (IPP) and the server is the fqd. For the path, I put /dev/lp0, which is where the printer appears to be on the server, though it seems to give me the same results no matter what i put in there. The driver is the same as on the server and I didn't mess with the driver options or the queue options.

On the server in /var/log I do have a bunch of spooler files (spooler, spooler.1, spooler.2, etc... )  These are all empty, however, so give us no meaningful information. In /var/log/cups/access_log, I have a million lines like this one:

192.168.1.1  - - [03/Oct/2004:17:28:38 -0700] "POST /dev/lp0 HTTP/1.1" 403 0

That was the last one, though, so somewhere after the third it appears that messages aren't even getting to the server anymore. It's weird that the test page I sent with the firewall off didn't show up, isn't it? Also looked at the error_log on the server and I don't see anything worth mention in there either. Just standard "reloading", and "read /cups/ppds.dat", etc... Thanks for your continued help. I appreciate it!

 

by: phirephlyPosted on 2004-10-05 at 20:44:14ID: 12233950

Also, I believe this should remedy the firewall issue, right?

iptables -I RH-Firewall-1-INPUT 7 -p tcp --destination-port 631 -j ACCEPT

It gave me the following rule with the rest of my open ports:

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp

Some of them say "state NEW", that might be a good thing to add, or not?

Thanks and ttyl,

mich

 

by: phirephlyPosted on 2004-10-05 at 20:56:33ID: 12234047

does it help any to say that the print jobs are just sitting in the client queue and that they don't make it to the server queue?

Also, I'm now getting a Destination printer does not exist! error. :(  This is much harder than it should be, huh?  Thanks for all your help.

 

by: owensleftfootPosted on 2004-10-06 at 01:08:47ID: 12235374

Did you set up the printer on the linux box  with the cups interface or with redhat-config-printer? It would be worth deleting the client setup and doing it again setting it up as a unix printer - lpd with redhat-config-printer. Cups supports both and you may find it easier to setup. The queue name is the name of the printer on the server.

 

by: uptimecustomercarePosted on 2004-10-06 at 11:29:48ID: 12240765

First check whether you are able to ping your server

Next in your /etc/cups/cupsd.conf
 the line 192.168.1.1
should be 192.168.1.*or 192.168.1.

and see if it works

 

by: phirephlyPosted on 2004-10-06 at 21:42:58ID: 12245574

owen:

not sure why, but the system doesn't find a redhat-config-printer. There are rpms in the up2date spool for it, which would seem to indicate that it's been updated, but it's nowhere to be found. What I have been using is this utility: system-config-printer-gui. However, I did try to set it up with lpd this time instead of ipp, but I am again getting the network host is busy, down, or unreachable.  drat!

uptime:

I can ping the server. I am sshed into it by name to edit/view cupsd.conf and other stuff.
Changing the allowed address as you showed unfortunately didn't give us any progress. It just gave me the server-error-service-unavailable error again.



In the sharing dialog on the client box... i don't want to make the queue available to others, right? Just making sure I'm understanding what it's asking me. On the general tab, i have automatically find remote shared queues ticked and ticked the lpd box for the lpd printer in the setup. Must be last for me... the promt asking if i would like to print a test page had a new tone to it tonight... yes, I *would* like to print a test page! :)

Maybe we could approach this from a different way... first making sure that the server is on and listening (i'm pretty sure it is, but these busy/unreachable errors can't be right), then move over to the client when we've determined that's the problem? Is there some lp command that will check the cupsd.conf file? or some option to one of the lp tools that will give us meaningful output? Like a -v option to one of them or something? i just know of lpq, lprm, and lp... maybe there are other ones that would be helpful to us. Anyways... thanks again for your help!

 

by: owensleftfootPosted on 2004-10-07 at 02:03:09ID: 12246800

Unfortunately while cups supports lpd, its tools dont have all the options of the original lpd tools - there is no  -V  option for lpr.  The next thing I would try is using cups own interface to add the printer on the client. Ina webbrowser go to http://127.0.0.1:631/ and login as root. Try adding a printer - try ipp first then lpd if ipp doesnt work. I think the "name","description" & "location" fields are just comments -  it doesnt really matter what you put here.

192.168.1.1  - - [03/Oct/2004:17:28:38 -0700] "POST /dev/lp0 HTTP/1.1" 403 0
This looks like an access  denied error message. Comment the other entries out and try Allow from ALL (Dont forget to restart cups). I would try this before what I suggested above.

 

by: uptimecustomercarePosted on 2004-10-07 at 08:40:53ID: 12250022

Check the following
1)ensure lpd service is stopped on the server.
/sbin/service lpd stop

2)”cups” is started when you boot your system.In case it doesn’t , use the following command.
/sbin/service cups start

3)use “ntsysv” to start “cups” automatically when you restart the system.


4)Disable the firewall if any on your server

5)The basic cupsd.conf file should have the following lines On the server.
Create a new cupsd.conf file.  

Location /
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.10.*
/Location

Browsing On
BrowseProtocols cups
BrowseAddress 192.168.10.255
BrowseInterval 60

On the client:
BrowseAllow 192.168.10.*
BrowseDeny All
BrowseOrder allow,deny



6)Check if the following packages are installed on your client

cupsys
cupsys-bsd
cupsys-client
libcupsimage2
libcupsys2-gnutls10

7) telnet to your server from the  client system on port 631 and check the response.

 

by: phirephlyPosted on 2004-10-10 at 18:45:02ID: 12273466

owen: adding printers locally to the server that used the world IP gave me the same problem as the client. I'm sure you're right that it is an access problem since an HTTP 403 is access forbidden, which is the same error the config is showing. However, I think somehow we've fixed that part of the problem, as you'll see below.

uptime:

lpd is an unrecognized service, so it must be off :-P  cups is on and I used chkconfig to start it on runlevels 2,3,4, and 5.

I opened a hole for cups in the firewall (port 631), using the rules above. I can telnet into port 631, so it appears to be working fine.

Here are the cups packages on my system:
# rpm -qa | grep cups
qtcups-2.0-15
cups-libs-1.1.20-11.3
cups-devel-1.1.20-11.3
cups-1.1.20-11.3
libgnomecups-0.1.6-7

They're different from yours, guessing becuase you're using a BSD-based system and I'm on FC2? I think everything is there to do the printing. It's trying, I'm just getting access errors, it appears.

Telnetting to port 631 works fine. It says Trying, then Connected. It tells me the escape char is '^]', then waits for input.

Server:
--------------------------------
MaxLogSize 0

#
# Printcap: the name of the printcap file.  Default is /etc/printcap.
# Leave blank to disable printcap file generation.
#

Printcap /etc/printcap

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 4.43.*
</Location>
Browsing On
BrowseProtocols cups
#BrowseOrder Deny,Allow
#BrowseAllow from @LOCAL
BrowseAddress 4.43.255.255
BrowseInterval 60
Listen *:631

Client:
------------------------------
LogLevel debug

#
# MaxLogSize: controls the maximum size of each log file before they are
# rotated.  Defaults to 1048576 (1MB).  Set to 0 to disable log rotating.
#

MaxLogSize 0

#
# Printcap: the name of the printcap file.  Default is /etc/printcap.
# Leave blank to disable printcap file generation.
#

Printcap /etc/printcap

<Location /printers/printer-cups>
Order Deny,Allow
Allow From 127.0.0.1
</Location>
<Location />
Order Deny,Allow
Allow From 127.0.0.1
</Location>
Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
Allow 127.0.0.1
BrowseAllow From All
Listen 127.0.0.1:631




Somewhere in the tweaking of this, it seemed to work. My access log shows HTTP 200s from the client machine. Now it shows nothing (not even the 403s). So somewhere along the way, the server was accepting jobs from the client (though there was a new problem: it still wasn't printing them). From the server I did a lp printer.mydomain.com testfile.txt and it printed that out. Since I used the domain, this means that the printer does accept external jobs, right? Does this now narrow it down to a misconfigured client, or did the server cheat? I see that the access_log shows a couple hits from the IP address then it goes back to localhost. Oddly (or maybe not) all the 200s from when I was connecting, there was one connection from the client IP, then a bunch from localhost again.   Anyways... are we getting close, I hope?

PS - Why is it on the client that even though i've commented out a printer queue and restarted cups that it still shows up in the print dialogs? How can it still find that printer? ttyl,

mich

 

by: owensleftfootPosted on 2004-10-11 at 01:31:58ID: 12274566

What does printers.conf look like on the client?

 

by: phirephlyPosted on 2004-10-11 at 17:13:04ID: 12282677

I hope we're getting close. I hate using so much of your time :(  Seems like this should be so much easier...  Anyways, thank you for continued help!


For the client:

<DefaultPrinter printer-cups>
Info Created by redhat-config-printer 0.6.x
Location
DeviceURI ipp://printer.domain.com/dev/lp0
State Stopped
StateMessage Destination printer does not exist!
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

On the server (hope it helps to compare):
<DefaultPrinter deskjet>
Info Created by redhat-config-printer 0.6.x
DeviceURI parallel:/dev/lp0
Location
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
<Printer printer-cups>
Info Created by redhat-config-printer 0.6.x
DeviceURI ipp://printer.domain.com/dev/lp0
Location
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>



The domain name resolve to the correct IP address (tested via ping).

 

by: owensleftfootPosted on 2004-10-12 at 02:13:34ID: 12285128

I think this is the problem -  DeviceURI ipp://printer.domain.com/dev/lp0 on the client.  I think that /dev/lp0 should actually be the name of the printer on server, not the actual printer device.  From your conf file it looks like your printer is called printer-cups. So the line should be DeviceURI ipp://printer.domain.com/printer-cups

 

by: phirephlyPosted on 2004-10-12 at 20:40:35ID: 12294472

printer-cups was the printer we made a while ago to try to connect to the print server to itself on its external address (which did work). deskjet is the direct one on the parallel port. I made the change as you said and also experimented with putting in deskjet. both of them intermittently successfully post to the server.

[12/Oct/2004:19:17:58 -0700] "POST /printer-cups HTTP/1.1" 200 307
.....
[12/Oct/2004:19:20:54 -0700] "POST /deskjet HTTP/1.1" 200 302

but this doesn't always work. Also, I can't figure out how/when it does work.

An additional problem is that even when a job does rarely post, it is never printed. Nothing seems to get into the queue. All client-generated jobs sit on the client queue. When I do an lpq on the client, it says that the printer is not ready. Then it lists the jobs. Perhaps this is why it's not sending them?

It seems like the things I change in the files (using vi) don't actually seem to affect the configuration. For some reason, it only seems to happen when I use the GUI. Am I looking at the wrong files?  When I do an lp somefile.txt it just sticks it in the queue.


Here are the results I'm getting that I think are indicative of what's happening:

In the GUI, printing a test page doesn't do anything on the server. However, if I go in to edit the printer without changing anything, when I hit ok, it allows the Apply button. When I hit apply, it will send one job to the server if there was one waiting in the queue (it doesn't look like it sends any more than that) that hasn't been sent. If I open the edit dialog (mind you, without changing anything) and click OK, then Apply, if there aren't any waiting jobs to send, then the next job that I send - from the GUI - will get sent (I've just been doing test pages from the printconf tool). So it seems that clicking on Apply in the GUI will trigger (or set the trigger for) one job, though the server sill won't print that job. I have not tried filling the queue with jobs and seeing if I can Apply through multiple ones.

From the command line, we're completely dead. Nothing happens. I figured the Apply button in the printconf tool just did a service cups restart, but that doesn't seem to be the case. When I do an lp /usr/share/printconf/tests/testpage.ps, it just sticks it in the client queue and is happy with that (though i am not). Even if i restart the service, that doesn't seem to boot it over to the server. Now this command line error might be useful... if i do a lp -h ipp://printer.domain.com/deskjet /usr/share/printconf/tests/testpage.ps it will give me this error:
lp: error - scheduler not responding!
Does that help?   I hope it does. Thank you. I think we're cornering it. We're slowly forcing it to give up small parts at a time. ttyl,

mich

 

by: owensleftfootPosted on 2004-10-13 at 01:15:10ID: 12295677

Try changing the ipp:// line in printers.conf on the client to start with lpd:// instead. Lpd is a much simpler protocol than ipp. Also change printer.domain.com to the actual ipaddress of the server - just to rule out dns timeouts etc.

 

by: phirephlyPosted on 2004-10-14 at 21:37:11ID: 12316176

neither helped. i was getting service unavailable errors and such :(  grrrr.   went back to the config before where i was at least connecting upon restarts and had a dead command line.

 

by: owensleftfootPosted on 2004-10-15 at 01:21:02ID: 12316971

What does the output of lpc status on the client look like?

 

by: phirephlyPosted on 2004-10-15 at 04:32:38ID: 12317890

client says...

printer-cups:
        printer is on device 'ipp' speed -1
        queuing is enabled
        printing is disabled
        no entries
        daemon present

 

by: owensleftfootPosted on 2004-10-15 at 04:45:28ID: 12317978

Try /usr/bin/enable printer-cups
You have to use the whole path because there is a bash builtin function called enable which will be called if you dont.

 

by: phirephlyPosted on 2004-10-15 at 21:23:44ID: 12326013

oh boy! that seemed to get something going. still not printing yet, but i think we're homing in on it. Here's what I think happened and you can see if the logs support it. The enable was what we needed. That got it started sending jobs to the server. After talking to the server, the server said something bad to the client and it stopped. Doing an lpq right after enabling the printer showed the printer "ready and printing". But a few seconds later (after their convo) it was "not ready" again. Here is what happened on the server from the access log:

localhost - - [15/Oct/2004:21:08:29 -0700] "POST /admin/ HTTP/1.1" 200 128
<ip> - - [15/Oct/2004:21:08:53 -0700] "POST /dev/lp0 HTTP/1.1" 200 302
<ip> - - [15/Oct/2004:21:08:57 -0700] "POST /deskjet HTTP/1.1" 200 302
<ip> - - [15/Oct/2004:21:09:05 -0700] "POST /dev/lp0 HTTP/1.1" 200 302
<ip> - - [15/Oct/2004:21:09:30 -0700] "POST /deskjet HTTP/1.1" 200 302
<ip> - - [15/Oct/2004:21:09:41 -0700] "POST /deskjet HTTP/1.1" 200 302
localhost - - [15/Oct/2004:21:09:45 -0700] "POST /printers/ HTTP/1.1" 200 175

and the error log gave us a little more info (i tweaked it to do so in with the debug level in the conf file:

D [15/Oct/2004:21:18:43 -0700] AcceptClient() 7 from <client-ip>:631.
D [15/Oct/2004:21:18:43 -0700] ReadClient() 7 POST /deskjet HTTP/1.1
E [15/Oct/2004:21:18:43 -0700] get_printer_attrs: resource name '/deskjet' no good!
D [15/Oct/2004:21:18:43 -0700] Sending error: client-error-not-found
D [15/Oct/2004:21:18:43 -0700] ProcessIPPRequest: 7 status_code=406
D [15/Oct/2004:21:18:43 -0700] CloseClient() 7

the server is looking for a printer named /deskjet instead of just deskjet?

the printers.conf file says this:

<DefaultPrinter deskjet>
Info Created by redhat-config-printer 0.6.x
Location
DeviceURI parallel:/dev/lp0
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

I'll try to do some testing with this hypothesis to see if i can get something to work. But if you have any other things to try, recommend them as well. :)   Thanks!

 

by: phirephlyPosted on 2004-10-15 at 21:41:37ID: 12326045

hrm. in the printconf GUI on the client, I had been putting in /deskjet for the resource. I tried taking out the / in the beginning (in case it already added one and i was making two somehow and it wasn't showing up in printers.conf). This didn't work, and just tried to append deskjet to the end of my address. Yuck. It also didn't like resource name /dev/lp0. I even tried taking everything out and just putting in / for the path in the GUI - no good.

So we've got the following paths in the GUI that the server has called bad resources in its error log:
/deskjet
/dev/lp0
/

Any ideas?

The relevant entry from the server in its printers.conf is listed in the previous post.

 

by: phirephlyPosted on 2004-10-16 at 08:02:33ID: 12327788

owen -

aha!  got it!  The printer now prints docs from the client that are sent via either the command line or the GUI.

in the printconf GUI, the correct answer for "path" was /printers/deskjet   - I guess it needed to know what kind of resource "deskjet" was.

for completeness, here are all the config files we were working with:

client
----------------
printers.conf:

<DefaultPrinter printer-cups>
Info Created by redhat-config-printer 0.6.x
DeviceURI ipp://printer.domain.com/printers/deskjet
Location
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

cupsd.conf:

Allow 127.0.0.1
#BrowseDeny All
<Location /printers/printer2>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
</Location>
# Lines below are automatically generated - DO NOT EDIT
<Location /printers/printer-cups>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
</Location>
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
Listen 127.0.0.1:631

server
-----------------

printers.conf:

<DefaultPrinter deskjet>
Info Created by redhat-config-printer 0.6.x
Location
DeviceURI parallel:/dev/lp0
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
<Printer printer-cups>
Info Created by redhat-config-printer 0.6.x
Location
DeviceURI ipp://printer.domain.com/dev/lp0
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

cupsd.conf:

LogLevel debug
MaxLogSize 0
Printcap /etc/printcap

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.*
</Location>
Browsing On
BrowseProtocols cups
#BrowseOrder Deny,Allow
#BrowseAllow from @LOCAL
BrowseAddress 192.168.255.255
BrowseInterval 60
Listen *:631


I have one final question... so I have to do that /usr/bin/enable printer-cups every time or once it's up and running, it'll stay that way? If I have to do it all the time (though I'm guessing I wouldn't need to), what is the best way to do it? Thanks! ttyl,

mich

 

by: owensleftfootPosted on 2004-10-16 at 13:42:36ID: 12329477

If its working it should stay working. Printing gets disabled when the target printer gives enough error messages - no point in sending jobs if there is no paper in the printer. If you need to you could setup a cron job to do it every 5 minutes - if printing is enabled the command just wont do anything.

 

by: phirephlyPosted on 2004-10-16 at 14:22:40ID: 12329880

okey dokey. thanks!

 

by: jcw20Posted on 2005-06-07 at 07:55:37ID: 14162474

I would  use samba   which the config  is listed in /etc/samba   edit  smb.conf
 

you will  need to make samba  users   and psswords .

 

by: jcw20Posted on 2005-06-07 at 07:56:19ID: 14162482

fc 3   is  out now

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...