Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2015-11-01 15:10:04

contactform
Member
Registered: 2015-10-30
Posts: 45

Socket error while downloading

I was downloading a project but received a message "socket error".

Please advice; see attached screenshot.
mini_Rex.jpg

Last edited by contactform (2015-11-01 15:10:54)

Offline

#2 2015-11-01 15:16:22

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

This means that opening a connection to RexCore on the target device failed. Double check your IP address setting. Try if you can ping the target device.

I suppose you are running the demo version so it might have timed-out (2-hour limit). Try restarting it and you should be fine.

Offline

#3 2015-11-01 19:54:49

contactform
Member
Registered: 2015-10-30
Posts: 45

Re: Socket error while downloading

Hi,
I did restart application + checked IP address...still do not work

Offline

#4 2015-11-01 20:03:18

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

What application did you restart? You have to restart RexCore on your Raspberry Pi (simply reboot it).

Can you ping the Raspberry Pi from your PC? Can you login e.g. via PuTTy? What is your IP address and netmask? How do you know the IP address of the Raspberry Pi?

Did the connection ever work?

Please paste here the output of the following command on your Raspberry Pi:

ps ax

Offline

#5 2015-11-01 23:01:34

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Socket error while downloading

My Pi has a static ip address. Everything worked fine before; I was downloading a project/ task and received the error message. I rebooted the pi several times; I can also ping the pi and log in with putty.

Offline

#6 2015-11-02 00:28:14

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Socket error while downloading

2 ?        S      0:00 [fsnotify_mark]
   23 ?        S<     0:00 [nfsiod]
   29 ?        S<     0:00 [kthrotld]
   30 ?        S<     0:00 [VCHIQ-0]
   31 ?        S<     0:00 [VCHIQr-0]
   32 ?        S<     0:00 [VCHIQs-0]
   33 ?        S<     0:00 [iscsi_eh]
   34 ?        S<     0:00 [dwc_otg]
   35 ?        S<     0:00 [DWC Notificatio]
   36 ?        S      0:08 [kworker/u2:1]
   37 ?        S      0:00 [VCHIQka-0]
   38 ?        S<     0:00 [SMIO]
   39 ?        S      0:01 [mmcqd/0]
   40 ?        S<     0:00 [deferwq]
   41 ?        S      0:09 [kworker/u2:2]
   42 ?        S      0:00 [kworker/0:2]
   43 ?        S      0:00 [jbd2/mmcblk0p2-]
   44 ?        S<     0:00 [ext4-rsv-conver]
  159 ?        Ss     0:00 udevd --daemon
  256 ?        S      0:00 [spi0]
  285 ?        S      0:00 udevd --daemon
  293 ?        S      0:00 udevd --daemon
  326 ?        S<     0:00 [cfg80211]
  408 ?        S<     0:00 [kworker/0:1H]
1721 ?        S      0:00 /usr/sbin/ifplugd -i wlan0 -q -f -u0 -d10 -w -I
1727 ?        S      0:01 /usr/sbin/ifplugd -i eth0 -q -f -u0 -d10 -w -I
1736 ?        S      0:00 /usr/sbin/ifplugd -i lo -q -f -u0 -d10 -w -I
1791 ?        Ss     0:00 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant
1923 ?        Ss     0:00 /sbin/wpa_cli -B -P /var/run/wpa_action.wlan0.pid -i
1936 ?        S      0:10 [kworker/u2:3]
2143 ?        Sl     0:00 /usr/sbin/rsyslogd -c5
2155 ?        Ss     0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/t
2209 ?        Ss     0:00 /usr/sbin/cron
2218 ?        Ss     0:00 /usr/bin/dbus-daemon --system
2266 ?        S      0:00 avahi-daemon: running [raspberrypi.local]
2267 ?        S      0:00 avahi-daemon: chroot helper
2308 ?        Sl     0:00 /usr/sbin/lightdm
2332 tty7     Ss+    0:04 /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -noliste
2440 ?        Sl     0:00 lightdm --session-child 11 14
2457 ?        Ss     0:00 dhclient -v -pf /run/dhclient.wlan0.pid -lf /var/lib/
2462 ?        S      0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
2475 ?        Sl     0:00 /usr/sbin/console-kit-daemon --no-daemon
2570 ?        Sl     0:00 /usr/lib/policykit-1/polkitd --no-debug
2585 ?        Ss     0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:107
2634 ?        Ssl    0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
2652 ?        Ss     0:00 /usr/bin/owserver -c /etc/owfs.conf --pid-file /var/r
2686 ?        Ss     0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-s
2692 ?        S      0:00 /usr/bin/dbus-launch --exit-with-session x-session-ma
2699 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
2717 ?        S      0:00 /usr/bin/RexWSTcp
2740 ?        Ss     0:00 /usr/sbin/sshd
2770 ?        S      0:04 Xtightvnc :1 -desktop X -auth /home/pi/.Xauthority -g
2777 ?        S      0:00 openbox --config-file /home/pi/.config/openbox/lxde-p
2779 ?        Sl     0:19 lxpanel --profile LXDE-pi
2786 ?        Sl     0:00 /usr/lib/arm-linux-gnueabihf/lxpolkit
2790 ?        S      0:00 /bin/sh /home/pi/.vnc/xstartup
2798 ?        S      0:00 /usr/bin/ck-launch-session /usr/bin/dbus-launch --exi
2843 tty1     Ss+    0:00 /sbin/getty --noclear 38400 tty1
2844 tty2     Ss+    0:00 /sbin/getty 38400 tty2
2845 tty3     Ss+    0:00 /sbin/getty 38400 tty3
2846 tty4     Ss+    0:00 /sbin/getty 38400 tty4
2847 tty5     Ss+    0:00 /sbin/getty 38400 tty5
2848 tty6     Ss+    0:00 /sbin/getty 38400 tty6
2849 ?        Ss+    0:00 /sbin/getty -L ttyAMA0 115200 vt100
2853 ?        Ss     0:00 /usr/bin/ssh-agent /usr/bin/ck-launch-session /usr/bi
2859 ?        Sl     0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
2862 ?        S      0:00 /usr/bin/dbus-launch --exit-with-session x-session-ma
2863 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
2867 ?        S      0:00 /usr/lib/gvfs/gvfsd
2874 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
2877 ?        Sl     0:00 /usr/lib/udisks/udisks-daemon
2878 ?        S      0:00 udisks-daemon: not polling any devices
2886 ?        S      0:00 openbox --config-file /home/pi/.config/openbox/lxde-p
2888 ?        Sl     0:20 lxpanel --profile LXDE-pi
2895 ?        Sl     0:00 /usr/lib/arm-linux-gnueabihf/lxpolkit
2897 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
2899 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
2904 ?        S      0:00 /usr/lib/gvfs/gvfsd
2911 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
2914 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvf
2917 ?        Sl     0:00 /usr/lib/arm-linux-gnueabihf/libmenu-cache1/libexec/m
2922 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
2925 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
2931 ?        Sl     0:00 /usr/lib/arm-linux-gnueabihf/libmenu-cache1/libexec/m
2938 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvf
2975 ?        S      0:51 Xtightvnc :2 -desktop X -auth /home/pi/.Xauthority -g
2979 ?        S      0:00 /bin/sh /home/pi/.vnc/xstartup
2982 ?        S      0:00 /usr/bin/ck-launch-session /usr/bin/dbus-launch --exi
3004 ?        Ss     0:00 /usr/bin/ssh-agent /usr/bin/ck-launch-session /usr/bi
3009 ?        Sl     0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
3012 ?        S      0:00 /usr/bin/dbus-launch --exit-with-session x-session-ma
3013 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-add
3021 ?        S      0:01 openbox --config-file /home/pi/.config/openbox/lxde-p
3023 ?        Sl     0:25 lxpanel --profile LXDE-pi
3025 ?        Sl     0:18 pcmanfm --desktop --profile LXDE-pi
3030 ?        Sl     0:00 /usr/lib/arm-linux-gnueabihf/lxpolkit
3033 ?        S      0:00 /usr/lib/gvfs/gvfsd
3039 ?        Sl     0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
3043 ?        S      0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
3045 ?        Sl     0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
3050 ?        Sl     0:00 /usr/lib/arm-linux-gnueabihf/libmenu-cache1/libexec/m
3053 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.2 /org/gtk/gvf
3073 ?        Sl     0:00 pcmanfm --desktop --profile LXDE-pi
3124 ?        Sl     0:00 pcmanfm --desktop --profile LXDE-pi
3142 ?        S      0:01 [kworker/0:1]
3257 ?        Sl     0:12 lxterminal
3258 ?        S      0:00 gnome-pty-helper
3259 pts/0    Ss+    0:00 /bin/bash
3591 ?        S      0:00 [kworker/0:0]
3594 ?        Ss     0:00 sshd: pi [priv]
3598 ?        S      0:00 sshd: pi@pts/1
3599 pts/1    Ss     0:01 -bash

Offline

#7 2015-11-02 09:53:13

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

There is no RexCore running on your Raspberry Pi. Try running

sudo runrex

from the command line. Paste here the output.

If you get errors, rename the executive file so that RexCore starts blank.

sudo mv /rex/rexcore/exec.rex /rex/rexcore/exec.bak

Afterwards run

sudo runrex

again. Now you should be able to connect and download your project.

Terminate RexCore by Ctrl+C and paste here the output. This will help in identifying the cause of the problem. Thanks.

Offline

#8 2015-11-04 14:12:09

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Socket error while downloading

Still had errors after but it eventually worked. Thanks,

Can one receive e-mail alerts when using Rex on unipi?

Offline

#9 2015-11-04 19:44:04

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

Glad I could help.

See https://www.rexcontrols.cz/forum/viewto … pid=16#p16 about alerting.

Offline

#10 2015-12-06 15:33:03

hendrik
Member
Registered: 2015-11-01
Posts: 49

Re: Socket error while downloading

Hi, I found that the Lighttpd server is slow on the Raspberry PI, I am not sure if this is down to my hardware/ router etc.

I have setup a button using inkscape and the response time is normally 4sec from button press to relay activation. Is this normal?
Thanks,

Offline

#11 2015-12-07 10:09:40

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

No, that's not normal unless you defined such a slow sampling period. Can you please test the \UniPi_examples\02_ButtonBlink example from our GitHub repository to decide whether the problem is e.g. in your router?

Do you get any errors in the HMI? You would find it in the upper right corner of the HMI.

Offline

#12 2016-04-04 17:15:20

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Socket error while downloading

Today I got the same problem. At a certain moment I was not able to download my project changes anymore. Every Time I got the 'socket error' message.

Connecting through SSH with putty was still possible thus I rebooted my RaspI (terminal) but the problem remained the same.

pi@REXControl ~ $ ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 init [2]
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:00 [ksoftirqd/0]
    5 ?        S<     0:00 [kworker/0:0H]
    6 ?        S      0:00 [kworker/u8:0]
    7 ?        R      0:00 [rcu_preempt]
    8 ?        S      0:00 [rcu_sched]
    9 ?        S      0:00 [rcu_bh]
   10 ?        S      0:00 [migration/0]
   11 ?        S      0:00 [migration/1]
   12 ?        S      0:00 [ksoftirqd/1]
   14 ?        S<     0:00 [kworker/1:0H]
   15 ?        S      0:00 [migration/2]
   16 ?        S      0:00 [ksoftirqd/2]
   18 ?        S<     0:00 [kworker/2:0H]
   19 ?        S      0:00 [migration/3]
   20 ?        S      0:00 [ksoftirqd/3]
   21 ?        S      0:00 [kworker/3:0]
   22 ?        S<     0:00 [kworker/3:0H]
   23 ?        S<     0:00 [khelper]
   24 ?        S      0:00 [kdevtmpfs]
   25 ?        S<     0:00 [netns]
   26 ?        S<     0:00 [perf]
   27 ?        S      0:00 [khungtaskd]
   28 ?        S<     0:00 [writeback]
   29 ?        S<     0:00 [crypto]
   30 ?        S<     0:00 [bioset]
   31 ?        S<     0:00 [kblockd]
   32 ?        S      0:00 [kworker/0:1]
   33 ?        S<     0:00 [rpciod]
   34 ?        S      0:00 [kswapd0]
   35 ?        S      0:00 [fsnotify_mark]
   36 ?        S<     0:00 [nfsiod]
   42 ?        S<     0:00 [kthrotld]
   43 ?        S<     0:00 [VCHIQ-0]
   44 ?        S<     0:00 [VCHIQr-0]
   45 ?        S<     0:00 [VCHIQs-0]
   46 ?        S<     0:00 [iscsi_eh]
   47 ?        S<     0:00 [dwc_otg]
   48 ?        S<     0:00 [DWC Notificatio]
   50 ?        S      0:00 [VCHIQka-0]
   51 ?        S<     0:00 [SMIO]
   52 ?        S<     0:00 [deferwq]
   53 ?        S      0:00 [kworker/u8:2]
   54 ?        S      0:00 [kworker/1:1]
   55 ?        S      0:00 [mmcqd/0]
   56 ?        S      0:00 [jbd2/mmcblk0p2-]
   57 ?        S<     0:00 [ext4-rsv-conver]
   60 ?        S      0:00 [kworker/1:2]
   61 ?        S      0:00 [kworker/2:1]
   74 ?        S      0:00 [kworker/3:1]
  175 ?        Ss     0:00 udevd --daemon
  302 ?        S      0:00 udevd --daemon
  309 ?        S      0:00 udevd --daemon
  386 ?        S<     0:00 [kworker/0:1H]
 1023 ?        S<     0:00 [kworker/1:1H]
 1204 ?        S<     0:00 [kworker/2:1H]
 1526 ?        S      0:00 /usr/sbin/ifplugd -i lo -q -f -u0 -d10 -w -I
 1528 ?        S      0:00 /usr/sbin/ifplugd -i eth0 -q -f -u0 -d10 -w -I
 1770 ?        S      0:00 [kworker/0:2]
 1968 ?        Ss     0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.sock
 2008 ?        S<     0:00 [cfg80211]
 2009 ?        Sl     0:00 /usr/sbin/rsyslogd -c5
 2092 ?        S      0:00 /usr/sbin/cnid_metad -l log_note
 2128 ?        Sl     0:08 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n REXControl
 2130 ?        Ss     0:00 /usr/sbin/cron
 2172 ?        Ss     0:00 /usr/bin/dbus-daemon --system
 2185 ?        S      0:00 /usr/bin/RexWSTcp
 2202 ?        Ss     0:00 /usr/sbin/nmbd -D
 2210 ?        Ss     0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:107
 2242 ?        Ss     0:00 /usr/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/owserver.pid
 2255 ?        S      0:00 avahi-daemon: running [REXControl.local]
 2258 ?        S      0:00 avahi-daemon: chroot helper
 2280 ?        Ss     0:00 /usr/sbin/sshd
 2287 ?        Ss     0:00 /usr/sbin/smbd -D
 2335 ?        S      0:00 /usr/sbin/smbd -D
 2357 ?        S      0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
 2444 ?        Ss     0:00 /sbin/dhcpcd
 2456 ?        S      0:00 sudo python /home/pi/picofssd.py
 2461 ?        Ss     0:00 startpar -f -- rc.local
 2463 ?        S      0:00 python /home/pi/picofssd.py
 2468 tty1     Ss+    0:00 /sbin/getty --noclear 38400 tty1
 2469 tty2     Ss+    0:00 /sbin/getty 38400 tty2
 2470 tty3     Ss+    0:00 /sbin/getty 38400 tty3
 2471 tty4     Ss+    0:00 /sbin/getty 38400 tty4
 2472 tty5     Ss+    0:00 /sbin/getty 38400 tty5
 2473 tty6     Ss+    0:00 /sbin/getty 38400 tty6
 2476 ?        S      0:00 [kworker/2:2]
 2512 ?        Ss     0:00 sshd: pi [priv]
 2516 ?        R      0:00 sshd: pi@pts/0
 2521 pts/0    Ss     0:00 -bash
 2537 ?        S      0:00 [kworker/0:0]
 2539 pts/0    R+     0:00 ps ax

...no REXcore....so tried to restart as described in previous post

pi@REXControl ~ $ sudo runrex
Found PID, but no running RexCore found, removing /var/run/rexcore.pid
[ CORE  ][ INFO  ] ****** Start of REX diagnostics: Date: Mon Apr  4 15:44:56 2016 ******
[ CORE  ][WARNING] Authentication module: File open error
[ CORE  ][WARNING] TARGET DEVICE CAN BE ACCESSED BY ANYONE!
[ CORE  ][WARNING] Swapping configurations
RexCore: terminated by signal 11
Segmentation fault

....

pi@REXControl ~ $ sudo mv /rex/rexcore/exec.rex /rex/rexcore/exec.bak
pi@REXControl ~ $ sudo runrex
Found PID, but no running RexCore found, removing /var/run/rexcore.pid
[ CORE  ][ INFO  ] ****** Start of REX diagnostics: Date: Mon Apr  4 15:46:20 2016 ******
[ CORE  ][WARNING] Authentication module: File open error
[ CORE  ][WARNING] TARGET DEVICE CAN BE ACCESSED BY ANYONE!
[ CORE  ][ ERROR ] Failed to load active configuration: File open error
[ OS    ][WARNING] RexCore: stopped by signal 2
[ CORE  ][WARNING] Swapping configurations
^C[ARCHIVE][ INFO  ] Log archive deleting...
pi@REXControl ~ $ ^C
pi@REXControl ~ $ sudo runrex
[ CORE  ][ INFO  ] ****** Start of REX diagnostics: Date: Mon Apr  4 15:54:11 2016 ******
[ CORE  ][WARNING] Authentication module: File open error
[ CORE  ][WARNING] TARGET DEVICE CAN BE ACCESSED BY ANYONE!
[ CORE  ][ ERROR ] Failed to load active configuration: File open error
[ CORE  ][WARNING] Swapping configurations
RexCore: terminated by signal 11
Segmentation fault

....

.......any idea what could be wrong here?

Last edited by scoobsalamander (2016-04-04 17:16:02)

Offline

#13 2016-04-05 07:12:01

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

Segmentation fault means that RexCore has crashed. This is a serious problem. Can you please send all the project files to support@rexcontrols.com so we can have a look at it a hunt this bug?

On your Raspberry Pi, run

sudo rm /rex/rexcore/exec.rex

and you will be able to run RexCore again.

Offline

#14 2016-04-05 10:45:43

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Socket error while downloading

Yesterday eve I reinstalled everything (fresh REXcontrols and updated to the Jessie distro on my RasPi)

The problem with the socket occurred to me once more in the past. It seems that it is related to the DbDrv driver.
Today I'll try to  provoke the same error and then I'll send you the project files....

(but first I'll backup my SD card... :-) )

Offline

#15 2016-04-11 21:06:32

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Socket error while downloading

...today I had the same problem and it appeared after changing the .rio file from the DbDrv driver.
Before it only contained only code to read data from a database and this was working fine. Now I added some code to store data from REX to my dB but directly after downloading the socket error came up.

After changing the permissions of the database to grant remotely access to the database I was able to connect with REXview again.....so I think it is solved.

Offline

#16 2016-04-12 14:54:23

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Socket error while downloading

Hi scoobsalamander,
thanks for the report! We do not consider this solved by far. Please send us the configuration files which result in the segmentation fault. A description of the changes in the database configuration which made it work will be highly appreciated. Thanks in advance.

Offline

#17 2016-04-12 15:19:45

scoobsalamander
Member
From: Belgium - Hulshout
Registered: 2015-10-27
Posts: 217

Re: Socket error while downloading

mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;

This query I used to give the MySql user, which I'm using for the REXcontrols, the necessary privileges. If you are running the MySQL server on the same PC then you will not have this problem I guess....


If I have some time I'll setup a new database with a new user to try to provoke another socket error. (I'm new to all this so it might take some time....and I don't want to destroy my current project because it is finally working).

I also don't know if I had a segmentation fault last time, I forgot to check.....

To be continued..... :-)

Offline

Board footer

Powered by FluxBB