QCAD auf Webserver

Bitte benutzen Sie dieses Forum für Fragen, Kommentare und Probleme im Zusammenhang mit QCAD Professional

Moderators: andrew, Husky

Forum rules

Immer Betriebssystem und QCAD Version angeben.

Zeichnungsdateien und Bildschirmfotos beifügen.

Eine Frage pro Topic.

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

QCAD auf Webserver

Post by BastelFritz » Mon Apr 13, 2020 7:13 am

Ich möchte auf meiner Homepage Grafiken und Texte vom Benutzer konfigurieren lassen, im Shop eine Vorschau anzeigen (wysiwyg) und dann die dxf Datei für die Umsetzung der Bestellung nutzen.

Folgendes habe ich bei den Beschreibungen gefunden:
"QCAD Professional server licenses allow the use of QCAD Professional on a web server to process or generate data as part of a web service. The QCAD Professional application itself may not be made available for download or direct use to the users of the web service."

Gibt es zu dieser Möglichkeit weitere Hinweise zur Umsetzung und zu den Voraussetzungen?
Vielleicht irgendwo ein öffentliches Beispiel?


Mein WebShop ist WooCommerce in einer WordPress Umgebung.

Aus der Beschreibung der Leistungen meines Hosters habe ich mal die die von mir vermutet vielleicht relevanten Eigenschaften abgeschrieben:
- eigener Apache Server
- max. 80 Apache Prozesse
- eigene chroot Umgebung
- FTP, SFTP und SSH Zugang
- 512 MB
- PHP 7.3
- CGI/Perl
- Python
- SSI
- PHP ini editierbar
- httpd.conf editierbar
- .htacess
- mod_rewrite, mod_deflate
- GD Lib
- Image Magick
- cUrl
- ZendGuard Loader
- ionCube Loader
- SourceGuardian Loader
- cronjobs light
- cronjobs
- access.log und error.log

Ist es damit denkbar?

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD auf Webserver

Post by andrew » Tue Apr 14, 2020 9:49 am

Ja, das ist sicher denkbar. Am besten ausprobieren (z.B. mit der Trial-Version).

Einige Andachtspunkte:

- evtl. müssen auf dem Server noch benötigte Bibliotheken nachinstalliert werden. Dies kann ins QCAD Installationsverzeichnis erfolgen. Prüfen für fehlende Bibliotheken mit:

Code: Select all

LD_LIBRARY_PATH=. ldd ./qcad-bin
- auf einem Linuxserver läuft in der Regel kein UI (X11). Beim Ausführen des Skriptes muss die Platform offscreen oder minimal verwendet werden, z.B.:

Code: Select all

./dwg2bmp.sh -platform minimal -f -o output.png input.dxf
- bei Verwendung von PHP evtl. Memorylimit für PHP anheben:

Code: Select all

ini_set('memory_limit', '500M');

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Wed Apr 15, 2020 9:20 pm

Danke für die Antwort - ich dachte, dafür müsste ich eine spezielle Server Version nehmen...

Ich habe die Test Version qcad-3.24.3-trial-linux-x86_64.tar.gz im neu erstellten Verzeichnis ~/opt ausgepackt.
Alle Bibliotheken wurden auf Anhieb gefunden.

Eine Probedatei input.dxf habe ich in das Verzeichnis kopiert.

Das Beispiel

Code: Select all

 ./dwg2bmp.sh -platform minimal -f -o output.png input.dxf
ergibt die Meldung:

Code: Select all

-shell: ./dwg2bmp.sh: No such file or directory
Daraufhin habe ich es ohne die Endung .sh probiert, das sieht auf den ersten Blick gut aus, aber es bricht dann nach der 15s Wartezeit ab:

Code: Select all

 ~/opt/qcad-3.24.3-trial-linux-x86_64 # ./dwg2bmp -platform minimal -f -o output.png input.dxf
QCAD version  3.24.3
Warning:  This plugin does not support application fonts
Warning:  RPropertyTypeId::generateId: property already initialized:  7RObject : "" : "Invisible"
22:09:20: Debug:

You are using a trial version of QCAD Professional.

22:09:20: Debug:    If you would like to use this software productively,
22:09:20: Debug:    please purchase the full version for a small license fee from our
22:09:20: Debug:    Online Shop at:
22:09:20: Debug:    http://www.ribbonsoft.com/shop

22:09:20: Debug:    Thank you for trying this add-on!


22:09:20: Debug:    Your script will start in 15 seconds...
./qcad: line 9: 23879 Segmentation fault      LD_LIBRARY_PATH="$DIR" "$binary" "$@"

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique
Ich habe es noch alternativ mit "offscreen" statt "minimal" probiert und auch zusätzlich mit "-style plastique", aber jeweils die Abbruchmeldung erhalten.

Wäre für weitere Tipps dankbar...

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Thu Apr 16, 2020 7:23 pm

Ich habe noch weiter experimentiert, allerdings ohne in der Sache weiter zu kommen.

Hier einige Infos, um meinem Problem vielleicht auf die Spur zu kommen. Als erstes habe ich versucht, die Hilfe anzuzeigen. Die Anwort ist ähnlich wie beim ersten Aufruf, aber nicht identisch:

Code: Select all

 ~/opt/qcad-3.24.3-trial-linux-x86_64 # ./qcad -platform offscreen -h
QCAD version  3.24.3
Fontconfig error: Cannot load default config file
Warning:  RPropertyTypeId::generateId: property already initialized:  7RObject : "" : "Invisible"
./qcad: line 9:  6977 Segmentation fault      LD_LIBRARY_PATH="$DIR" "$binary" "$@"

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique
Ein config file habe ich gefunden, das sieht recht unspektakulär aus:

Code: Select all

 ~/.config/QCAD # cat QCAD3.conf
[NewFile]
DefaultAction=scripts/Pro/DefaultActionPro.js
Allerdings gibt es im Verzeichnis "scripts" kein Unterverzeichnis "Pro":

Code: Select all

 ~/opt/qcad-3.24.3-trial-linux-x86_64/scripts # ls
Misc  readme.txt
Kann es daran liegen?

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Thu Apr 16, 2020 9:00 pm

Habe nun noch festgestellt, dass die Meldung "Fontconfig error" gar nicht von QCAD kommt, sondern vom Programm "Fontconfig".

Code: Select all

 ~ # fc-list
Fontconfig error: Cannot load default config file
/usr/share/fonts/truetype/lato/Lato-Medium.ttf: Lato,Lato Medium:style=Medium,Regular
/usr/share/fonts/X11/Type1/lmtti10.pfb: LMMono10:style=Italic
/usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf: Lato,Lato Semibold:style=Semibold Italic,Italic
...
das geht noch endlos weiter
...

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Thu Apr 16, 2020 9:30 pm

Weiter mit Mini-Schritten. fontconfig ist offenbar installiert, falls ich das richtig interpretiere:

Code: Select all

~ # dpkg --list
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description

.
.
ii  fontconfig     2.11.0-6.7+b amd64        generic font configuration librar
ii  fontconfig-con 2.11.0-6.7   all          generic font configuration librar
.
.

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD auf Webserver

Post by andrew » Fri Apr 17, 2020 7:48 am

Als nächstes würde ich einen Backtrace versuchen um das Problem möglicherweise eingrenzen zu können:

Code: Select all

LD_LIBRARY_PATH=. gdb ./qcad-bin -platform minimal -h
run
[warten auf Abbruch]
bt
Allenfalls würde ich auch noch die alternativen Pakete versuchen:

Mit Qt 4:
https://qcad.org/archives/qcad/qcad-3.2 ... _64.tar.gz

Mit Qt 5.13 mit Wayland Unterstützung:
https://qcad.org/archives/qcad/qcad-3.2 ... _64.tar.gz

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Fri Apr 17, 2020 8:04 pm

Hat ein bisschen gedauert, habe noch --args eingefügt...

Schritt 1:

Code: Select all

~/opt/qcad-3.24.3-trial-linux-x86_64 # LD_LIBRARY_PATH=. gdb --args ./qcad-bin -platform minimal -h
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./qcad-bin...(no debugging symbols found)...done.

Schritt 2:

Code: Select all

(gdb) run
Starting program: /home/opt/qcad-3.24.3-trial-linux-x86_64/qcad-bin -platform minimal -h
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
QCAD version  3.24.3
Warning:  This plugin does not support application fonts
Warning:  RPropertyTypeId::generateId: property already initialized:  7RObject : "" : "Invisible"
[New Thread 0x7fffe5fdf700 (LWP 5434)]
warning: unable to open /proc file '/proc/5430/status'
[New Thread 0x7fffe57de700 (LWP 5435)]
[Thread 0x7fffe5fdf700 (LWP 5434) exited]
warning: unable to open /proc file '/proc/5430/status'
warning: unable to open /proc file '/proc/5430/status'
[Thread 0x7fffe57de700 (LWP 5435) exited]
[New Thread 0x7fffe57de700 (LWP 5436)]
warning: unable to open /proc file '/proc/5430/status'
warning: unable to open /proc file '/proc/5430/status'

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ffff2a73798 in ?? ()
   from /home/opt/qcad-3.24.3-trial-linux-x86_64/./libQt5Script.so.5
Schritt 3:

Code: Select all

(gdb) bt
#0  0x00007ffff2a73798 in ?? ()
   from /home/opt/qcad-3.24.3-trial-linux-x86_64/./libQt5Script.so.5
#1  0x00007ffff2afbbf0 in ?? ()
   from /home/opt/qcad-3.24.3-trial-linux-x86_64/./libQt5Script.so.5
#2  0x00007ffff2afc088 in ?? ()
   from /home/opt/qcad-3.24.3-trial-linux-x86_64/./libQt5Script.so.5
#3  0x00007ffff2b9e4c6 in ?? ()
   from /home/opt/qcad-3.24.3-trial-linux-x86_64/./libQt5Script.so.5
#4  0x00007ffff2b9edce in QScriptEngine::QScriptEngine() ()
   from /home/opt/qcad-3.24.3-trial-linux-x86_64/./libQt5Script.so.5
#5  0x00007ffff6ba65f8 in RScriptHandlerEcma::RScriptHandlerEcma() ()
   from ./libqcadecmaapi.so
#6  0x00007ffff6baab4b in RScriptHandlerEcma::factory() ()
   from ./libqcadecmaapi.so
#7  0x00007ffff607f5ce in RScriptHandlerRegistry::createScriptHandler(QString const&) () from ./libqcadcore.so
#8  0x00007ffff607f7c8 in RScriptHandlerRegistry::getGlobalScriptHandler(QString const&) () from ./libqcadcore.so
#9  0x00000000004049cd in ?? ()
#10 0x00007ffff4ddb2e1 in __libc_start_main (main=0x404260, argc=4,
    argv=0x7fffffffe618, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffe608)
    at ../csu/libc-start.c:291
---Type <return> to continue, or q <return> to quit---
#11 0x0000000000404df5 in ?? ()
#12 0x00007fffffffe608 in ?? ()
#13 0x000000000000001c in ?? ()
#14 0x0000000000000004 in ?? ()
#15 0x00007fffffffe83b in ?? ()
#16 0x00007fffffffe87f in ?? ()
#17 0x0000000000000000 in ?? ()
(gdb)
Ich werde mal die beiden anderen Pakete ausprobieren und gelegentlich hier nach weiteren Tipps Ausschau halten.

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Fri Apr 17, 2020 8:55 pm

Die beiden anderen Versionen bringen diese Meldungen:

Code: Select all

 ~/opt/qcad-3.24.3-trial-linux-qt4-x86_64 # ./qcad -platform offscreen -h
QCAD version  3.24.3
Fontconfig error: Cannot load default config file
Warning:  qcad-bin: cannot connect to X server

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique

Code: Select all

 ~/opt/qcad-3.24.3-trial-linux-qt5.13-x86_64 # ./qcad -platform offscreen -h
QCAD version  3.24.3
Warning:  QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-web64'
Fontconfig error: Cannot load default config file
Warning:  RPropertyTypeId::generateId: property already initialized:  7RObject : "" : "Invisible"
./qcad: line 9: 23656 Segmentation fault      LD_LIBRARY_PATH="$DIR" "$binary" "$@"

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Sat Apr 18, 2020 5:19 am

Nachtrag zu Schritt 2 von oben; es gibt scheinbar kein proc Verzeichnis oder ich habe da kein Zugriff, jedenfalls nicht von der shell aus:

Code: Select all

user@server ~ # cd /proc
-shell: cd: /proc: No such file or directory
user@server ~ # cd /
user@server / # ls
Maildir  bin  dev  etc  home  lib  lib32  lib64  tmp  usr  var
Sollte ich Zugriff haben?

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD auf Webserver

Post by andrew » Mon Apr 20, 2020 8:31 am

Für den fontconfig error gibt es online div. Lösungsansätze

z.B.:

export FONTCONFIG_PATH=/etc/fonts

Ob das aber wirklich die Ursache für den segfault ist weiss ich nicht.

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Mon Apr 20, 2020 4:38 pm

Ich habe einiges ausprobiert, aber nichts hat geholfen. Letztlich habe ich meinen Hoster kontaktiert, der hat mir dann erklärt, dass mein Paket für solche Sachen nicht ausreichend ist: Ich müsste einen root-Server buchen.

Danke dennoch für die Unterstützung!

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD auf Webserver

Post by andrew » Mon Apr 20, 2020 6:20 pm

BastelFritz wrote:
Mon Apr 20, 2020 4:38 pm
der hat mir dann erklärt, dass mein Paket für solche Sachen nicht ausreichend ist: Ich müsste einen root-Server buchen.
Das ist nicht grundsätzlich der Fall. Wir haben QCAD erfolgreich auf Servern installiert ohne Root Zugriff. Fehlende Bibliotheken können ins QCAD Verzeichnis nachinstalliert werden.

BastelFritz
Active Member
Posts: 25
Joined: Sun Apr 07, 2019 7:30 pm

Re: QCAD auf Webserver

Post by BastelFritz » Mon Apr 20, 2020 9:02 pm

Also ich würde durchaus gern noch einige Sachen ausprobieren, aber natürlich die Geduld und Hilfe auch nicht überstrapazieren. Habe mich schon umgeschaut nach stromsparenden Mini-Rechnern, die geeignet sein könnten, die Seite zuhause selbst zu hosten, aber so richtig kann ich mich damit noch nicht anfreunden...

Um die Sache mit fontconfig weiter zu verfolgen:

Code: Select all

export FONTCONFIG_PATH=/etc/fonts
hat keine Besserung gebracht. Im /etc Verzeichnis gibt es kein bzw. sehe ich kein fonts Verzeichnis. Und ich kann da mangels Rechten auch keins erstellen.

Weiter habe ich ausprobiert, im home Verzeichnis ein ~/etc/fonts Verzeichnis anzulegen und dann mit

Code: Select all

mount --bind /etc/fonts ~/etc/fonts
zu aktivieren, das scheitert aber daran, dass ich keine Rechte für --bind habe.

Ich habe die Sachen dann ein bisschen kombiniert, von hier das Linux fonts.conf in das Verzeichnis kopiert und mit

Code: Select all

export FONTCONFIG_PATH=~/etc/fonts
den Verweis auf den Ordner im Home Verzeichnis gesetzt.

Im Ergebnis funktioniert es noch nicht, hat aber "nur noch" Warnmeldungen statt der Fehlermeldung zuvor:

Code: Select all

user4@server ~ # fc-list
Fontconfig warning: line 88: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: line 88: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: line 88: Having multiple <family> in <alias> isn't supported and may not work as expected
...
das kommt sehr oft...
...
Wie gesagt probiere ich gern weiter aus, hätte aber auch Verständnis für eine begrenzte Unterstützung.

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD auf Webserver

Post by andrew » Tue Apr 21, 2020 8:19 am

Ich würde mal noch die Qt 5.13 Version versuchen mit Platform minimal:

Code: Select all

cd ~/opt/qcad-3.24.3-trial-linux-qt5.13-x86_64
./qcad -platform minimal -h

Post Reply

Return to “QCAD Professional”