OPSI keine Pakete mehr im OPSI Config Editor

Antworten
fneubert
Beiträge: 3
Registriert: 26 Feb 2015, 17:59

OPSI keine Pakete mehr im OPSI Config Editor

Beitrag von fneubert »

Hallo Leute,

ich benötige Eure Hilfe:

Nachdem das System voll gelaufen ist funktioniert die Installation mit OPSI nicht mehr.
Als erstes habe ich festgestellt, dass die Clients nicht mehr OPSI Config Editor vorhanden waren. Diese konnte ich aus dem Backup wieder holen.

Dann habe ich festgestellt, dass der opsi config service nicht mehr lief und sich nicht starten lies, dafür habe ich dann die Anleitung von
viewtopic.php?t=7693 durchgeführt.
,-------
| root@rltg-opsi:/var/log/opsi/opsiconfd# service opsiconfd start
| Starting opsi config service..
| ==> opsiconfd.log <==
| [1] [Apr 24 10:18:55]
| ==================================================================
| = opsi configuration service starting =
| ================================================================== (Logger.py|843)
| ..[5] [Apr 24 10:18:57] Creating pid file u'/var/run/opsiconfd/opsiconfd.pid' (opsiconfd.py|646)
| [5] [Apr 24 10:18:57] Starting opsiconfd main thread (opsiconfd.py|463)
| [5] [Apr 24 10:18:57] Opening socket /var/run/opsiconfd/opsiconfd.socket for interprocess communication. (opsiconfd.py|432)
| .[4] [Apr 24 10:18:57] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
| [5] [Apr 24 10:18:57] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
| [5] [Apr 24 10:18:58] Added static content '/' which points to directory '/usr/share/opsiconfd/static' (opsiconfd.py|291)
| [5] [Apr 24 10:18:58] Running on depot server 'rltg-opsi.rltg.local', exporting repository directory (opsiconfd.py|308)
| [5] [Apr 24 10:18:58] Uptime: 0:00:02.928890 (opsiconfd.py|494)
| [5] [Apr 24 10:18:58] Statistics: (opsiconfd.py|496)
| [5] [Apr 24 10:18:58] Methodname Callcount Average processing duration (opsiconfd.py|497)
| [2] [Apr 24 10:18:58] Traceback: (Logger.py|753)
| [2] [Apr 24 10:18:58] File "/usr/lib/pymodules/python2.7/opsiconfd/opsiconfd.py", line 472, in run
| self._createSite()
| (Logger.py|753)
| [2] [Apr 24 10:18:58] File "/usr/lib/pymodules/python2.7/opsiconfd/opsiconfd.py", line 310, in _createSite
| raise Exception(u"Repository local url for depot '%s' not found" % self.config['depotId'])
| (Logger.py|753)
| [2] [Apr 24 10:18:58] ==>>> Repository local url for depot 'rltg-opsi.rltg.local' not found (opsiconfd.py|485)
| [5] [Apr 24 10:18:58] Stopping opsiconfd main thread (opsiconfd.py|180)
| [5] [Apr 24 10:18:58] Deleting all sessions (Session.py|231)
| [5] [Apr 24 10:18:58] Opsiconfd main thread exiting... (opsiconfd.py|488)
| . (failed).
`-------
* Hilfe von UIB ist nicht schlecht
viewtopic.php?t=7693
1029 2017-04-24 10:22:25 root@rltg-opsi opsi-admin -d method host_getObjects '' '{"type": "OpsiDepotserver"}' > depot.json
1031 2017-04-24 10:23:33 root@rltg-opsi cp -av depot.json depot.json.bak
1032 2017-04-24 10:23:42 root@rltg-opsi vim depot.json
1035 2017-04-24 10:33:02 root@rltg-opsi diff depot.json.bak depot.json
5c5
< "networkAddress" : null,
---
> "networkAddress" : "10.6.0.2/255.255.255.0",
8,11c8,11
< "ipAddress" : null,
< "repositoryRemoteUrl" : null,
< "depotLocalUrl" : null,
< "isMasterDepot" : null,
---
> "ipAddress" : "10.6.0.2",
> "repositoryRemoteUrl" : "webdavs://rltg-opsi.rltg.local:4447/repository",
> "depotLocalUrl" : "file:///var/lib/opsi/depot",
> "isMasterDepot" : true,
13c13
< "hardwareAddress" : null,
---
> "hardwareAddress" : "00:16:3e:67:98:0e",
15c15
< "repositoryLocalUrl" : null,
---
> "repositoryLocalUrl" : "file:///var/lib/opsi/repository",
19,20c19,20
< "depotWebdavUrl" : null,
< "depotRemoteUrl" : null
---
> "depotWebdavUrl" : "webdavs://rltg-opsi.rltg.local:4447/depot",
> "depotRemoteUrl" : "smb://rltg-opsi/opsi_depot"

1036 2017-04-24 10:33:08 root@rltg-opsi opsi-admin -d --no-depot method host_updateObjects < depot.json
1037 2017-04-24 10:33:16 root@rltg-opsi service opsiconfd start
Starting opsi config service..[1] [Apr 24 10:33:17]
==================================================================
= opsi configuration service starting =
================================================================== (Logger.py|843)
..[5] [Apr 24 10:33:19] Creating pid file u'/var/run/opsiconfd/opsiconfd.pid' (opsiconfd.py|646)
[5] [Apr 24 10:33:19] Starting opsiconfd main thread (opsiconfd.py|463)
[5] [Apr 24 10:33:19] Opening socket /var/run/opsiconfd/opsiconfd.socket for interprocess communication. (opsiconfd.py|432)
.[4] [Apr 24 10:33:19] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Apr 24 10:33:19] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[5] [Apr 24 10:33:19] Added static content '/' which points to directory '/usr/share/opsiconfd/static' (opsiconfd.py|291)
[5] [Apr 24 10:33:19] Running on depot server 'rltg-opsi.rltg.local', exporting repository directory (opsiconfd.py|308)
[5] [Apr 24 10:33:19] Running on depot server 'rltg-opsi.rltg.local', exporting depot directory (opsiconfd.py|321)
[5] [Apr 24 10:33:19] Added webdav content 'repository' which points to directory '/var/lib/opsi/repository' () (opsiconfd.py|354)
[5] [Apr 24 10:33:19] Added webdav content 'depot' which points to directory '/var/lib/opsi/depot' () (opsiconfd.py|354)
[5] [Apr 24 10:33:19] Added webdav content 'configed' which points to directory '/usr/lib/configed' (u'noauth',) (opsiconfd.py|354)
[5] [Apr 24 10:33:19] Accepting HTTPS requests on 0.0.0.0:4447 (opsiconfd.py|401)
[5] [Apr 24 10:33:19] Publishing opsiconfd over zeroconf as 'opsi configuration daemon' on '4447' (opsiconfd.py|415)
.. (done).
Damit lief der OPSI wieder. Nun aber das nächste Problem der OPSI Conig Editor zeigt nun keine Produkte (netboot & SW) mehr an.
Der Befehl "opsi-package-manager -l" zeigt keine Pakete mehr an, obwohl das Depot /var/lib/opsi/depot/ prall gefüllt ist
root@rltg-opsi:/etc/opsi# opsi-package-manager -l
------------------------
- rltg-opsi.rltg.local -
------------------------
Product ID Version Name
========================================================================================================================================================================================================================================
Könnt Ihr mir bitte helfen? Habe keine Idee mehr....

Danke
Benutzeravatar
ueluekmen
uib-Team
Beiträge: 1939
Registriert: 28 Mai 2008, 10:53

Re: OPSI keine Pakete mehr im OPSI Config Editor

Beitrag von ueluekmen »

Hi,

hat sich der Hostname vom server geändert? Da reagiert opsi sehr empfindlich. Ansonsten hilft manchmal auch

Code: Alles auswählen

opsi-setup --cleanup-backend
opsi-setup --init-current-config
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://www.uib.de
fneubert
Beiträge: 3
Registriert: 26 Feb 2015, 17:59

Re: OPSI keine Pakete mehr im OPSI Config Editor

Beitrag von fneubert »

Hi,

danke für die Antwort.
Nachdem Befehl
root@rltg-opsi:~# opsi-setup --cleanup-backend
[4] [Apr 25 08:06:29] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Apr 25 08:06:29] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[5] [Apr 25 08:06:29] Parsing dispatch.conf (CleanupBackend.py|62)
[5] [Apr 25 08:06:29] Mysql-backend detected. Trying to cleanup mysql-backend first (CleanupBackend.py|87)
[5] [Apr 25 08:06:29] Connection to database 'opsi' on 'localhost' as user 'opsi' (CleanupBackend.py|246)
[5] [Apr 25 08:06:29] Cleaning up defaultValues in productProperties (CleanupBackend.py|250)
[5] [Apr 25 08:06:29] Cleaning up groups (CleanupBackend.py|94)
[5] [Apr 25 08:06:29] Cleaning up products (CleanupBackend.py|97)
[5] [Apr 25 08:07:27] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:00] Cleaning up product on depots (CleanupBackend.py|108)
[5] [Apr 25 08:08:00] Cleaning up product on clients (CleanupBackend.py|111)
[5] [Apr 25 08:08:01] Cleaning up product properties (CleanupBackend.py|114)
[5] [Apr 25 08:08:01] Cleaning up product property states (CleanupBackend.py|136)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Cleaning up config states (CleanupBackend.py|221)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:02] Creating unix socket '/var/run/opsipxeconfd/opsipxeconfd.socket' (OpsiPXEConfd.py|52)
[5] [Apr 25 08:08:03] Cleaning up audit softwares (CleanupBackend.py|224)
[5] [Apr 25 08:08:04] Cleaning up audit software on clients (CleanupBackend.py|227)
root@rltg-opsi:~#
root@rltg-opsi:~#
root@rltg-opsi:~# opsi-package-manager -l
------------------------
- rltg-opsi.rltg.local -
------------------------
Product ID Version Name
========================================================================================================================================================================================================================================
activate-win 1.0-9 Windows Activation
config-win-base 4.0.1-1 Windows Customizing
config-win10 4.0.7-3 Configure Windows 10
config-win81-desktop 4.0.5-3 Windows Customizing for Win8.1 Desktop
hwaudit 4.0.6.1-6 Client Hardwareinventarisierung
javavm 1.8.0.131-1 Oracle Java Runtime Environment
Ist zwar ein Paar Pakete wieder im Pool, aber alle anderen sind noch immer nicht da.

Scheint so, als müsste ich Sie wieder händisch einfügen?!?! Oder noch eine andere Idee?
opsi-setup --init-current-config
[4] [Apr 25 08:09:21] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Apr 25 08:09:21] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[5] [Apr 25 08:09:21] Creating base path: '/var/lib/opsi/config' (File.py|233)
[5] [Apr 25 08:09:21] Creating opsi base (SQL.py|465)
[5] [Apr 25 08:09:22] Try to find a Configserver. (opsi-setup|1796)
[5] [Apr 25 08:09:22] Getting current system config (opsi-setup|111)
[5] [Apr 25 08:09:22] System information: (opsi-setup|164)
[5] [Apr 25 08:09:22] distributor : Ubuntu (opsi-setup|165)
[5] [Apr 25 08:09:22] distribution : Ubuntu 12.04.5 LTS (opsi-setup|166)
[5] [Apr 25 08:09:22] ip address : 10.6.0.2 (opsi-setup|167)
[5] [Apr 25 08:09:22] netmask : 255.255.255.0 (opsi-setup|168)
[5] [Apr 25 08:09:22] subnet : 10.6.0.0 (opsi-setup|169)
[5] [Apr 25 08:09:22] broadcast : 10.6.0.255 (opsi-setup|170)
[5] [Apr 25 08:09:22] fqdn : rltg-opsi.rltg.local (opsi-setup|171)
[5] [Apr 25 08:09:22] hostname : rltg-opsi (opsi-setup|172)
[5] [Apr 25 08:09:22] domain : rltg.local (opsi-setup|173)
[5] [Apr 25 08:09:22] win domain : RLTG (opsi-setup|174)
[5] [Apr 25 08:09:22] Configuring client user pcpatch (opsi-setup|180)
[5] [Apr 25 08:09:22] Creating RSA private key for user pcpatch in '/var/lib/opsi/.ssh/id_rsa' (opsi-setup|194)
[5] [Apr 25 08:09:23] Setting rights on directory '/var/lib/opsi/.ssh' (Rights.py|121)
[4] [Apr 25 08:09:23] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Apr 25 08:09:23] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[4] [Apr 25 08:09:24] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Apr 25 08:09:24] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: OPSI keine Pakete mehr im OPSI Config Editor

Beitrag von n.wenselowski »

Vielleicht eine dumme Frage, aber wieso hast du das Backup nicht komplett zurückgespielt?

Code: Alles auswählen

import OPSI
fneubert
Beiträge: 3
Registriert: 26 Feb 2015, 17:59

Re: OPSI keine Pakete mehr im OPSI Config Editor

Beitrag von fneubert »

Hi,

keine Dumme Frage jedoch ich weiß ich nicht wann alles noch funktioniert hat.
Der OPSI wird nicht täglich benutzt, sondern nur wenn wir Updates einspielen oder neue Software.

Gruß
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: OPSI keine Pakete mehr im OPSI Config Editor

Beitrag von n.wenselowski »

Hi,

wenn die Pakete noch in /var/lib/opsi/repository liegen, kannst du sie von dort wieder manuell über den opsi-package-manager einspielen. Das ist vermutlich die sanfteste Art der Widerherstellung. Ich würde vorher einfach die md5-Summe des jeweiligen Pakets mit der aus .md5 vergleichen.


Gruß

Niko

Code: Alles auswählen

import OPSI
Antworten