Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Plantage eibd
#1
Bonjour,

Je tente d'installer le trio eibd-linknx-knxweb2 sur une Ubuntu 14.4 tournant sous Virtualbox 4.3.12 (sous Windows 7 pro)
J'ai une passerelle Siemens 148-1AB22 dont l'adresse DHCP est 192.168.1.19.
J'ai suivi principalement le tutoriel situé à la page http://diyfltm.blogspot.fr/2012/11/insta...2-sur.html.
je bute sur le lancement du processus eibd, qui plante systématiquement.
Mes connaissances de linux sont modestes.
Je précise les étapes que j'ai effectuées, en mode terminal:

Variables d'environnement
*************************
KNXDIR=$HOME/knx
INSTALLDIR=${KNXDIR}/local
export LD_LIBRARY_PATH=${INSTALLDIR}/lib
mkdir ${KNXDIR}
cd ${KNXDIR}
Installation des composants
***************************
installation pth_sem
----------------------
wget http://downloads.sourceforge.net/sourcef...0.8.tar.gz
tar -xzf pthsem_2.0.8.tar.gz
cd pthsem-2.0.8/
./configure --prefix=${INSTALLDIR}/
make
make test
make install
cd ..
Installation linknx:
--------------------
wget http://downloads.sourceforge.net/sourcef....30.tar.gz
tar -xzf linknx-0.0.1.30.tar.gz
cd linknx-0.0.1.30/
./configure --without-log4cpp --without-lua --prefix=${INSTALLDIR}/ --with-pth=${INSTALLDIR}/
make
make install
cd ..
Installation eibd
------------------
wget http://freefr.dl.sourceforge.net/project...0.5.tar.gz
tar -xzf bcusdk_0.0.5.tar.gz
cd bcusdk-0.0.5/
./configure --enable-onlyeibd --enable-eibnetiptunnel --enable-usb --enable-eibnetipserver --enable-ft12 --prefix=${INSTALLDIR}/ --with-pth=${INSTALLDIR}/
make
make install
cd ..
Installation apache2
---------------------
sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql
Une fois les paquets installés, j'ouvre comme indiqué la page: http://127.0.0.1/, et j'obtiens le message « It works! »
Le serveur est donc correctement installé
Installation knxweb2
-----------------------
wget -O knxweb2.tar "http://linknx.cvs.sourceforge.net/viewvc/linknx/knxweb/knxweb2/?view=tar"
tar xvf knxweb2.tar
Tout s'étant déroulé sans erreur, je suis passé à la configuration:
****************************************************
linknx:
--------
cp ${INSTALLDIR}/share/doc/linknx/linknx.xml ${KNXDIR}
knxweb2:
---------
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/knxweb.conf
sudo perl -pi -e "s{/var/www}{${KNXDIR}/knxweb2}g" /etc/apache2/sites-available/knxweb.conf
sudo a2disssite 000-default.conf
sudo a2ensite knxweb.conf
sudo service apache2 reload
Lancement de eibd
*****************
${INSTALLDIR}/bin/eibd -D -T -R -S -i -u --daemon=${KNXDIR}/eibd.log ipt:192.168.1.19
Et là, plantage direct, j'obtiens l'erreur: Erreur de segmentation (core dumped)
Je note que la commande ${INSTALLDIR}/bin/eibd --help fonctionne correctement. Une commande ne comprenant pas l'option -i ou une adresse ip provoque un message d'erreur cohérent, signalant l'erreur de syntaxe. Toute commande comprenant -i et ipt[:quelque soit l'adresse y compris vide] plante.
Aucun fichier de log n'est créé, ni dans le répertoire KNXDIR, ni dans /var/log
La passerelle ip est pingable en 192.168.1.19.
Après lecture de plusieurs discussions, j'ai effectué la manoeuvre permettant à la passerelle de gérer plusieurs adresses individuelles (appui entre 5 et 10 secondes sur le bouton de programmation). Ceci m'a changé l'adresse individuelle de la passerelle de 15.15.254 en 1.1.112. La passerelle reste accessible à ETS4. Le lancement de eibd provoque le même plantage.

Quelqu'un pourrait-il m'aider à résoudre ce problème qui dépasse mes compétences?
Merci par avance.


Répondre
#2
(29/05/2014, 15:57:14)proof42 a écrit : Installation eibd
------------------
wget http://freefr.dl.sourceforge.net/project...0.5.tar.gz
tar -xzf bcusdk_0.0.5.tar.gz
cd bcusdk-0.0.5/
./configure --enable-onlyeibd --enable-eibnetiptunnel --enable-usb --enable-eibnetipserver --enable-ft12 --prefix=${INSTALLDIR}/ --with-pth=${INSTALLDIR}/
make
make install
cd ..

Try with the attached patch for USB and let us know if it helps

Regards, Othmar


Pièces jointes
.txt   usb.patch.txt (Taille : 394 octets / Téléchargements : 42)
Répondre
#3
Thank you Othmar,

How do I use the patch (sorry, I'm not an expert in building programs)?
Répondre
#4

cd bcusdk-0.0.5/
patch -p1 < patchfilename
Répondre
#5
Thank you, great, it works fine!
I used the patch then built again, and now the eibd daemon works! Linknx daemon too.
Now I have to solve an Apache2 access problem, that didn't exist just after Apache2's installation.
I'll study this this week-end and let you know
Répondre
#6
Hello,
After patching and rebuilding eibd, eibd is running, but il can't connect to the Siemens 148-1AB22.
I used the command: ./eibd -t65535 -i ipt:192.168.1.19
The result is that eibd fails to connect and loops (connectretry loops), as shown below (I stopped eibd after a few loops):
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ ./eibd -t65535 -i ipt:192.168.1.19
Layer 2(088B1668,538AFEB5) Open
Layer 0(088B1B30,538AFEB5) Open
Layer 0(088B1B30,538AFEB5) Openend
Layer 2(088B1668,538AFEB5) Opened
Layer 3(088D2278,538AFEB5) Open
Layer 8(088B1C10,538AFEB5) OpenInetSocket 6720
Layer 8(088B1C10,538AFEB5) InetSocket opened
Layer 4(088F2960,538AFEB5) GroupCacheInit
Layer 1(088B1B30,538AFEB5) Send(020): 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 0(088B1B30,538AFEB5) Send(026): 06 10 02 05 00 1A 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 1(088B1668,538AFEBF) Connectretry
Layer 1(088B1B30,538AFEBF) Send(020): 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 0(088B1B30,538AFEBF) Send(026): 06 10 02 05 00 1A 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 1(088B1668,538AFEC9) Connectretry
Layer 1(088B1B30,538AFEC9) Send(020): 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 0(088B1B30,538AFEC9) Send(026): 06 10 02 05 00 1A 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 1(088B1668,538AFED3) Connectretry
Layer 1(088B1B30,538AFED3) Send(020): 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
Layer 0(088B1B30,538AFED3) Send(026): 06 10 02 05 00 1A 08 01 0A 00 02 0F 0E 58 08 01 0A 00 02 0F 0E 58 04 04 02 00
^CLayer 8(088B1C10,538AFED4) StopServer
Layer 8(088B1C10,538AFED4) Server ended
Layer 4(088F2960,538AFED4) GroupCacheDestroy
Layer 4(088F2960,538AFED4) GroupCacheClear
Layer 3(088D2278,538AFED4) Close
Layer 2(088B1668,538AFED4) Close
Layer 0(088B1B30,538AFED4) Close
Siemens device is pingable at 198.168.1.19.
I've tried to enable multiple personnal adresses and pushed de program button within 5 and 10 sec, but il didn't change anything.
I acceded then to Siemens device with ETS4 under Windows, without problem, ip=198.168.1.19, and personnal adress is now 1.1.136.
I tried then with an usb connection using a Siemens 148-1AB11, activating the connection usb for this device in the virtual machine, but ./findknxusb does'nt find any device.
Have you got ideas?
Répondre
#7
Je ne suis pas sùr que le port soit optionnel:

eibd -d -D -S -T -i ipt:192.x.x.x:3671

Vincent
Répondre
#8
Merci Vincent,
La commande:
./eibd -D -S -T -t65535 -i ipt:192.168.1.19:3671
donne strictement le même résultat que le précédent.
Répondre
#9
Depuis ta machine Ubuntu sous VirtualBox, peux-tu essayer un :
telnet 192.168.1.19 3671

Histoire d'être sûr que le port est bien accessible depuis ta machine virtuelle. S'il n'est pas ouvert tu auras un message d'erreur. S'il est ouvert, un écran noir avec un curseur qui clignote en attendant des commandes.
Répondre
#10
Merci Weevil,
La commande telnet affiche effectivement une erreur après un certain temps:
ubuntu@ubuntu-VirtualBox:~$ telnet 192.168.1.19 3671
Trying 192.168.1.19...
telnet: Unable to connect to remote host: Connection timed out
Quelques infos sur mon réseau: livebox, baie de brassage, pc connecté en filaire
Que dois-je faire pour que le port soit accessible?
Répondre
#11
(03/06/2014, 22:21:58)proof42 a écrit : Que dois-je faire pour que le port soit accessible?
Don't get confused with "telnet". You cannot verify the port like that because it's based on UDP and telnet can only talk over TCP.
But you may still check firewall rules both directions and routing. I just sniffed my network traffic and there are ports 3671 and 3672 involved. BTW: you don't need to specify the port, should be assigned automatically.

Regards, Othmar
Répondre
#12
Thank you,
I'm discovering iptables. Virtualbox/Ubuntu installation is brand new, and it seems that there are no rules blocking anything:
ubuntu@ubuntu-VirtualBox:~$ sudo iptables -L
[sudo] password for ubuntu:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


I've also desactivated Kaspersky Internet Security on Windows, but without more succes with eibd command
Répondre
#13
Thanks Othmar for your remark. There are other tools to test UDP connections :
Have a look here : http://www.thelinuxwiki.in/2013/02/how-t...ivity.html

The nc command seems to match your needs :
nc -vzu 192.168.1.19 3671-3672
@proof42 : what is your Ubuntu virtual machine IP address ?

ifconfig or
ifconfig eth0
Répondre
#14
@Weevil
nc command gives:
----4ubuntu@ubuntu-VirtualBox:~$ nc -vzu 192.168.1.19 3671-3672
Connection to 192.168.1.19 3671 port [udp/*] succeeded!

But Ubuntu virtual machine IP address is 10.0.2.15, is it a problem?
ubuntu@ubuntu-VirtualBox:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:ed:d0:42
inet adr:10.0.2.15 Bcast:10.0.2.255 Masque:255.255.255.0
adr inet6: fe80::a00:27ff:feed:d042/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Packets reçus:1784 erreurs:0 :0 overruns:0 frame:0
TX packets:1120 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:1660820 (1.6 MB) Octets transmis:161280 (161.2 KB)
Répondre
#15
I think so ... should be on the same network (I think). Can you configure it in DHCP in order to get your IP address from the router or force it to be 192.168.1.xx ?
Répondre
#16
Thanks to all, it works!
Ubuntu virtual machine'ip was the problem.
For those who will have the same problem, I did:
- close my Ubuntu virtual machine
- Virtualbox -> Configuration -> Réseau -> onglet 1: I replaced "NAT" with "Accès par Pont"
- then I launched again Ubuntu wm: ip address has changed in 198.168.1.24
Now, when I launch eibd, I can see the knx messages in the terminal
Next step: linknx, knxweb...
Répondre
#17
Congrats Big Grin
Répondre
#18
arf ...

back to basics .. everytime before testing upper layers ..

je pensais que ta vm avait déjà accès au réseau interne.

Content pour toi que cela fonctionne à présent !
Répondre
#19
Et oui, je manque de bases. Et ça se voit pour la suite!
Je passe à linknx.
Je lance le processus par la commande:
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ ./linknx --config=/home/ubuntu/knx/linknx.xml --daemon=/home/ubuntu/knx/linknx.log
et j'obtiens le message d'erreur:
./linknx: error while loading shared libraries: libpthsem.so.20: cannot open shared object file: No such file or directory
Je vérifie, libpthsem.so.20 se trouve dans le répertoire /home/ubuntu/knx/local/lib. Ce fichier est désigné de type "lien vers inconnu". Pour info, j'ai un fichier nommé pthsem-config dans /home/ubuntu/knx/local/bin.
Ai-je fais une erreur quelque part?

Je me réponds à moi-même
Il s'agit de l'omission de la commande: export LD_LIBRARY_PATH=${INSTALLDIR}/lib
Cette commande ne vaut manifestement que pour la session du terminal, et doit être retapée à chaque fois.
J'en viens donc à la suite: utilisation d'Apache2.
J'ai installé apache2 ainsi qu'expliqué plus haut, ainsi que knxweb2.
J'ai accès, par l'intermédiaire d'un navigateur, à apache2 en tapant l'adresse localhost. J'obtiens la page de démarrage générique d'apache2. Mais ceci ne vaut que pour la session ubuntu en cours. Si j'arrête Ubuntu, au prochain lancement, toute tentative de connection à localhost se solde pour un refus d'accès:

Forbidden
You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80

J'ai lu de la doc, c'est assez compliqué. J'ai tenté de modifier des règles d'accès dans le fichier /etc/apache2/apache2.conf, en rajoutant un bloc du type:
<Directory /home/ubuntu/knx/knxweb2>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
puis en rechargeant les fichiers de config (services apache2 reload), mais sans succès.
La commande apache2 -t me donne tout un tas d'erreurs:

ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ apache2 -t
[Wed Jun 04 17:06:59.749393 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Wed Jun 04 17:06:59.752339 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Wed Jun 04 17:06:59.752340 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Wed Jun 04 17:06:59.752341 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Wed Jun 04 17:06:59.752341 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Jun 04 17:06:59.767355 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Jun 04 17:06:59.767861 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Jun 04 17:06:59.767979 2014] [core:warn] [pid 4866] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

Apparemment, ma configuration est mauvaise.
Quelqu'un peut-il encore m'aider?
Répondre
#20
Ne serait-ce pas un problème d'utilisateur ? Quand ça fonctionne (tu as la page par défaut d'apache), tu lances apache en étant quel user (avec un sudo? en étant connecté en root ?) ?
Quand tu redémarres, tu es connecté avec quel user ? as-tu créé un script de démarrage automatique d'Apache ?
Répondre
#21
Quand ça fonctionne, c'est après l'installation, apache2 s'est lancé tout seul.
Quand ça fonctionne pas, c'est la même chose, c'est lancé automatiquement.
J'ai effectué les commandes suivantes

ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ service apache2 stop
* Stopping web server apache2 *
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ ps -aux | grep apache
root 1229 0.0 0.3 102060 13048 ? Ss 11:40 0:01 /usr/sbin/apache2 -k start
www-data 1244 0.0 0.1 102124 4496 ? S 11:40 0:00 /usr/sbin/apache2 -k start
www-data 1245 0.0 0.1 102124 4496 ? S 11:40 0:00 /usr/sbin/apache2 -k start
www-data 1246 0.0 0.1 102124 4496 ? S 11:40 0:00 /usr/sbin/apache2 -k start
www-data 1247 0.0 0.1 102124 4496 ? S 11:40 0:00 /usr/sbin/apache2 -k start
www-data 1248 0.0 0.1 102124 4496 ? S 11:40 0:00 /usr/sbin/apache2 -k start
www-data 2789 0.0 0.1 102124 4496 ? S 12:36 0:00 /usr/sbin/apache2 -k start
ubuntu 5204 0.0 0.0 4704 824 pts/9 S+ 17:32 0:00 grep --color=auto apache
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ sudo service apache2 stop
* Stopping web server apache2 *
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ ps -aux | grep apache
ubuntu 5239 0.0 0.0 4700 820 pts/9 S+ 17:32 0:00 grep --color=auto apache
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ service apache2 start
* Starting web server apache2 AH00112: Warning: DocumentRoot [/home/ubuntu/knx/knxweb2/html] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
*
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
ubuntu@ubuntu-VirtualBox:~/knx/local/bin$ sudo service apache2 start
* Starting web server apache2 AH00112: Warning: DocumentRoot [/home/ubuntu/knx/knxweb2/html] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
*

Dois-je en déduire que apache2 est lancé automatiquement en tant que root (il semble ne s'arrêter qu'avec sudo).
Le lancement sans sudo échoue, et celui avec sudo signale une erreur
Répondre
#22
(04/06/2014, 16:39:30)proof42 a écrit : Dois-je en déduire que apache2 est lancé automatiquement en tant que root (il semble ne s'arrêter qu'avec sudo).
Le lancement sans sudo échoue, et celui avec sudo signale une erreur
Every service using a port <1024 needs to be started as root. So either use sudo or login as root. While booting all the scripts are started by the init process run under root. Most of the processes are then turned over to run with reduced priviledges with some service user id.

When working with Apache better always check the configuration first and reload it afterwards. You can do this by using the apachectl tool:
- sudo apachectl configtest
- sudo apachectl restart

The AH00558 message line is normal in the Ubuntu default configuration when reverse dns lookup for your IP-address does not return a FQDN. It's only a warning. You can omit it by adding this line somewhere (put it as last line) in the apache2.conf:
ServerName put.your.servername.here

bonne chance.
Othmar
Répondre
#23
Thank you,
I'll study to find how to do. I hope I come soon, probably this week-end to tell you if I succeded. And learn linknx too...
Répondre
#24
Hello,

Dans tes erreurs, je vois une IP en 127.0.1.1, ce qui n'est pas correct.
Soit tu utilises l'IP de ta VM (192.168.1.19) soit l'IP générique locale 127.0.0.1

Je ne pense pas que ce soit la source de ton tes problèmes mais ça supprimera au moins un message d'erreur.

Un autre message pas "normal", c'est : "DocumentRoot [/home/ubuntu/knx/knxweb2/html] does not exist"
Il n'a pas l'air de trouver ce répertoire, peux tu vérifier l'endroit où tu as placer knxweb2 ?

Vincent
Répondre
#25
Bonsoir et merci à tous,
Ca y est, étape franchie. L'erreur principale venait du fichier knxweb.conf, dont la ligne DocumentRoot /home/ubuntu/knx/knxweb2/html devait être remplacée par la ligne DocumentRoot /home/ubuntu/knx/knxweb2/ (merci vf62!)
J'avais aussi modifié quelques autorisations d'accès aux répertoires dans apache2.conf, mais je pense que ça n'a pas été utile, ce n'était pas véritablement un problème de configuration d'apache2.
J'accède maintenant à l'interface web de knxweb2. J'arrive pas encore à allumer la lampe de la cuisine, mais comme vous m'avez donné vos lumières, ce n'est pas trop grave!
Répondre


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)