Click to See Complete Forum and Search --> : Reinstalling CUPS and forcing cupsd.conf to recreate
TronCarter
07-13-2006, 12:55 PM
I am not sure that this is in the right forum, but here goes. I have been having trouble getting CUPS to work properly on my Debian box. I made the mistake of deleting the /etc/cups directory when I removed the installation, and now I can't reinstall because I get the following error:
chown: cannot access `/etc/cups/cupsd.conf': No such file or directory
dpkg: error processing cupsys (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
cupsys
E: Sub-process /usr/bin/dpkg returned an error code (1)
How do I force the install to recreate the cupsd.conf file?
je_fro
07-13-2006, 09:23 PM
Does the /etc/cups directory exist? Does that file exist? Do you need to apt-get cups again?
TronCarter
07-17-2006, 10:06 AM
I think I am past that part. I ended up installing everything on a system running the same install of Debian, then copied the cups.config file over. The next problem I encounter is this in the error log:
E [17/Jul/2006:08:38:06 -0400] Unable to bind socket for address 127.0.0.1:631 - Address already in use.
E [17/Jul/2006:08:38:06 -0400] cupsdStartBrowsing: Unable to bind broadcast socket - Address already in use.
The only thing I could find on this error suggested to run a netstat, but didn't offer much advice past that. I don't know what I am looking for in it, and it is too large to post here.
crow2icedearth
07-18-2006, 08:15 PM
I am not sure that this is in the right forum, but here goes. I have been having trouble getting CUPS to work properly on my Debian box
read my thred if you have problems getting IPP to work. :) good luck. i struggled with cups for a few weeks do to bad /etc/cups/printer.conf entry. good luck
TronCarter
07-19-2006, 08:27 AM
I seem to have progressed a little further. I finally found the thread that crow was talking about and didn't see anything that addressed my current problem. I ended up doing a "top" command and found that there were 4 different cupsd listings. I killed them all and then restarted cups. It seemed to start fine with no errors reported at the command line. Next I checked /var/log/cups/error_log and it also had no new errors listed. However, now I am at my next point of failure. I tried http://localhost:631/ in a browser and get nothing, after a while it times out with a 404 error. Next I tried lpstat-a from a command line and it just freezes, and doesn't return anything or even return to the command prompt. Next I checked top again and found that cupsd is running at 99% processor and .1% memory. I killed it again, started cupsd again from the command line, check top and it again reports 99% processor and .1% memory. I wouldn't imagine that simply running cupsd without even trying to use it for anything would cause it to run at 99%. I don't know what to look at next since no errors are being reported in /var/log/cups/error_log. Does anyone know where to look next?
je_fro
07-19-2006, 11:14 AM
can you try to "apt-get remove cups1 cups2 cups3..." and then reinstall them?
cupsX being the programs you've installed thus far...
TronCarter
07-19-2006, 11:58 AM
I have also tried that and get the same result. I have also tried doing that with the Synaptec Package Manager and get the same result.
je_fro
07-19-2006, 03:20 PM
So do you still not have an /etc/cups directory? What if you make one? (mkdir /etc/cups)
TronCarter
07-19-2006, 05:49 PM
Yes, I have an /etc/cups directory. Are there special permissions that need to be assigned to it?
je_fro
07-19-2006, 07:17 PM
$ ls -ld /etc/cups
drwxrwxr-x 5 root lp 408 Jul 3 17:52 /etc/cups
TronCarter
07-20-2006, 09:43 AM
Mine says:
drwxr-sr-t 6 root lp 4096 2006-07-20 09:07 /etc/cups
So, I think that means I need to:
chmod 775 /etc/cups
Is that correct?
TronCarter
07-20-2006, 10:09 AM
I went ahead and did:
$ chmod 775 /etc/cups/
then:
$ ls -ld /etc/cups
drwxrwxr-x 6 root lp 4096 2006-07-20 09:59 /etc/cups
Then I did:
apt-get remove cupsys cupsys-client cupsys-bsd
apt-get clean
apt-get autoclean
apt-get update
apt-get install cupsys cupsys-client cupsys-bsd
Next I checked top which again showed cupsd at 99.9% CPU
I next did:
$ ls -ld /etc/cups
drwxr-sr-t 6 root lp 4096 2006-07-20 09:59 /etc/cups
so it reverted back to the original directory permissions, so I killed the cupsd process and:
$ chmod 775 /etc/cups/
$ cupsd
$ top
which again showed a new cupsd, again at 99.9% CPU, so I:
$ ls -ld /etc/cups
drwxr-sr-t 6 root lp 4096 2006-07-20 09:59 /etc/cups
So it appears that simply running cupsd changes the permissions of /etc/cups/.
So, I'm still stuck.