# HPLIP hp-setup cannot update cups files and crashes

## m27315

Hi,

I have a networked HP Photosmart C7280 AIO printer sitting on my LAN.  I am able to add the printer through the CUPS interface, and it works fine.  However, I cannot use the hp-setup program, which is required to make the device appear automatically in all the HP utilities (device manger, toolbox, etc.).

When I execute hp-setup, as root, the program finds my printer, if I manually point it to the correct IP.  I also have to manually identify the PPD, but it is correct.  I have verified that it's the same one used by the CUPS installation.  Everything seems to work ok, until I click "Add Printer".  Then I see an error pop-up box requesting that I restart CUPS, which I do; however, restarting CUPS and pressing "OK" only produces the error box again.  Finally, the program just dies.  Here's the verbose output:

```
$ hp-setup -ldebug

HP Linux Imaging and Printing System (ver. 3.9.4b)

Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP

This software comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to distribute it

under certain conditions. See COPYING file for more details.

hp-setup[10167]: debug: param=

hp-setup[10167]: debug: Starting GUI loop...

hp-setup[10167]: debug: Trying IP address 192.168.0.11

hp-setup[10167]: debug: Found: hp:/net/Photosmart_C7200_series?ip=192.168.0.11

hp-setup[10167]: debug: Cache miss: photosmart_c7200_series

hp-setup[10167]: debug: Reading file: /usr/share/hplip/data/models/models.dat

hp-setup[10167]: debug: Searching for section [photosmart_c7200_series] in file /usr/share/hplip/data/models/models.dat

hp-setup[10167]: debug: Found section [photosmart_c7200_series] in file /usr/share/hplip/data/models/models.dat

hp-setup[10167]: debug: Unable to open file installer/distros.dat for reading.

hp-setup[10167]: debug: []

hp-setup[10167]: debug: {}

hp-setup[10167]: debug: Photosmart_C7200

hp-setup[10167]: debug: (CUPS 1.2.x) Getting list of PPDs using CUPS_GET_PPDS...

hp-setup[10167]: debug: CUPS PPD base path = /usr/share/cups/model

hp-setup[10167]: debug: Foomatic PPD base path = /usr/share/ppd

hp-setup[10167]: debug: Matching PPD list to model photosmart_c7200_series...

hp-setup[10167]: debug: []

error: No PPD found for model photosmart_c7200_series. Trying old algorithm...

hp-setup[10167]: debug: 1st stage edit distance match

hp-setup[10167]: debug: Determining edit distance from photosmart_c7200 (only showing edit distances < 4)...

hp-setup[10167]: debug: Min. dist = 9223372036854775807

hp-setup[10167]: debug: {}

hp-setup[10167]: debug: []

error: No PPD found for model photosmart_c7200 using old algorithm.

hp-setup[10167]: debug: {}

hp-setup[10167]: debug: Searching for fax PPD for model photosmart_c7200_series

Found fax PPD: /usr/share/ppd/HP/HP-Fax-hplip.ppd.gz

hp-setup[10167]: debug: fax-type=1

hp-setup[10167]: debug: Device URI: hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11

hp-setup[10167]: debug: Printer: None

hp-setup[10167]: debug: URI: backend=hpfax, is_hp=True, bus=net, model=Photosmart_C7200_series, serial=, dev=, host=192.168.0.11, port=1

hp-setup[10167]: debug: Model/UI model: Photosmart_C7200_series/HP Photosmart c7200 Series

hp-setup[10167]: debug: Opening device: hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11 (not for printing)

hp-setup[10167]: debug: I/O mode=3

hp-setup[10167]: debug: device-id=1

hp-setup[10167]: debug: Opened device: hpfax (backend=hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11, is_hp=True, bus=net, model=Photosmart_C7200_series, dev=, serial=, host=192.168.0.11, port=1)

hp-setup[10167]: debug: Opening HP-MESSAGE channel...

hp-setup[10167]: debug: channel-id=1

hp-setup[10167]: debug: PML/SNMP GET 1.1.3.8 (result code = 0x0) returned:

hp-setup[10167]: debug: 0010:  00 00 00 00 00 00 00                             .......

hp-setup[10167]: debug: PML/SNMP GET 1.1.3.9 (result code = 0x0) returned:

hp-setup[10167]: debug: 0020:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

hp-setup[10167]: debug: 0030:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

hp-setup[10167]: debug: 0040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00        ..............

hp-setup[10167]: debug: Closing device...

hp-setup[10167]: debug: Closing HP-MESSAGE channel...

hp-setup[10167]: debug: Result-code = 0

error: No appropriate print PPD file found for model photosmart_c7200_series

hp-setup[10167]: debug: addPrinter('Photosmart_C7200', 'hp:/net/Photosmart_C7200_series?ip=192.168.0.11', '', '/usr/share/ppd/HP/hp-photosmart_c7200_series-hpijs.ppd.gz', '', 'HP Photosmart c7200 Series hpijs, 3.9.4b.10')

hp-setup[10167]: debug: addPrinter() returned (1, client-error-bad-request)

hp-setup[10167]: debug: {}

error:  Printer queue setup failed.  Please restart CUPS and try again.

hp-setup[10167]: debug: addPrinter('Photosmart_C7200_fax', 'hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11', '', '/usr/share/ppd/HP/HP-Fax-hplip.ppd.gz', '', '')

hp-setup[10167]: debug: addPrinter() returned (1, client-error-bad-request)

hp-setup[10167]: debug: {}

error:  Fax queue setup failed.  Please restart CUPS and try again.

hp-setup[10167]: debug: fax-type=1

hp-setup[10167]: debug: Device URI: hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11

hp-setup[10167]: debug: Printer: None

hp-setup[10167]: debug: URI: backend=hpfax, is_hp=True, bus=net, model=Photosmart_C7200_series, serial=, dev=, host=192.168.0.11, port=1

hp-setup[10167]: debug: Model/UI model: Photosmart_C7200_series/HP Photosmart c7200 Series

hp-setup[10167]: debug: Opening device: hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11 (not for printing)

hp-setup[10167]: debug: I/O mode=3

hp-setup[10167]: debug: device-id=1

hp-setup[10167]: debug: Opened device: hpfax (backend=hpfax:/net/Photosmart_C7200_series?ip=192.168.0.11, is_hp=True, bus=net, model=Photosmart_C7200_series, dev=, serial=, host=192.168.0.11, port=1)

hp-setup[10167]: debug: Opening HP-MESSAGE channel...

hp-setup[10167]: debug: channel-id=1

hp-setup[10167]: debug: PML/SNMP SET 1.1.3.9 (result code = 0x0) to:

hp-setup[10167]: debug: PML/SNMP SET 1.1.3.8 (result code = 0x0) to:

hp-setup[10167]: debug: Closing device...

hp-setup[10167]: debug: Closing HP-MESSAGE channel...

hp-setup[10167]: debug: Result-code = 0

Done.
```

Any guesses?  Unfortunately, the error message is not helpful. ... I would really like to use hp-setup, so I can use the other hp tools.

I am using the latest (~amd64) version of hplip:

```
[ebuild   R   ] net-print/hplip-3.9.4b  USE="cupsddk dbus fax gtk ppds qt4 scanner snmp -doc -minimal -parport -policykit -qt3" 0 kB
```

BTW, root is member of "lpadmin" and "lp" groups and has access to the cups files:

```
$ lt /etc/cups/*

-rw-rw---- 1 root lp    188 2008-07-14 10:42:01.000000000 -0500 /etc/cups/snmp.conf

-rw-r----- 1 root lp   2582 2008-12-09 13:42:49.000000000 -0600 /etc/cups/cupsd.conf

-rw-rw-r-- 1 root root 8894 2009-03-31 12:42:05.000000000 -0500 /etc/cups/cups-pdf.conf

-rw-rw-r-- 1 root root 6298 2009-04-27 09:33:14.000000000 -0500 /etc/cups/mime.types

-rw-rw-r-- 1 root root 4529 2009-04-27 09:33:14.000000000 -0500 /etc/cups/mime.convs

-rw-rw---- 1 root lp   2473 2009-04-27 09:33:14.000000000 -0500 /etc/cups/cupsd.conf.default

-rw-rw-r-- 1 root root   85 2009-04-27 10:33:00.000000000 -0500 /etc/cups/client.conf

-rw-rw-r-- 1 root root  946 2009-05-09 15:57:16.000000000 -0500 /etc/cups/pstoraster.convs

-rw-rw-r-- 1 root root 1339 2009-05-09 15:57:16.000000000 -0500 /etc/cups/pdftoraster.convs

-rw-rw---- 1 root lp     83 2009-06-18 16:38:32.000000000 -0500 /etc/cups/classes.conf.O

-rw-rw---- 1 root lp    667 2009-06-18 17:01:16.000000000 -0500 /etc/cups/printers.conf.O

-rw------- 1 root lp     83 2009-06-18 17:02:24.000000000 -0500 /etc/cups/classes.conf

-rw------- 1 root lp    396 2009-06-18 17:06:05.000000000 -0500 /etc/cups/printers.conf

/etc/cups/interfaces:

total 8

drwxrwxr-x 2 root lp 4096 2008-04-04 18:02:14.000000000 -0500 .

drwxr-xr-x 5 root lp 4096 2009-06-18 17:06:39.000000000 -0500 ..

/etc/cups/ssl:

total 8

-rw-rw-r-- 1 root root    0 2009-04-27 09:33:16.000000000 -0500 .keep_net-print_cups-0

drwx------ 2 root lp   4096 2009-04-27 09:33:20.000000000 -0500 .

drwxr-xr-x 5 root lp   4096 2009-06-18 17:06:39.000000000 -0500 ..

/etc/cups/ppd:

total 32

-rw-rw-r-- 1 root root 23836 2009-06-18 17:01:16.000000000 -0500 HP_C7280_AIO.ppd

drwxr-xr-x 5 root lp    4096 2009-06-18 17:06:39.000000000 -0500 ..

drwxr-xr-x 2 root lp    4096 2009-06-18 17:27:27.000000000 -0500 .
```

Thanks!

----------

