FlexLM für Autodesk

ret

Active Member
Hallo,
ich möchte unseren Lizenzserver für Autodeskprodukte von Windows am liebsten auf FreeBSD umziehen. Offiziell unterstüzt Autodesk Windows, MacOS X und Linux (Red Hat und SUSE jeweils Enterprise).
https://knowledge.autodesk.com/de/s...todesk-network-license-manager-for-linux.html

Meine Idee ist, den Lizenzserver über die Linux Binärkompatibilität in FreeBSD laufen zu lassen.
FreeBSD acadlock 12.0-RELEASE-p8 FreeBSD 12.0-RELEASE-p8 GENERIC amd64
linux-c7-nspr-4.13.1 Netscape Portable Runtime (Linux CentOS 7.4.1708)
linux-c7-nss-3.28.4_3 Network Security Services (Linux CentOS 7.4.1708)
linux-c7-sqlite-3.7.17_1 Library that implements an embeddable SQL database engine (Linux CentOS 7.4.1708)
linux-c7-strace-4.12_1 System call tracer (CentOS 7.6.1810)
linux_base-c7-7.4.1708_6 Base set of packages needed in Linux mode (Linux CentOS 7.4.1708)


In dem heruntergeladenen Packet (nlm11.16.2.0_ipv4_ipv6_linux64.tar.gz) ist ein RPM (nlm11.16.2.0_ipv4_ipv6_linux64.rpm)
Das habe ich mit rpm2cpio nach /compat/linux/opt/flexnetserver installiert.
cd /compat/linux && rpm2cpio /root/lizenzserver/nlm11.16.2.0_ipv4_ipv6_linux64.rpm | cpio -idv

Der Lizenzserver besteht aus zwei Softwarekomponenten. Einem allgemeinen Server (lmgrd) und einem herstellerabhängigen Vendordaemon (in meinem Fall von Autodesk adskflex).
lmgrd v11.16.2.0 build 242433 x64_lsb - Copyright (c) 1988-2018 Flexera. All Rights Reserved.
adskflex FlexNet Licensing version v11.16.2.0 build 242433 x64_lsb


Die Software lässt sich starten, ließt die Lizenzdatei erfolgreich ein, beendet sich danach, weil der Vendordaemon einen Fehler meldet.
./lmgrd -c 20180917_Autodesk_2018.lic -l /var/log/lmgrd

Die letzten Zeilen der Logdatei /compat/linux/var/log/lmgrd
19:12:20 (adskflex) EXITING DUE TO SIGNAL 76 Exit reason 44
19:12:20 (lmgrd) adskflex exited with status 76 (Not able to resolve local host)
19:12:20 (lmgrd) This error probably results from:
19:12:20 (lmgrd) 1. DNS server not able to resolve localhost.
19:12:20 (lmgrd) 2. /etc/hosts file does not contain an entry for localhost.
19:12:20 (lmgrd) To correct the problem put localhost entry in /etc/hosts file.


Eine Internetrecherche nach Signal 74 bzw. Reason 44 war nicht aufschlussreich. Dem Hinweis nach der DNS-Auflösung von localhost über die /compat/linux/etc/hosts Datei bin ich gefolgt und habe folgenden Eintrag gemacht.

127.0.0.1 localhost

... ohne Erfolg. Welche Datei (Pfad) ließt der adskflex-daemon und wie ist das Format?

Auch der Hinweis im FreeBSD-Handbuch (https://www.freebsd.org/doc/de/books/handbook/linuxemu-lbc-install.html) folgenden Eintrag in der /compat/linux/etc/hosts.conf zu setzen, hat keine Änderung gebracht.
order hosts, bind
multi on


Habt ihr noch eine Idee. Wie genau funktioniert die Auflösung unter der Linux-Kompatibilität und wie kann man ggfs. herausfinden wo es genau klemmt.

Danke und Grüße

ret
 
Zuletzt bearbeitet:
Wie ich diese Software geliebt habe...:ugly:
Geht mir genauso und dann auch noch unter Windows :(
Die Links kenne ich teilweise. Sie adressieren aber nicht genau das Problem das ich mit dem DNS habe.

Ich frage mich, wie genau die DNS-Auflösung unter der Linux-Kompatibilität funktioniert (resolv.conf, hosts, hosts.conf, ...).
Ich hätte gerne mal einen Linux-ping oder oder -nslookup ausgeführt, aber diese tools sind nicht unter /compat/linux installiert. Bekommt man die Tools über ein pkg install ???.

Du könntest mal ein strace auf den Daemon los lassen, dann siehst du was er tut.
strace auf lmgrd habe ich versucht, der funktioniert allerdings nicht (nicht implementiert).

../../usr/bin/strace ./lmgrd -c 20180917_Autodesk_2018.lic
../../usr/bin/strace: PTRACE_SETOPTIONS: Invalid argument
dmesg liefert:
linux_ptrace_seize: PTRACE_SEIZE not implemented; returning EINVAL
linux_ptrace_getregset: NT_PRSTATUS not implemented; returning EINVAL
linux_ptrace_setoptions: PTRACE_O_TRACESYSGOOD not implemented; returning EINVAL


Dann bemühte ich truss:
truss -o /tmp/truss -f -a ./lmgrd -c 20180917_Autodesk_2018.lic

int socket (int __domain, int __type, int __protocol)
int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
long ioctl( "file descriptor","ioctl command","Arguments");
Mit dem linux_connect(...) kann man wenig anfangen, da nicht sichtbar ist, was in *addr drin steht. Gibt es da eine Möglickeit? Speicherabbild und Debugger?
Ähnlich geht es mit mit den linux_ioctl(...). Was bedeuten die Kommandos und deren Argumente für die entsprechenden Geräte?

In /compat/linux/usr/include/bits/socket.h
/* Protocol families. */
#define PF_UNSPEC 0 /* Unspecified. */
#define PF_LOCAL 1 /* Local to host (pipes and file-domain).
#define PF_INET 2 /* IP protocol family. */
#define PF_NETROM 6 /* Amateur radio NetROM. */
#define PF_INET6 10 /* IP version 6. */
#define PF_KEY 15 /* PF_KEY key management API. */
#define PF_NETLINK 16
#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
Was ist __type?


Zunächst startet lmgrd (813,814) der startet adskflex (815) per execve.
815: linux_execve("./adskflex",[ "adskflex", "-T", "acadlock", "11.16", "7", "-c", ":20180917_Autodesk_2018.lic:", "-lmgrd_port", "6978", "-srv", "*****************64ASCII**********************************", "-daemon_port", "820", "--lmgrd_start", "**HEX***", "-vdrestart", "0" ],0x7fffffffdbd0) = 0 (0x0)

IP-Verbindungsversuch PF_INET
815: linux_socket(0x2,0x2,0x0) = 9 (0x9)
815: linux_ioctl(0x9,0x8927,0x7fffffffb220) ERR#-22 'Invalid argument'
815: close(9)
= 0 (0x0)
-->das ging wohl schief

815: linux_socket(0x2,0x2,0x0) = 9 (0x9)
815: linux_open("/proc/net/dev",0x0,0666) = 10 (0xa)
815: linux_newfstat(10,0x7fffffffacc0) = 0 (0x0)
815: linux_mmap2(0x0,0x1000,0x3,0x22,0xffffffffffffffff,0x0) = 34367545344 (0x800772000)
815: read(10,"Inter-| "...,4096) = 448 (0x1c0)
815: read(10,0x800772000,4096) = 0 (0x0)
815: close(10) = 0 (0x0)


cat /compat/linux/proc/net/dev
Inter-| Receive| Transmit
face|bytes packets errs drop fifo frame compressed multicast| bytes packets errs drop fifo colls carrier compressed
eth0: 1622095 21064 0 0 0 0 0 13913 3984479 5168 0 0 0 0 0 0
lo0: 46779 393 0 0 0 0 0 0 46779 393 0 0 0 0 0 0


Unter /compat/linux/sys/devices.... sind keine Netzwerkgeräte (eth0, lo0)
815: munmap(0x800772000,4096) = 0 (0x0)
815: linux_newstat("/sys/devices/virtual/net/eth0",0x7fffffffb040) ERR#-2 'No such file or directory'
815: linux_socket(0x2,0x2,0x0) = 10 (0xa)
815: linux_ioctl(0xa,0x8927,0x7fffffffaf90) = 0 (0x0)
815: close(10) = 0 (0x0)
815: linux_newstat("/sys/devices/virtual/net/lo0",0x7fffffffb040) ERR#-2 'No such file or directory'


IP-Verbindung
815: linux_socket(0x2,0x2,0x0) = 10 (0xa)
815: linux_ioctl(0xa,0x8927,0x7fffffffaf90) = 0 (0x0)
815: close(10) = 0 (0x0)

->was passierte hier?

815: linux_ioctl(0x9,0x8927,0x7fffffffb260) = 0 (0x0)
815: linux_socket(0x2,0x2,0x0) = 10 (0xa)
815: linux_ioctl(0xa,0x8927,0x7fffffffb0f0) = 0 (0x0)
815: close(10) = 0 (0x0)

->was passiere in FD 10?
815: linux_ioctl(0x9,0x8927,0x7fffffffb0a0) ERR#-22 'Invalid argument'
...
815: close(9) = 0 (0x0)

-> in FD 9 haben viele ioctl nicht gelappt

Zwei Verbindungsversuche über UNIX-Sockets
815: linux_socket(0x1,0x80801,0x0) = 9 (0x9)
815: linux_connect(0x9,0x7fffffffa280,0x6e) ERR#-2 'No such file or directory'
815: close(9) = 0 (0x0)
815: linux_socket(0x1,0x80801,0x0) = 9 (0x9)
815: linux_connect(0x9,0x7fffffffa410,0x6e) ERR#-2 'No such file or directory'
815: close(9) = 0 (0x0)


Jetzt greift er auf /etc/nsswitch.conf /etc/resolv.conf /etc/host.conf und /etc/hosts zu.

IP-Verbindung Typ 0x6 (PF_NETROM???)
815: linux_socket(0x2,0x1,0x6) = 9 (0x9)
815: linux_fcntl(0x9,0x3,0x0) = 2 (0x2)
815: linux_fcntl(0x9,0x4,0x802) = 0 (0x0)
815: linux_fcntl(0x9,0x2,0x1) = 0 (0x0)
814: poll({ 0/POLLIN },1,4999) = 1 (0x1)
814: linux_accept(0x0,0x7fffffff91d0,0x7fffffff91cc) = 7 (0x7)

-> was macht poll?
...
815: linux_connect(0x9,0x78e770,0x10) = 0 (0x0)
->Verbindung vermutlich zu lmgrd

Jetzt wird ein bischen empfangen (lmgrd) und gesendet (adskflex).
814: linux_recvfrom(0x7,0x73a330,0x14,0x0,0x0,0x0) = 20 (0x14)
814: linux_recvfrom(0x7,0x73a344,0x7f,0x0,0x0,0x0) = 127 (0x7f)
815: linux_sendto(0x9,0x76d6b0,0x93,0x0,0x0,0x0) = 147 (0x93)

...

lmgrd beendet sie Verbindung
814: linux_shutdown(0x7,0x2) = 0 (0x0)
814: close(7) = 0 (0x0)
...


adskflex ebenfalls
815: linux_shutdown(0x9,0x2) = 0 (0x0)
...
815: linux_getsockname(0x7,0x7fffffffb6e0,0x7fffffffb6dc) = 0 (0x0)


jetzt öffent adskflex die /etc/hosts und /etc/gai.conf

Verbindung über PF_NETLINK zum ersten bzw. IP zum zweiten
815: linux_socket(0x10,0x3,0x0) ERR#-97 'Address family not supported by protocol family'
815: linux_socket(0x2,0x80002,0x0) = 9 (0x9)
815: linux_connect(0x9,0x78e770,0x10) ERR#-99 'Can't assign requested address'
815: close(9) = 0 (0x0)

-> Fehler bei der IP-Zuweisung

Das gleiche nochmal
815: linux_socket(0x10,0x3,0x0) ERR#-97 'Address family not supported by protocol family'
815: linux_socket(0x2,0x80002,0x0) = 9 (0x9)
815: linux_connect(0x9,0x78f6f0,0x10) ERR#-99 'Can't assign requested address'
815: close(9) = 0 (0x0)


Versuch mit IPv6
815: linux_socket(0xa,0x1,0x0) = 9 (0x9)
815: close(9) = 0 (0x0)
815: linux_socket(0xa,0x1,0x6) = 9 (0x9)
815: linux_setsockopt(0x9,0x1,0x9,0x7fffffffd75c,0x4) = 0 (0x0)
815: linux_bind(0x9,0x78f690,0x1c) = 0 (0x0)
815: linux_listen(0x9,0x1f4) = 0 (0x0)
815: linux_getsockname(0x9,0x7fffffffd800,0x7fffffffd784) = 0 (0x0)
815: close(9) = 0 (0x0)

-> sieht von den syscalls nicht schlecht aus, aber führte wohl auch nicht zum erwarteten Ergebnis.

Ende der Vorstellung
815: linux_shutdown(0x7,0x2) = 0 (0x0)
815: close(7) = 0 (0x0)
815: close(8) = 0 (0x0)
815: linux_unlink(0x7c1b80) = 0 (0x0)
815: linux_exit_group(0x4c)
815: process exit, rval = 76


Anbei noch das Ende der STDOUT:
13:43:55 (adskflex) Server started on acadlock for:
13:43:55 (adskflex) 80800ESME_F (consisting of: 80700ESME_2010_0F
13:43:55 (adskflex) 85773ESME_2012_0F 85630ESME_2011_0F 85629ESID_2011_0F
13:43:55 (adskflex) 85615ALSK_2011_0F 85545AMECH_PP_2011_0F 85580MBXPRO_2011_0F
13:43:55 (adskflex) 85000DESNST_2011_0F 85593ASPRO_2011_0F 85637MFAA_2011_0F
13:43:55 (adskflex) 80400ESID_2010_0F 71800AMECH_PP_2010_0F 83900MBXPRO_2010_0F
13:43:55 (adskflex) 85508ASPRO_2010_0F 76700MFAA_2010_0F 57600ACD_2009_0F
13:43:55 (adskflex) 59600INVPRO_2009_0F 60300ACAD_E_2009_0F 612003DSMAX_2009_0F
13:43:55 (adskflex) 59200AMECH_PP_2009_0F 70200MBXPRO_2009_0F) PLIST
13:43:55 (adskflex) 55300INVPRO_2008_0F 47200INVPRO_9_0F 43500INVBUN_7_0F
13:43:55 (adskflex) 40900MDT_PP_6_0F 86268PDSU_2015_0F 86825INVPROSA_2018_0F
13:43:55 (adskflex) EXTERNAL FILTERS are OFF
13:43:55 (lmgrd) adskflex using TCP-port 2080
13:43:55 (adskflex) EXITING DUE TO SIGNAL 76 Exit reason 44
13:43:55 (lmgrd) adskflex exited with status 76 (Not able to resolve local host)
13:43:55 (lmgrd) This error probably results from:
13:43:55 (lmgrd) 1. DNS server not able to resolve localhost.
13:43:55 (lmgrd) 2. /etc/hosts file does not contain an entry for localhost.
13:43:55 (lmgrd) To correct the problem put localhost entry in /etc/hosts file.
 
Hallo Rob,
danke für den Hinweis. Ja, das habe ich gemacht, nachdem ich die Zugriffe auf /sys/devices/virtual/net/... gesehen. Obige Logs sind mit folgenden mounts für procfs und sysfs.

linprocfs on /compat/linux/proc (linprocfs, local)
linsysfs on /compat/linux/sys (linsysfs, local)


Es gibt allerdings dennoch kein /sys/devices/virtual/net Verzeichnis.

Das Packet iputils (iputils-20160308-10.el7.x86_64.rpm) für CentOS 7 habe ich installiert. Ein ping localhost liefert zwei Warnungen und interessanterweise einen coredump. Auflösen kann er localhost nach 127.0.0.1.

./bin/ping localhost
WARNING: setsockopt(ICMP_FILTER): Protocol not available
WARNING: your kernel is veeery old. No problems.
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.014 ms
Abort (core dumped)


Grüße

ret
 
Mach ich doch :)
Meine Idee ist, den Lizenzserver über die Linux Binärkompatibilität in FreeBSD laufen zu lassen.

Ich für meinen Teil lerne gerne dazu. Deshalb finde ich es spannend die Grenzen der Kompatibilität, sowie die Gründe der Inkompatibilität kennen zu lernen.

Vielleicht gibt es ja noch sachdienliche Hinweise zu meinem Anliegen.

Viele Grüße

ret
 
Ach so, ich dachte, wenn da von "unserem" Lizenzserver die Rede ist, dass ihr dafür Geld bezahlt und damit Geld verdient. Mein Fehler.
 
Zurück
Oben