[SOLVED] CUPS server error

Questions about applications and software
Forum rules
Before you post please read how to get help
Locked
psg
Level 1
Level 1
Posts: 38
Joined: Sun Jan 10, 2010 5:37 pm
Location: Portugal

[SOLVED] CUPS server error

Post by psg » Tue Jul 06, 2010 7:51 am

I know there are older posts concerning this subject, but I couldn't found similar situations.

I'm running Mint 9 (Gnome) and every thing was going fine, until I needed to connect to a printer in a Windows work group.

I tried several solutions, witch included adding two files in /usr/share/cups. A *.ppd file and one filter, I think it was it.
I created and removed several times one two printers (the ones I had available with no success.

Nevertheless, I finally gave up and used a pen to print from another pc (a windows one). Not very good for my image of Linux enthusiastic, but that's me not being very handy.

Now the problem:
At the moment I go to Printing and have the indication "Not connected" in the bottom of the window and have the window without any printer. Before I had also, by default, a virtual printer to print to pdf.
I try to connect selecting Server > Connect menu and localhost. It returns me the error "CUPS server error: There was an error during the CUPS operation:'failed to connect to server'".
I already tried:
- /usr/share/cups start
- sudo /usr/sbin/cupsd
- sudo initctl start cups

They all return that the service is running.

Anyone can help me?
Last edited by psg on Thu Jul 08, 2010 8:11 am, edited 1 time in total.

User avatar
RedWagon
Level 5
Level 5
Posts: 632
Joined: Tue May 26, 2009 6:41 pm

Re: CUPS server error

Post by RedWagon » Wed Jul 07, 2010 10:13 am

This will show you all running cups processes:

Code: Select all

ps aux | grep -v grep | grep cups
My output (cups running as it should) looks like this:

Code: Select all

verdow@techcage-07 ~ $ ps aux | grep -v grep | grep cups
root      1748  0.0  0.1  76272  2376 ?        Ss   Jun28   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
verdow@techcage-07 ~ $ 
Most likely it's running, but something's up with it. I would run

Code: Select all

sudo /etc/init.d/cups restart
and see if that fixes it. For future reference the /etc/init.d/ scripts are usually the best method for starting and stopping services.

Lastly CUPS has a built in web interface that you might want to check out at http://127.0.0.1:631
If you can access the CUPS web interface, then CUPS is running.

altair4
Level 19
Level 19
Posts: 9763
Joined: Tue Feb 03, 2009 10:27 am

Re: CUPS server error

Post by altair4 » Wed Jul 07, 2010 11:21 am

For future reference the /etc/init.d/ scripts are usually the best method for starting and stopping services.
The only problem with that statement is that it's now become a moving target as upstart slowly replaces the standard way of starting services. Case in point is the old "samba" service.

First the "samba" service no longer exists. It's been replaced by it's original component daemons: smbd and nmbd

nmbd is in /etc/init.d, smbd is not.

The way you start samba since Ubuntu 10.04 ( Mint 9 ) is:

Code: Select all

sudo service smbd start
It's become even more confusing since "restart" doesn't mean the same thing it used to either. If a service was stopped you could either issue a "start" or a "restart" to start it. Now a "restart" on a stopped service results in an error message. You can only start it with a "start".

The whole thing's a mess.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

psg
Level 1
Level 1
Posts: 38
Joined: Sun Jan 10, 2010 5:37 pm
Location: Portugal

Re: CUPS server error

Post by psg » Wed Jul 07, 2010 6:06 pm

You are right altair4, I tried:

Code: Select all

sudo /etc/init.d/cups restart
and returned me Fail.

But with only Start it gave me:

Code: Select all

cupsd: Child exited on signal 15!
                                                                         [ OK ]
@RedWagon:

With

Code: Select all

ps aux | grep -v grep | grep cups
nothing happens :?

Concerning the http://127.0.0.1:631 I can't access almost anything, except the foruns and drivers. It means I don't have Cups running, right?

What else can I do?

altair4
Level 19
Level 19
Posts: 9763
Joined: Tue Feb 03, 2009 10:27 am

Re: CUPS server error

Post by altair4 » Thu Jul 08, 2010 6:46 am

I don't know if this fits all your symptoms but it appears there's a bug report for that:
https://bugs.launchpad.net/ubuntu/+sour ... bug/436148
This worked for me:
dereck@yakisoba:~$ sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
Since you're copying the default you will no doubt have to reinstall your printers.

You might want to make sure that /etc/cups/cupsd.conf is in fact either missing or empty first. No need to replace it if it isn't broke.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

psg
Level 1
Level 1
Posts: 38
Joined: Sun Jan 10, 2010 5:37 pm
Location: Portugal

Re: CUPS server error

Post by psg » Thu Jul 08, 2010 8:08 am

You were right altair4, I had the cupsd.conf empty.
Issued:

Code: Select all

 sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
sudo /etc/init.d/cups restart
and problem solved.

But still I wonder why cupsd.conf had gone empty?

Thank you all for the help. Once again Mint forum proved to have valuable members.

altair4
Level 19
Level 19
Posts: 9763
Joined: Tue Feb 03, 2009 10:27 am

Re: CUPS server error

Post by altair4 » Thu Jul 08, 2010 8:17 am

psg wrote:But still I wonder why cupsd.conf had gone empty?
That I do not know. If I read the bug report correctly it appeared that the contents of his /etc/fstab had somehow found it's way into cupsd.conf. So consider yourself lucky :)
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Locked

Return to “Software & Applications”