ホームオートメーションプログラム「要求されたアドレスを割り当てることはできません」が、Raspberry PiでVNC経由で実行している場合にのみ

ホームオートメーションプログラム「要求されたアドレスを割り当てることはできません」が、Raspberry PiでVNC経由で実行している場合にのみ

に接続しようとしています。プログラムVNCを介してLANからラジエータバルブに接続された「キューブ」(MAX eQ-3)を検索します。

プログラムは、「[99]ソケットのバインド中に要求されたアドレスを割り当てることができません」というエラーを表示します。

ラップトップでプログラムを実行すると、問題はなく、すべてがうまく動作します。

そのため、VNC経由で接続する場合にのみエラーが発生します。

tightvncserver私は次のパラメータを使用してRaspberry Pi 2で実行しています。

/usr/bin/tightvncserver :1 -geometry 1024x600 -depth 24 -dpi 96* 

この問題をどのように解決するのかわかりません...

エラーメッセージイメージ


これは max_home_automation を実行する前の出力です。

pi@HomeBox2:~/vnc-server $ sudo netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      1000       36997      7448/Xtightvnc      
tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN      1000       36995      7448/Xtightvnc      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          8339       366/sshd            
tcp6       0      0 :::8080                 :::*                    LISTEN      0          9866       367/domoticz        
tcp6       0      0 :::22                   :::*                    LISTEN      0          8341       366/sshd            
tcp6       0      0 :::6144                 :::*                    LISTEN      0          9868       367/domoticz        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          5855       405/dhcpcd          
udp        0      0 192.168.1.120:123       0.0.0.0:*                           106        5947       391/ntpd            
udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          8319       391/ntpd            
udp        0      0 0.0.0.0:123             0.0.0.0:*                           0          8306       391/ntpd            
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           105        6915       266/avahi-daemon: r 
udp        0      0 0.0.0.0:40423           0.0.0.0:*                           105        6917       266/avahi-daemon: r 
udp6       0      0 fe80::63a3:60e5:29b:123 :::*                                106        5901       391/ntpd            
udp6       0      0 ::1:123                 :::*                                0          8321       391/ntpd            
udp6       0      0 :::123                  :::*                                0          8303       391/ntpd            
udp6       0      0 :::36032                :::*                                105        6918       266/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                105        6916       266/avahi-daemon: r 

実行後は次のようになります。

pi@HomeBox2:~/vnc-server $ sudo netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      1000       36997      7448/Xtightvnc      
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      1000       64705      13932/max_home_auto 
tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN      1000       36995      7448/Xtightvnc      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          8339       366/sshd            
tcp6       0      0 :::8080                 :::*                    LISTEN      0          9866       367/domoticz        
tcp6       0      0 :::22                   :::*                    LISTEN      0          8341       366/sshd            
tcp6       0      0 :::6144                 :::*                    LISTEN      0          9868       367/domoticz        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          5855       405/dhcpcd          
udp        0      0 192.168.1.120:123       0.0.0.0:*                           106        5947       391/ntpd            
udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          8319       391/ntpd            
udp        0      0 0.0.0.0:123             0.0.0.0:*                           0          8306       391/ntpd            
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           105        6915       266/avahi-daemon: r 
udp        0      0 0.0.0.0:40423           0.0.0.0:*                           105        6917       266/avahi-daemon: r 
udp6       0      0 fe80::63a3:60e5:29b:123 :::*                                106        5901       391/ntpd            
udp6       0      0 ::1:123                 :::*                                0          8321       391/ntpd            
udp6       0      0 :::123                  :::*                                0          8303       391/ntpd            
udp6       0      0 :::36032                :::*                                105        6918       266/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                105        6916       266/avahi-daemon: r 

これは何も返しません。

pi@HomeBox2:~/vnc-server $ sudo netstat -ulpen | awk '$1 !~ /^udp/ {print}; $4 ~ /:23272$/ {print}'
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    

ベストアンサー1

「最大!」ソフトウェアは、ポート23272でUDPマルチキャストを使用して「Cube」(ソース:彼らの文書de.eq3.max.al.local.finder.CubeFinder(ドイツ語)およびJavaクラス用のデコンパイルされたコードソフトウェア)。

表示されるエラーはプログラムがポートにバインドできないため、他のプログラム(別のプログラムまたは同じプログラムの別のインスタンス)がそのポートを使用しているように見えます。

ポート23272を使用しているプロセスを確認するには、次の手順を実行します。

netstat -ulpen | awk '$1 !~ /^udp/ {print}; $4 ~ /:23272$/ {print}'

プログラムが失敗したRaspberry Piから。
すべてのプロセス名とPIDを表示するには、root権限で実行する必要があります。

また、「MAX!」を実行して、端末で(デスクトップ/メニューショートカットの代わりに)ソフトウェアを開いて印刷できるすべての情報を表示できますstdout

おすすめ記事