0

I am trying to connect to a program through VNC, which scans the LAN for a "Cube" (MAX eQ-3) which connects to my radiator valves.

The program gives the error "[99] Cannot assign requested address, when binding the socket".

When I run the program on my laptop, there are no problems, and everything works.

So, it only gives an error when connecting through VNC.

I am running tightvncserver on a Raspberry Pi 2, with the following parameters:

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

I have no clue how to solve this…

Picture of error message


Here is output before executing 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 

And here after executing :

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 

This gives nothing return :

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
    Looks like the program is trying to bind to a network address that doesn't exist or a port that is already in use (by a different program or another instance of the same program). Are you sure there aren't any other instances of the program running? You can check the output of netstat -tulpen on the Raspberry Pi to see which ports are used by which processes (you'll only see the processes when running it with root privileges, though). – n.st Apr 2 '16 at 15:24
  • 1
    I've decompiled their Java code and it looks like they're trying to bind to port 23272 on every active network interface. So if anything else is using that port (again, see netstat), that will fail. You can also try running the program from a terminal, it should print some more verbose information to stdout. – n.st Apr 2 '16 at 15:41
  • 1
    … or I could have just read their documentation on their used port numbers. Oh well… – n.st Apr 2 '16 at 15:47
  • It is not EQ3 program, i am using, it's this one here dmitry-kazakov.de/ada/max_home_automation.htm#2 – Jesperlykke Apr 2 '16 at 17:54
1

The "MAX!" software uses UDP multicast on port 23272 to discover "Cubes" in the local network segment (as evident from their documentation (in German) and the decompiled code of the de.eq3.max.al.local.finder.CubeFinder class from their Java software).

The error you're seeing indicates that the program couldn't bind to that port, so something else seems to be using it (either a different program or another instance of the same program).

To check what process is using port 23272, run

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

on the Raspberry Pi where the program is failing.
To see all process names and PIDs, you might need to run it with root privileges.

Additionally, you can start the "MAX!" software from a terminal (instead of the desktop/menu shortcut) to see any information it might print to stdout.

  • Hi... and thanx so far! – Jesperlykke Apr 2 '16 at 16:35
  • Alright, preserving @Jesperlykke's reply in case it gets removed: fpaste.org/348717/61652114 – n.st Apr 2 '16 at 17:03
  • @Jesperlykke From that output it looks like the port isn't actually occupied by anything. The only other reason for the error that I can think of would be if the program tries to use an inactive network interface. Can you paste the output of ip addr, please? – n.st Apr 2 '16 at 17:05
  • Here you go... sry. i am new here : pastebin.com/8cH6gRcf – Jesperlykke Apr 2 '16 at 17:29
  • @Jesperlykke the expected approach if for you to add the information to your question so it's easily visible to everyone, and not "hidden" in the comments. – roaima Apr 2 '16 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.