Seite 1 von 1

ASCII-Decoderfehler bei Paketinstallation

Verfasst: 25 Jul 2014, 14:53
von Krischan
Hallo opsi-Forum,

habe mich gerade registriert um hier nach Rat zu fragen.

Ich habe 2 opsi-Server. Einen, der nur zum Pakete bauen und testen verwendet wird und einen produktiven, auf den ich das Paket nach Erstellung übertrage. Vor einigen Tagen wollte ich ein Paket bauen, das im Wesentlichen nur einen Ordner voller Files verteilen soll. Das besteht also aus einem ins-Skript und einem Ordner mit Unterordnern.

Das Paket baut problemlos auf dem Testserver, dort kann ich es auch problemlos ins Depot übernehmen (per opsi-package-manager -i).

Übertrage ich das Paket nun auf meinen Produktivserver und versuche es dort auf die gleiche Weise zu installieren, erhalte ich praktisch sofort folgende Meldung:

Code: Alles auswählen

Es sind Fehler aufgetreten:
   Fehler beim Bearbeiten von Install of package(s) /home/opsiproducts/datenpaket_1.0-3.opsi on depot 'opsi.mydomain.loc':
      Backend error: Failed to install package '/home/opsiproducts/datenpaket_1.0-3.opsi' on depot 'opsi.mydomain.loc': 'ascii' codec can't decode byte 0xe4 in position 12: ordinal not in range(128) (error on server)
Ok, man ist ja nicht doof. Die Namen der Dateien enthalten Sonderzeichen (Umlaute), Leerzeichen und was es noch so alles an Unsitten gibt. Also habe ich per Skript erst das Encoding der Dateinamen auf ASCII geändert und dann alle Zeichen aus den Dateinamen rausgeworfen, die nicht [A-Za-z0-9] sind. Danach Paket neu gebaut, auf dem Testserver neu installiert - lief durch. Dann wurde das Paket auf den produktiven Server kopiert und installiert: Die Fehlermeldung bleibt die gleiche.

Webrecherche ergab, dass die 3te Meldung aus dem Codeblock von Python generiert wird. Wirklich hilfreich ist das allerdings nicht.

Mehrere Vermutungen hatte ich schon, u.a. ein Übertragungsfehler der die Datei zerstört hat. Fehlanzeige - die MD5-Summen beider Files (auf Quelle und Zielserver) stimmen überein. Auch sind die Versionen folgender evtl. beteiligter Pakete identisch:

Code: Alles auswählen

root@dev-opsi-01:/home/opsiproducts/training-backup# dpkg -l | grep opsi
ii  opsi-atftpd                        0.7.dfsg-2.1                  amd64        advanced TFTP server - opsi version with pcre, fifo and max-blksize patches
ii  opsi-configed                      4.0.4.1.2-4                   all          OPSI config editor
ii  opsi-depotserver                   4.0.4.4-1                     all          opsi depotserver configuration package
ii  opsi-linux-bootimage               20140118-1                    all          opsi linux bootimage
ii  opsi-utils                         4.0.4.1-2                     all          opsi utils
ii  opsiconfd                          4.0.4.3-1                     all          opsi configuration service
ii  opsipxeconfd                       4.0.4.1-2                     all          opsi pxe configuration daemon
ii  python-opsi                        4.0.4.5-2                     all          opsi python library
root@dev-opsi-01:/home/opsiproducts/training-backup# dpkg -l | grep gzip
ii  gzip                               1.5-1.1                       amd64        GNU compression utilities
root@dev-opsi-01:/home/opsiproducts/training-backup# dpkg -l | grep cpio
ii  cpio                               2.11+dfsg-0.1                 amd64        GNU cpio -- a program to manage archives of files
root@dev-opsi-01:/home/opsiproducts/training-backup# dpkg -l | grep tar
ii  tar                                1.26+dfsg-0.1                 amd64        GNU version of the tar archiving utility
root@dev-opsi-01:/home/opsiproducts/training-backup# dpkg -l | grep python
ii  python                             2.7.3-4+deb7u1                all          interactive high-level object-oriented language (default version)
ii  python-apt                         0.8.8.2                       amd64        Python interface to libapt-pkg
ii  python-apt-common                  0.8.8.2                       all          Python interface to libapt-pkg (locales)
ii  python-avahi                       0.6.31-2                      amd64        Python utility package for Avahi
ii  python-chardet                     2.0.1-2                       all          universal character encoding detector
ii  python-crypto                      2.6-4+deb7u3                  amd64        cryptographic algorithms and protocols for Python
ii  python-dbus                        1.1.1-1                       amd64        simple interprocess messaging system (Python interface)
ii  python-dbus-dev                    1.1.1-1                       all          main loop integration development files for python-dbus
ii  python-debian                      0.1.21                        all          Python modules to work with Debian-related data formats
ii  python-debianbts                   1.11                          all          Python interface to Debian's Bug Tracking System
ii  python-fpconst                     0.7.2-5                       all          Utilities for handling IEEE 754 floating point special values
ii  python-gdbm                        2.7.3-1                       amd64        GNU dbm database support for Python
ii  python-gi                          3.2.2-2                       amd64        Python 2.x bindings for gobject-introspection libraries
ii  python-gnupginterface              0.3.2-9.1                     all          Python interface to GnuPG (GPG)
ii  python-ldap                        2.4.10-1                      amd64        LDAP interface module for Python
ii  python-ldaptor                     0.0.43+debian1-7              all          pure-Python library for LDAP operations
ii  python-m2crypto                    0.21.1-2                      amd64        a crypto and SSL toolkit for Python
ii  python-magic                       5.11-2+deb7u3                 amd64        File type determination library using "magic" numbers (Python bindings)
ii  python-mechanize                   1:0.2.5-3                     all          stateful programmatic web browsing
ii  python-minimal                     2.7.3-4+deb7u1                all          minimal subset of the Python language (default version)
ii  python-mysqldb                     1.2.3-2                       amd64        Python interface to MySQL
ii  python-newt                        0.52.14-11.1                  amd64        NEWT module for Python
ii  python-openssl                     0.13-2+deb7u1                 amd64        Python 2 wrapper around the OpenSSL library
ii  python-opsi                        4.0.4.5-2                     all          opsi python library
ii  python-pam                         0.4.2-13                      amd64        Python interface to the PAM library
ii  python-paramiko                    1.7.7.1-3.1                   all          Make ssh v2 connections with Python
ii  python-pkg-resources               0.6.24-1                      all          Package Discovery and Resource Access using pkg_resources
ii  python-pyasn1                      0.1.3-1                       all          ASN.1 library for Python
ii  python-pyparsing                   1.5.6+dfsg1-2                 all          Python parsing module
ii  python-reportbug                   6.4.4                         all          Python modules for interacting with bug tracking systems
ii  python-rrdtool                     1.4.7-2                       amd64        time-series data storage and display system (Python interface)
ii  python-serial                      2.5-2.1                       all          pyserial - module encapsulating access for the serial port
ii  python-simplejson                  2.5.2-1                       amd64        simple, fast, extensible JSON encoder/decoder for Python
ii  python-soappy                      0.12.0-4                      all          SOAP Support for Python
ii  python-sqlalchemy                  0.7.8-1                       all          SQL toolkit and Object Relational Mapper for Python
ii  python-sqlalchemy-ext              0.7.8-1                       amd64        SQL toolkit and Object Relational Mapper for Python - C extension
ii  python-support                     1.0.15                        all          automated rebuilding support for Python modules
ii  python-twisted                     12.0.0-1                      all          Event-based framework for internet applications (dependency package)
ii  python-twisted-bin                 12.0.0-1                      amd64        Event-based framework for internet applications
ii  python-twisted-conch               1:12.0.0-1                    all          Twisted SSH Implementation
ii  python-twisted-core                12.0.0-1                      all          Event-based framework for internet applications
ii  python-twisted-lore                12.0.0-1                      all          Documentation generator with HTML and LaTeX support
ii  python-twisted-mail                12.0.0-1                      all          SMTP, IMAP and POP protocol implementation
ii  python-twisted-names               12.0.0-1                      all          DNS protocol implementation with client and server
ii  python-twisted-news                12.0.0-1                      all          NNTP protocol implementation with client and server
ii  python-twisted-runner              12.0.0-1                      amd64        Process management, including an inetd server
ii  python-twisted-web                 12.0.0-1                      all          HTTP protocol implementation together with clients and servers
ii  python-twisted-words               12.0.0-1                      all          Chat and Instant Messaging
ii  python-zope.interface              3.6.1-3                       amd64        Interfaces for Python
ii  python2.6                          2.6.8-1.1                     amd64        Interactive high-level object-oriented language (version 2.6)
ii  python2.6-minimal                  2.6.8-1.1                     amd64        Minimal subset of the Python language (version 2.6)
ii  python2.7                          2.7.3-6+deb7u2                amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                  2.7.3-6+deb7u2                amd64        Minimal subset of the Python language (version 2.7)
Ich kann natürlich das Paket "leer" bauen und die Files später reinkopieren, dann geht das - aber dann habe ich diesen Riesenaufwand jedes mal, wenn ich das Paket aktualisiere.

Hat jemand eine ungefähre Ahnung wie man das fixen kann? Mein Python ist leider etwas eingerostet... :D

Re: ASCII-Decoderfehler bei Paketinstallation

Verfasst: 25 Jul 2014, 15:42
von n.wenselowski
Hallo Krischan,

eine Möglichkeit zum Checken: wie sind die Locales auf den verschiedenen Server - sind diese gleich?

Ansonsten ist für die weitere Installation das entsprechende Log meist hilfreich, am liebsten mit einem etwas höheren Loglevel (bspw. 7).


Gruß

Niko

Re: ASCII-Decoderfehler bei Paketinstallation

Verfasst: 29 Jul 2014, 08:39
von Krischan
Hallo Niko,

danke für den Tipp. die Locales schau' ich mir mal an. Falls ich mit höherem Loglevel was interessantes finde, poste ich es.

Habe mir zwischenzeitlich beholfen, indem ich die Files alle in eine ZIP gepackt und auf der Windowsseite mit der 7Zip CLI Exe wieder entpackt habe - dann zickt OPSI auch nicht rum. ;-)

Gruß,
Krischan