Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: athouston on June 23, 2013, 06:34:04 AM

Title: (Solved) Re: Cups can't access admin screen
Post by: athouston on June 23, 2013, 06:34:04 AM
I have downloaded cups.tcz and followed the install / setup instructions. I have created the client.conf file and "cups status" reports cups is running.

I cannot browse to http:/localhost:631/admin. Firefox give a page not available error.

I rebooted after installing and creating the conf file. I have used both "ServerName 127.0.0.1" and ServerName 192.168.0.22" in different versions of the conf file without success.

Can anyone suggest possible things I've done wrong please?
Title: Re: Cups can't access admin screen
Post by: Juanito on June 23, 2013, 07:24:32 AM
client.conf is for using libcups stand-alone (as from cups-1.6.x)

cupsd.conf is for using the full version of the cups server/cups client install
Title: Re: Cups can't access admin screen
Post by: athouston on June 23, 2013, 06:16:06 PM
Thanks. I was just working off the instructions on the apps download page. This probably needs updating.

Cheers.
Title: Re: (Solved) Re: Cups can't access admin screen
Post by: aus9 on June 24, 2013, 03:27:11 AM
athouston

Juanito commented on bloat of new cups at the other thread for man page.

Yes this was predicted by me. If you feel the same way, I have kept old cups but need permission from you specifically to pm you a down load link. Forum rules forbid me to do it in the open forum ok?

2) It is unclear to me why you marked this as solved if you are still posting?
Can you do me a favour and "unsolve" this thread. As I have replied, it now appears in my reply posts so your replies will be seen by both Juanito and myself.....altho Juanito is very busy working on something so I have no idea where he gets his spare time.

3)
Quote
The installation notes on cups.tcz says to put a ServerName entry in client.conf

No it does no such thing! It says "Some network users may need to create" meaning not all and unlikely anyone on USB

4) Describe your equipment pls, make mode and exactly how is it connecting please?
b) Have you checked the links to discover which package you need for a PPD?

I suggest you remove any of your files from persistence, reboot and start again please.

Now you have both Juanito (the good guy) and me (the bad guy) so you will print or I will come around your house and give you free beer....only joking....beer is bad for you  :P

5) When cups daemon is running correctly, yes I know it not for you, the web browser will take you to a help page if you click on it.
That is a design feature of most versions of cups.

6)
Quote
I was just working off the instructions on the apps download page. This probably needs updating

Fair comment. I am not perfect. Most distros suffer various levels of doc failure, but if you get to the localhost page, all will be revealed.
(http://oi42.tinypic.com/2wnustw.jpg)

good luck
Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 04:37:31 AM
Yes my bad. Can you cut and paste the two threads together or whatever.

I picked cups because it lists both my printers in its configs so that's a good start.

See my comments in the other thread (following from your suggestions.

Cheers.
Title: Re: Cups can't access admin screen
Post by: aus9 on June 24, 2013, 04:50:39 AM
No please.

Post here, this is the correct page.

Lets get one printer working first.

What is it or do I have ask again question (4) and (4b)

Do not  edit any configs until we both know why you need to do it.

We need to get the daemon working and confirm it working as well.

I won't offer any more advice until its clear you agree to follow simple rules so we can troubleshoot together.

I have no problem others offering advice but we NOT mind readers. we need facts and a plan that you follow.

When I ask questions I expect you to answer them or say why you can't or how to tell etc?
I am aussie so thick skinned so nothing you say here is going to hurt my remaining 6 brain cells ok

Can you see my logic?
Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 08:07:54 PM
Man not working (Solved) as suggested).

Current status is...

Brand new clean x86 4.7.7. install
Download OnBoot cups.tcz, alc.ycz, net-tools.tcz.
TCE=/mnt/sda1
Reboot
cups status says cups is running
netstat shows no IP process running, unable to browse to http://localhost:631/admin
Edit cupsd.conf.default to add ServerName 192.168.0.22 and Port number 631
Execute sudo cups start
netstat shows cups IP process running on port 631, now can browse to http://localhost:631/admin
Reboot, now back to not working. Previous entries in cupsd.conf.default no longer present.


Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 08:16:12 PM
As to the equipment side of things..

IBM Thinkcentre PC, Pentium 4 processor, 4GB RAM.

"Hard Drive" is 16GB 30x CF Card on an IDE adapter plugged direct into IDE port on motherboard.

Network is hard wired Gigabit.

I have checked the files needed as per another suggestion  and found that libacl.so.1 seemed to be missing, thats why I installed acl.tcz (not alc.tcz as poted below).

Title: Re: Cups can't access admin screen
Post by: Juanito on June 24, 2013, 08:19:38 PM
Reboot, now back to not working. Previous entries in cupsd.conf.default no longer present.

Take a look at the cups info file and the wiki section on back-up and/or persistence

cupsd.conf will not persist across boots unless you add it to your back-up
Title: Re: Cups can't access admin screen
Post by: Rich on June 24, 2013, 08:21:59 PM
Hi athouston
Quote
Previous entries in cupsd.conf.default no longer present.
When you make changes to  .conf  files for extensions you need to add them to your backup if you want those changes
to persist.
Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 08:42:30 PM
Thanks both.

What is the TCL equivalent to the MS-DOS dir /s command to search for a file in all sub-directories please.

I don't know where filetool.lst lives but it would be more useful if I new how to find it myself.

Cheers.
Title: Re: Cups can't access admin screen
Post by: aus9 on June 24, 2013, 08:49:23 PM
athouston

1) Any chance you can actually name one printer make and model
How exactly is this connected or whatever.

I am guessing you have a wireless or cable connection from printer to a router?
I am guessing hard wired means ethernet cable to router?

In which case, you have a local host.

In which case do not ....do not edit to listen to Port 631.....which weakens your security when

try  (EDIT)
Listen 192.168.0.22:631 

but its not clear to me if you have set up a static address for the printer.

details please?

2) If you can do me a favour, and show
Code: [Select]
ls /usr/local/tc.installed
you must have all dependencies of cups and its not clear to me ---that you have it by using ondemand

I don't use ondemand.

I prefer you try
Code: [Select]
tce-load -i cupsand post the results pls

you need to have all dependencies downloaded and installed for cups to work properly
Quote
cups.tcz
   acl.tcz
      libattr.tcz
   dbus.tcz
      expat2.tcz
   libavahi.tcz
      gtk2.tcz
         atk.tcz
            glib2.tcz
               libffi.tcz
            libffi.tcz
         cairo.tcz
            pixman.tcz
            fontconfig.tcz
               expat2.tcz
         pango.tcz
            glib2.tcz
               libffi.tcz
            Xorg-7.6-lib.tcz
            libxcb.tcz
         gdk-pixbuf2.tcz
            glib2.tcz
               libffi.tcz
            graphics-libs-1.tcz
         shared-mime-info.tcz
            glib2.tcz
               libffi.tcz
            libxml2.tcz
               liblzma.tcz
         Xlibs.tcz
      dbus.tcz
         expat2.tcz
      gcc_libs.tcz
   libcups.tcz
      cups-filters.tcz
         libcups-filters.tcz
   libpaper.tcz
   Linux-PAM.tcz
      cracklib.tcz
      bsddb.tcz
   openssl-1.0.0.tcz
   qpdf.tcz

3) busybox has netstat ....so if you like netstat try the busybox version?

4)
Code: [Select]
sudo find / -name .filetool.lst
/opt is where to look ,but note its dot filetool.lst

Title: Re: Cups can't access admin screen
Post by: aus9 on June 24, 2013, 09:08:48 PM
can I mention, in case you are new to Tiny Core or Linux in general that

unless you do printing on a regular basis, do not add cups to your onboot.lst

I create my root password first.....as per info and I back this up,
the root password is only required when you want to edit root owned files and that is all of the files for cups
---including adding a printer ok?

The other files you backup, means when you want to print say next week, you load cups, start the cups daemon
(I think it might be called service in MS)
and you can print because you are not editting the config files.

I hope that makes sense?
Title: Re: Cups can't access admin screen
Post by: aus9 on June 24, 2013, 09:14:33 PM
 have editted the previous post above for the listen section, I won't edit that again in case you are reading it.
but for my wireless HP wireless to router, ethernet cable to desktop tower my config is
Quote
Listen 192.168.1.200:9100

and not :631, there are in fact even more funnies like that. That is why we need to know how you connect and make and model ok?
Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 09:23:41 PM
Item 4. beaut, thanks. (teach a man to fish, etc..).

Item 1. I have not got to the stage of trying to actually install a printer because I haven't been able to get to an interface.

My Printer is a Kyocera FS-1118MFP which is in the list of supported printers on the cups sourceforge website. It is hardwired to a Gigabit switch and the entire network attaches to the internet through a firewall router. I am not at all concerned with any security aspects of using port 631 internally. The cupsd.conf.default file has an entry for listen localhost:631 already. I have many other devices connected to the internal network as well.

The print server I am seting up is the TCL install I am currently working on and its IP is 192.168.0.22. The printer is static at 192.168.0.24. Localhost is therefore 192.168.0.22.

Item 2. List of tce.installed is attached.

tce-load -i cups returns "cups is already installed".

Appsbrowser depencencies check does not disclose any missing.

It seems to me that the bit I have been missing is the need to add the cupsd.conf file to my backup, because when I add the localhost setting to this, I can browse to the admin screen.

I will now try that and see how it goes from there.

I am new to TinyCore (and loving it) and less so to Linux; although I am seriously familiar with the other operating system (I have the source code to MS-Dos 86 somewhere around here). The comments about printing makes sense. This box is to be my "daily driver" and I will be printing often so for my installation loading OnBoot makes sense.

I like the idea of changing the listem port to 9100 in the cupsd.conf file (because, yes, one less open port is always good even if I am confident with my current security).

You mention backing up the root password. That's a new concept to me.


Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 09:57:10 PM
I edited cupsd.conf to change listen to 9100 and added ServerName 192.168.0.22.

I added cupsd.conf to my backup inclusion list and verifed thatit worked.

Running sudo cups start allows me to browse the admin screen (It requires the sudo).

After I reboot I cannot browse the admin screen.

Cups start reports it is running but it does not show in netstat. Executingsudo cups start makes it all work again.

I double checked cupsd.conf and it is correct.
Title: Re: Cups can't access admin screen
Post by: athouston on June 24, 2013, 11:00:42 PM
If the fact that the admin screen is not imemdiately available after boot does not stop the print functions then I am happy to live with this issue now that I can access the admin screen "manually".

However: when I try and do anything in the admin screen I get an error "Request Entity Too Large". Is this related or should I open a new thread.

Thanks.
Title: Re: Cups can't access admin screen
Post by: athouston on June 25, 2013, 12:49:30 AM
Web search suggests it is not related but an access problem.

I'll start a new thread for this.
Title: Re: Cups can't access admin screen
Post by: tinypoodle on June 25, 2013, 02:27:32 AM
What is the TCL equivalent to the MS-DOS dir /s command to search for a file in all sub-directories please.

Code: [Select]
ls -R
Title: Re: Cups can't access admin screen
Post by: athouston on June 25, 2013, 03:01:28 AM
Thanks TP.
Title: Re: Cups can't access admin screen
Post by: aus9 on June 25, 2013, 05:17:48 AM
Quote
I have not got to the stage of trying to actually install a printer because I haven't been able to get to an interface.
It might have helped if you had explained how your printer was connecting before?

I hope you trust me when I say, from a trouble shooting point of view, we first need to get your printer working
then and ony then do we look at how much persistence you want.
---you have already advised you print often so we will give you the works later.

Ok so you advise you have a static ip so the listen section changes but I am still unsure what you mean by hard wired?

1) ethernet cable to device, usb lead to device?
b) Do users print from the internet to this device? Or only local network users?

It looks like its similar to HP so I suggest your config becomes
Quote
Listen 192.168.0.24:9100

Juanito is more of an expert than me, but I assure you, I have a hp connected to a router with a static address and assuming
 Kyocera use 9100 we hope we get you to your interface.

2) do not use a /usr/local/etc/cups/client.conf unless you can't get to it.
I repeat you have a local address, if you listen to Port 631 you are listening to all ports including the net.

good luck
Title: Re: Cups can't access admin screen
Post by: aus9 on June 25, 2013, 05:42:32 AM
ok umm lets start persistence, we will finish the /usr/local/etc/cups/ppd /usr/local/etc/cups/printers.conf only when we get an admin screen and we can only edit that admin area with root powers.

I am assuming you will print often as per reply.

1) do the root password and add the file to your backup as per info file
2) you need a PPD which will come from gutenprint and you need cups
so download gutenprint and then start apps and use the list to show the following, in addition to any other onboot stuff
Quote
cups
gutenprint

A graphical way is open the apps -> maintenance  -> onboot maintenance

If you accidently puts cups or dbus into ondemand please remove back to left pane ok then click into onboot and select them into right hand pane
3) Now to add persistence to 2 daemons only because you print often

edit bootlocal.sh and add the following
Quote
/usr/local/etc/init.d/dbus start
/bin/sleep 3
/usr/local/etc/init.d/cups start

That sleep of 3 seconds assumes a longer boot up of 3 seconds but might stop the cups from failing.

now reboot, forget about the web page and report what you see for the following commands pls

Code: [Select]
ls /usr/local/tce.installed/ | grep cups
ls /usr/local/tce.installed/ | grep dbus
/usr/local/etc/init.d/dbus status
/usr/local/etc/init.d/cups status

if daemons are not falling over, then its the quality of the cups.d file to get you to the web interface

good luck

PS could you do a favour and not have any internet conf file so we are truly testing local only
ie remove /usr/local/etc/cups/client.conf if you have one from persistence and reboot etc
Title: Re: Cups can't access admin screen
Post by: athouston on June 25, 2013, 07:47:09 AM
Hi AUS9,

Thanks again.

from the top...

my tinycore workstation (192.168.0.22 dhcp) is connected direct to a gigabit switch by an ethernet cable.
my Kyocera FS1118mfp printer (192.168.0.24 static) is connected direct to the same gigabit switch by an ethernet cable and it uses 9100.
my internet firewall / router / modem (192.168.0.253 static) connects direct to this same gigabit switch by an ethernet cable.

All users on the internal network print from various applications, including web pages, to this network.
No-one outside of the internal network can print to the printer.

I have changed cupsd.conf to reflect listen 192.168.0.22:9100 and saved it.

I do not have a client.conf file.

usr/local/etc/cups/cupsd.conf is in the included files list of backup and I have tested this successfully.



Title: Re: Cups can't access admin screen
Post by: athouston on June 25, 2013, 08:31:39 AM
I download onboot gutenprint and confirm it and cups are both onboot.

The grep commands you list report -
cups
cups-filters
libcups
libcups-filters
dbus
dbus is running
cups is running

Changing the listen entry to listen 192.168.0.22:9100 did not work. I changed it back to listen localhost:9100 and I can now open the admin screen.

I have added my printer and all is now well... I can print.

The last thing to fix then is how do I make the new root password persistent please.
Title: Re: Cups can't access admin screen
Post by: aus9 on June 25, 2013, 08:57:41 AM
good I won't ask you why did not like my suggestion earlier to use the actual static address, I promise I won't ask :D

Persistence part two
Okey dokey

Since we know a lot of people are printing here, it does make sense to have full persistence.

as per info file, add the following to your filetool.lst---we drop the first /
Quote
usr/local/etc/cups/ppd/
usr/local/etc/cups/printers.conf
usr/local/etc/cups/cupsd.conf
etc/shadow

the order is not important, on reboot check the files exist pls

(b) When and if you decide to add your second printer, as I don't know what it is....(grins like a sheep) I may assume gutenprint or hplip-2.7 might supply the PPD for you.
---If you need the hplip-2.7 remember to add it as "onboot" download.

Although they supply a PPD.....they also supply a filter.....which is kind of the in between software to convert what you see on the screen into some kind of language understood by printers.

and then because you are adding a printer, you need the root password

it does not have to be the same password....but I am lazy and do keep the same one.

forgive me for sucking eggs.....choose an acronym style
Pretend you like a movie line
Give the Bag to Bozo....become GtBtB  add some sqiuggles especially $ symbol and the like, add some numbers

test it works before saving
Code: [Select]
sudo passwd
<new passwd> (repeat)
su tc
su
(test new password takes you to root)

#####
if you do add a second printer usr/local/etc/cups/ppd/ is a folder and on reboot you will see 2 PPDs so no action by you.
--This setting was first started by Juanito is smarter than me.

some people may not like you keeping the same password....so every so often you can change it, the backup system remember the files.

good luck
Title: Re: Cups can't access admin screen
Post by: athouston on June 25, 2013, 07:26:07 PM
AUS9 (and everyone else), Thanks heaps. I now have a working printing system.

I did like your static address option and tried it, but without success. The actual IP address you suggested (192.168.0.24:9100) is the address of my printer and I took you literally and used that, but it did not work. I then considered that you were only using that as an example so I replaced it with my TC workstation address (192.168.0.22:9100) but again this did not work. I replaced this with localhost:9100 and all is well.

I have a Brother laser and a DELL colour laser to add. I checked the PPD's list and the Brother is supported but I haven't checked the DELL yet; but I'll have to let you leave me something to do.

 ;D ;D ;D :P ;D
Title: Re: (Solved) Re: Cups can't access admin screen
Post by: aus9 on June 25, 2013, 07:41:42 PM
no worries.

Now with my hp setup us as a wireless with a static address, I can get into its config panel thru a browser pointing to
http://192.168.1.200/

my static address.

Maybe, you could try yours, when you get a chance, 192.168.0.24

It would be handy to know if you have got in before on another OS or distro.

What I did was to set up my static outside my router's DHCP range of ips. But I am not an expert.

I also at one stage set up a MAC filter to lock my mac to an ip. I am wondering if .22 is your start range if some one has grabbed .24 because it might be in your DHCP range?
Title: Re: (Solved) Re: Cups can't access admin screen
Post by: athouston on June 26, 2013, 12:04:21 AM
I did try the static addresses of 192.168.0.24 (my printer) and 192.68.0.22 (this TC workstation - the one we are working this problem on) but to no avail. Both caused it to stop working. I don't have another distro to try, my iMac is in for a replacement hard drive (Apple recall - back tomorrow they tell me) and the other machines are all Windows based workstations or servers.

My printer address is static and specifically excluded from distribution in my DHCP server. Therefore no-one else can grab it. If they did somehow do that I would see an address conflict error and both they, and the printer, would stop working; none of which happened. My workstation is dynamic but the same argument holds true. I have also physically checked all other devices to make sure.

Your idea of setting your printer static address outside your DHCP range is the "normal" way to do it. You would setup a DHCP range of (say) 192.168.0.33 to 192.168.0.240, allocating the bottom 32 as static entries for servers, NAS, printers, etc and the top 15 as static for routers, comm's etc.

Your idea of locking your iMac IP address to a MAC address is also valid. You would usually use this technique when setting up printers on the network so that a printer gets a dynamically assigned static address (excuse the recursive argument). This saves you having to physically manage static IP addresses on devices that change more often. This is also very handy when setting up printers for 40 stores in remote locations connected over a VPN.

Please excuse me if this sounds like a tutorial - networking is my area of expertise.

Since we last "spoke" I have successfully also setup flashplayer  and sound support so I can play youtube video's. I'm getting there.

Be well and thanks again for all your help.