[solved] Error with opsi-product-updater -i -vv

Antworten
Fochlac
Beiträge: 4
Registriert: 19 Dez 2013, 18:23

[solved] Error with opsi-product-updater -i -vv

Beitrag von Fochlac »

Hello,

I have been trying to set up an Opsi-Server on a Cent-OS 6 Server. When I tried to install the basic packages using the command "opsi-product-updater -i -vv" I encountered the following error during the package installation:

Code: Alles auswählen

Installing package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi'
=================================================================================================
Installing package file '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi' on depot 'opsi04.*******.de'
Getting meta data from package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi'
Creating product in backend
Locking product 'config-win-base' on depot 'opsi04.*******.de'
Checking package dependencies
Running preinst script
Running package script 'preinst'
Unpacking package files
Extracting data from package '/var/lib/opsi/repository/config-win-base_4.0.1-1.opsi'
Setting product property states in backend
Running postinst script
Running package script 'postinst'
Creating package content file
Setting access rights of client-data files
Unlocking product 'config-win-base_4.0.1-1' on depot 'opsi04.*******.de'
Traceback:
     line 1073 in '<module>' in file '/usr/bin/opsi-product-updater'
     line 1067 in 'main' in file '/usr/bin/opsi-product-updater'
     line 574 in 'processUpdates' in file '/usr/bin/opsi-product-updater'
     ==>>> Product 'config-win-base' not found on depot 'dhcp06.*******.de' after installation
ERROR: Product 'config-win-base' not found on depot 'dhcp06.*******.de' after installation
(detailed log here)

As I did not set up our dhcp as depot I am somewhat stupified why it appeared here. Checking /var/lib/opsi/config/depots/ I found an .ini for the dhcp-server as well and after reading in the forum, that I can remove the depot by just deleting that file, I backed it up and removed it. After a setting the config/rights and a reboot Opsi was working again, however, the error persisted.
I find especially the mix up of the Opsi-server and the DHCP peculiar. From the log I conclude that the in file.py the depot.id is set to dhcp06.*******.de. Nevertheless the package is extracted and run on the Opsi-server and finally the program tries to check on the DHCP whether the package was installed.

I guess that the DHCP-server has to be mentioned somewhere in the settings, however I am unable to find any mention of it in the config files. In /var/lib/opsi/config/config.ini the Opsi-server is set as the only depot.

I have no idea left what to change to fix this, or to pervent the error from happening again should I choose to reinstall the server and would be very thankful for advice.

Kind regards,
Florian

Command Log:

Code: Alles auswählen

service network restart
getent hosts $(hostname -f)
yum install mysql-server
yum install samba
yum install xinetd
/etc/init.d/mysqld start
mysql_secure_installation
/etc/init.d/smb start
/etc/init.d/nmb start
/etc/init.d/xinetd start
chkconfig smb on
chkconfig nmb on
chkconfig mysqld on
chkconfig xinetd on
vi /etc/yum.repos.d/opsi§0.repo
yum makecache
yum install p§zip p§zip-plugins cabextract
yum install opsi-depotserver opsi-configed
/etc/init.d/opsiconfd restart
/etc/init.d/opsipxeconfd restart
opsi-setup --auto-configure-samba
chkconfig opsiconfd on
chkconfig opsipxeconfd on
/etc/init.d/smb restart
/etc/init.d/nmb restart
opsi-setup --configure-mysql
opsi-admin -d task setPcpatchPassword
yum install java
vi /etc/opsi/backends/hostcontrol.conf
vi /etc/opsi/opsiconfd.conf
opsi-product-updater -i -vv
config.ini

Code: Alles auswählen

[clientconfig.configserver.url]
defaultvalues = ["https://***.******.103:4447/rpc"]
description = URL(s) of opsi config service(s) to use
editable = true
multivalue = true
possiblevalues = ["https://***.***.***.103:4447/rpc"]
type = UnicodeConfig

[clientconfig.depot.drive]
defaultvalues = ["p:"]
description = Drive letter for depot share
editable = false
multivalue = false
possiblevalues = ["c:", "d:", "e:", "f:", "g:", "h:", "i:", "j:", "k:", "l:", "m:", "n:", "o:", "p:", "q:", "r:", "s:", "t:", "u:", "v:", "w:", "x:", "y:", "z:"]
type = UnicodeConfig

[clientconfig.depot.dynamic]
defaultvalues = [false]
description = Use dynamic depot selection
editable = false
multivalue = false
possiblevalues = [false, true]
type = BoolConfig

[clientconfig.depot.id]
defaultvalues = ["opsi04.********.de"]
description = ID of the opsi depot to use
editable = true
multivalue = false
possiblevalues = ["opsi04.********.de"]
type = UnicodeConfig

[clientconfig.depot.protocol]
defaultvalues = ["cifs"]
description = Protocol for file transfer
editable = false
multivalue = false
possiblevalues = ["cifs", "webdav"]
type = UnicodeConfig

[clientconfig.windows.domain]
defaultvalues = ["MYGROUP"]
description = Windows domain
editable = true
multivalue = false
possiblevalues = ["MYGROUP"]
type = UnicodeConfig

[configed.host_displayfields]
defaultvalues = ["clientConnected", "clientDescription", "clientIPAddress", "clientLastSeen", "clientName"]
description = 
editable = false
multivalue = true
possiblevalues = ["clientConnected", "clientCreated", "clientDescription", "clientHardwareAddress", "clientIPAddress", "clientInventoryNumber", "clientLastSeen", "clientName", "clientSessionInfo"]
type = UnicodeConfig

[configed.license_inventory_extradisplayfields]
defaultvalues = []
description = Zusatzspalten zur Host-Beschreibung\nin der Tabelle "Abgleich mit Inventarisierung"\nBitte nach Änderungen configed neu starten
editable = false
multivalue = true
possiblevalues = ["description", "inventoryNumber", "ipAddress", "lastSeen", "notes"]
type = UnicodeConfig

[configed.productonclient_displayfields_localboot]
defaultvalues = ["actionRequest", "installationInfo", "installationStatus", "productId", "versionInfo"]
description = 
editable = false
multivalue = true
possiblevalues = ["actionRequest", "installationInfo", "installationStatus", "position", "priority", "productId", "productName", "stateChange", "targetConfiguration", "versionInfo"]
type = UnicodeConfig

[configed.productonclient_displayfields_netboot]
defaultvalues = ["actionRequest", "installationInfo", "installationStatus", "productId", "versionInfo"]
description = 
editable = false
multivalue = true
possiblevalues = ["actionRequest", "installationInfo", "installationStatus", "position", "priority", "productId", "productName", "stateChange", "targetConfiguration", "versionInfo"]
type = UnicodeConfig

[configed.remote_control.ping_linux]
defaultvalues = ["xterm +hold -e ping %host%"]
description = ping, started in a Linux environment
editable = true
multivalue = false
possiblevalues = ["xterm +hold -e ping %host%"]
type = UnicodeConfig

[configed.remote_control.ping_linux.description]
defaultvalues = ["ping, started in a Linux environment"]
description = 
editable = true
multivalue = false
possiblevalues = ["ping, started in a Linux environment"]
type = UnicodeConfig

[configed.remote_control.ping_linux.editable]
defaultvalues = [true]
description = (command may be edited)
editable = false
multivalue = false
possiblevalues = [false, true]
type = BoolConfig

[configed.remote_control.ping_windows]
defaultvalues = ["cmd.exe /c start ping %host%"]
description = ping, started in a Windows terminal
editable = true
multivalue = false
possiblevalues = ["cmd.exe /c start ping %host%"]
type = UnicodeConfig

[configed.remote_control.ping_windows.description]
defaultvalues = ["ping, started in a Windows terminal"]
description = 
editable = true
multivalue = false
possiblevalues = ["ping, started in a Windows terminal"]
type = UnicodeConfig

[configed.remote_control.ping_windows.editable]
defaultvalues = [true]
description = (command may be edited)
editable = false
multivalue = false
possiblevalues = [false, true]
type = BoolConfig

[license-management.use]
defaultvalues = [false]
description = Activate license management
editable = false
multivalue = false
possiblevalues = [false, true]
type = BoolConfig

[opsi-linux-bootimage.append]
defaultvalues = []
description = Extra options to append to kernel command line
editable = true
multivalue = true
possiblevalues = ["acpi=off", "irqpoll", "noapic", "pci=nomsi", "reboot=b", "vga=normal"]
type = UnicodeConfig

[product_sort_algorithm]
defaultvalues = ["algorithm1"]
description = 
editable = false
multivalue = false
possiblevalues = ["algorithm1", "algorithm2"]
type = UnicodeConfig

[software-on-demand.active]
defaultvalues = [false]
description = Activate software-on-demand
editable = false
multivalue = false
possiblevalues = [false, true]
type = BoolConfig

[software-on-demand.product-group-ids]
defaultvalues = ["software-on-demand"]
description = Product group ids containing products which are allowed to be installed on demand
editable = true
multivalue = true
possiblevalues = ["software-on-demand"]
type = UnicodeConfig

[software-on-demand.show-details]
defaultvalues = [false]
description = Show more details for software-on-demand
editable = false
multivalue = false
possiblevalues = [false, true]
type = BoolConfig

Zuletzt geändert von Fochlac am 06 Jan 2014, 12:32, insgesamt 1-mal geändert.
Benutzeravatar
SisterOfMercy
Beiträge: 1556
Registriert: 22 Jun 2012, 19:18

Re: Error with opsi-product-updater -i -vv

Beitrag von SisterOfMercy »

First try the tried and tested fix-all:

Code: Alles auswählen

opsi-setup --init-current-config
opsi-setup --auto-configure-samba
opsi-setup --set-rights
/etc/init.d/opsiconfd restart
/etc/init.d/opsipxeconfd restart
Or try the cleanup-backend command which I can't remember..
FYI: I also have OPSI running on CentOS 6.5, works great.
I use the samba sernet repository for samba: http://ftp.sernet.de/pub/samba/3.6/rhel ... samba.repo
And mariaDB instead of mysql (which has been molested since obstacle bought Sun)
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Fochlac
Beiträge: 4
Registriert: 19 Dez 2013, 18:23

Re: Error with opsi-product-updater -i -vv

Beitrag von Fochlac »

Hei

Thanks for the tips!

First I tried the "fix-all", unfortunatly to no avail. Then I used the opsi-setup --cleanup-backend which had some effect. However, this is even more puzzling: it simply changed the server opsi is trying to install on to the dhcp server, appearantly installing the packages (no errors) only to check for packages on the opsi-server. I seem to be able to switch between the two variants using the following chain of commands:

Code: Alles auswählen

  317  opsi-setup --cleanup-backend
  318  opsi-setconfig
  319  opsi-product-updater -i -vv

opsi-setconfig:
#!/bin/sh
# Aktualisiert die Server config
opsi-setup --init-current-config
opsi-setup --set-rights
/etc/init.d/opsiconfd restart
/etc/init.d/opsipxeconfd restart

Code: Alles auswählen

Using product property defaults: {}
Installing package '/var/lib/opsi/repository/javavm_1.6.0.33-2.opsi'
=================================================================================================
Installing package file '/var/lib/opsi/repository/javavm_1.6.0.33-2.opsi' on depot 'dhcp06.********.de'
Getting meta data from package '/var/lib/opsi/repository/javavm_1.6.0.33-2.opsi'
Creating product in backend
Locking product 'javavm' on depot 'dhcp06.********.de'
Checking package dependencies
Running preinst script
Running package script 'preinst'
Unpacking package files
Extracting data from package '/var/lib/opsi/repository/javavm_1.6.0.33-2.opsi'
Setting product property states in backend
Running postinst script
Running package script 'postinst'
Creating package content file
Setting access rights of client-data files
Unlocking product 'javavm_1.6.0.33-2' on depot 'dhcp06.********.de'
Traceback:
     line 1073 in '<module>' in file '/usr/bin/opsi-product-updater'
     line 1067 in 'main' in file '/usr/bin/opsi-product-updater'
     line 574 in 'processUpdates' in file '/usr/bin/opsi-product-updater'
     ==>>> Product 'javavm' not found on depot 'opsi04.********.de' after installation
ERROR: Product 'javavm' not found on depot 'opsi04.********.de' after installation
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Error with opsi-product-updater -i -vv

Beitrag von n.wenselowski »

Hello fochlac,

my first guess is that the dhcp server was somehow configured as OPSI depot.
What is the output of:

Code: Alles auswählen

opsi-admin -d method host_getObjects '' '{"id": "your.dhcp.fqdn"}'
You could have a look if it maybe sneaked into some of the options where it does not belong with the following:

Code: Alles auswählen

opsi-setup --edit-config-defaults

Kind regards

Niko

Code: Alles auswählen

import OPSI
Fochlac
Beiträge: 4
Registriert: 19 Dez 2013, 18:23

Re: Error with opsi-product-updater -i -vv

Beitrag von Fochlac »

Hello Niko,

thank you for your input. Your first guess seems to be right. Executing the command to get the host objects shows the server configured as depot.

Code: Alles auswählen

 opsi-admin -d method host_getObjects '' '{"id": "dhcp06.**********.de"}'
/usr/lib/python2.6/site-packages/ldaptor/ldapfilter.py:172: DeprecationWarning: Operator '<<' is deprecated, use '<<=' instead
  + Suppress(Literal(')').leaveWhitespace()))
[
          {
          "masterDepotId" : null,
          "ident" : "dhcp06.avt.rwth-aachen.de",
          "networkAddress" : "***.****.***.0/255.255.255.0",
          "description" : "",
          "inventoryNumber" : "",
          "ipAddress" : "***.****.***.70",
          "repositoryRemoteUrl" : "webdavs://dhcp06.************.de:4447/repository",
          "depotLocalUrl" : "file:///var/lib/opsi/depot",
          "isMasterDepot" : true,
          "notes" : "",
          "hardwareAddress" : null,
          "maxBandwidth" : 0,
          "repositoryLocalUrl" : "file:///var/lib/opsi/repository",
          "opsiHostKey" : "25cff3dbb2b74b642b6f3e6cdfa58276",
          "type" : "OpsiDepotserver",
          "id" : "dhcp06.avt.rwth-aachen.de",
          "depotWebdavUrl" : "webdavs://dhcp06.***********.de:4447/depot",
          "depotRemoteUrl" : "smb://dhcp06/opsi_depot"
          }
I used opsi-admin -d method host_delete dhcp06.***********.de to remove the depotserver and it finally works.
I suppose I thought the server already removed by deleting the ini-file in analogy to this and thus didn't think of looking for the proper way to remove a depotserver and was looking at it from a way to complicated angle. Still it would be interesting to know how it was configured as depot in the first place. :D

Thanks again for helping me solve this issue!

All the best,
Florian
Antworten