Go Down

Topic: Linino Locks up after ~12-24 hours Running php Script every minute (Read 19614 times) previous topic - next topic

whisprer


Please post output of

Code: [Select]
cat /etc/config/network



sonnyyu, thank you so much for all your time. Looking around the forum I can see that you are very helpful to people on the board. Now that I can connect to the Yun in the field and have another one to test with, I am implementing the DHCP fix on all of them... I think that is the issue. When we were talking before I was unable to fix the remote located one. I was a bit confused on DHCP... I know what DHCP is, but wasn't thinking straight. Even though the router sets up a 'static' IP for the Yun, the Yun is still behaving as DHCP from its perspective. I will report back to confirm this. It's glad a fix was found (the link you provided), but it's frustrating that OpenWRT/Yun was released like this with such an obvious problem on the LAN. Hopefully not too many other people consume so much time by dealing with this issue.

Code: [Select]
root@yun03:~# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.240.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'
        option metric '10'

whisprer

#31
Mar 25, 2014, 02:28 pm Last Edit: Mar 25, 2014, 03:30 pm by whisprer Reason: 1
UPDATE: Looks like everything is working now!

I have changed
Code: [Select]
dhcp.script on all my Yuns, but I am still not getting a proper route:

Code: [Select]

root@yun03:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     10     0        0 eth1
192.168.240.0   *               255.255.255.0   U     0      0        0 wlan0


Is there anything else I have to do other than edit dhcp.script and give the Yun a reboot? When does dhcp.script run? At startup or when a connection is initiated?

Code: [Select]
setup_interface () {
proto_init_update "*" 1
proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}"
# TODO: apply $broadcast

for i in $router; do
proto_add_ipv4_route 0.0.0.0 0 "$i"
           route add -net 0.0.0.0/0 gw "$i"
done


UPDATE: It looks like the problem was from not directly following instructions... I have a habit of using Notepad++ for editing files, but in this case it added an undesirable "^M" to the end of the line above the one added to dhcp.config.

Some final questions: The "/" in the line added looks out of place. Should it be a " " instead, or does it not matter?

Is dhcp.script not wiped and reloaded when "resetting to factory settings"? Because the Yun that I updated and had a "^M" did not have its ethernet connection fixed after a full reset.

sonnyyu

#32
Mar 25, 2014, 04:50 pm Last Edit: Mar 25, 2014, 04:55 pm by sonnyyu Reason: 1
Code: [Select]
config interface 'wan'
       option ifname 'eth1'
       option proto 'dhcp'
       option metric '10'


You are on dhcp.  You could change it to static IP address.

Code: [Select]
config interface 'wan'
       option ifname 'eth1'
       option 'proto' 'static'
       option 'ipaddr' '192.168.0.239'
       option 'netmask' '255.255.255.0'
option 'gateway' '192.168.0.1'
option 'dns' '8.8.8.8'


Never use windows app to edit Linux config file, you must be comfortable to use vi (some time vi is only one  available), after Linux box up online then you could install nano (very closed to notepad).

Chagrin


Some final questions: The "/" in the line added looks out of place. Should it be a " " instead, or does it not matter?


The "0.0.0.0/0" is CIDR notation. In this case it would be the full range of addresses (0.0.0.0 to 255.255.255.255).

sonnyyu

One more thought:

Turn off Wifi if you don't use it.

AR9331 (the heart of Yun) has a hardware bug where spurious RF ( WIFI reset ) emissions affect the USB PLL.  Of course, Qualcomm Atheros will not acknowledge it as a critical bug as they found a software workaround for it.

http://forum.arduino.cc/index.php?topic=193540.msg1532112#msg1532112

whisprer

The issue appears to be solved. I now have 4 Yuns set up and not losing eth1 after router DHCP lease time expires.
My solution was to use the DHCP fix linked to by Sonnyyu earlier in this thread. I prefer to not set up static from the Yun side because the ethernet devices I will connect to may vary in their IP ranges.

This issue should really be publicized clearly, perhaps in "Getting Started with Yun" or similar. I realize it is an issue with OpenWRT, but the reality is that most users expect to be able to run the Yun for extended periods of time (days, weeks, months, even years) with a reliable ethernet connection.

Sonnyyu, thanks again for the help. You turned a potentially unsolvable problem for me into one that only took a few days!

Jantje

@whisprer
Please add it to the FAQ http://playground.arduino.cc/Hardware/Yun#.UzMOu_GlDPE I'm quite willing to test and proof read.

Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

keebOo

I have a similar problem with wifi  (no eth) that hangup after a while, there is a way to solve it with wifi?
(php website on yun, after a while, dosen't answer at all or sometimes after 10/15 seconds.)


The issue appears to be solved. I now have 4 Yuns set up and not losing eth1 after router DHCP lease time expires.
My solution was to use the DHCP fix linked to by Sonnyyu earlier in this thread. I prefer to not set up static from the Yun side because the ethernet devices I will connect to may vary in their IP ranges.

sonnyyu

You need to tell us either network drop out or php website (uhttpd) time out.
In network drop out case either Yun drop out from network completed or Yun drop out internet connection only?
In php website ( uhttpd) time out case either maximum number of concurrent requests is over or script_timeout  is over?
Did you test with ethernet?


keebOo

Hi, I'm here again (see answer only now, forgot 'Notify me of replies.' option), then...


You need to tell us either network drop out or php website (uhttpd) time out.
In network drop out case either Yun drop out from network completed or Yun drop out internet connection only?
In php website ( uhttpd) time out case either maximum number of concurrent requests is over or script_timeout  is over?
Did you test with ethernet?


Network drop out. I can't connect to YUN (website on SD nor to /cgi-bin/luci/webpanel/homepage)
I use the myArduinoName.local to connect.

Not fully tested on ETH (I'm doing this now)

Find also the "option max_requests 2"  on /etc/config/uhttpd .... can I change? how many?
(the interface could be used by more concurrent users... to be safe I think 4)

Changing to ETH I find also something strange:
--> wifi connect to my router (with static IP)
--> eht connect to my router (with obviously different static IP)
--> change the redirect (meta refresh on index html inside www pointing to sd)
Result:
1) if I point to IP (wifi/eth) it redirects to /cgi-bin/luci/webpanel/homepage
2) if I point to myNameArduino.local it redirects (correctly) to sd

for static ip I change only /etc/config/network in this way

Code: [Select]
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option proto 'static'       
        option ipaddr '192.168.1.203'                 
        option netmask '255.255.255.0'                       
        option gateway '192.168.1.1'                               
        option dns '192.168.1.1' 

config interface 'wan'
        option ifname 'eth1'
        option proto 'static'       
        option ipaddr '192.168.1.103'                 
        option netmask '255.255.255.0'                       
        option gateway '192.168.1.1'                               
        option dns '192.168.1.1' 



sonnyyu

#40
Apr 08, 2014, 04:04 pm Last Edit: Apr 08, 2014, 04:07 pm by sonnyyu Reason: 1
After modify uhttp or web file:

Code: [Select]
/etc/init.d/uhttpd  restart
clear browser cache! restart browser.


Test Yun in network:

At computer:
Code: [Select]
ping arduino.local

Test Yun in internet:

At Yun console:
Code: [Select]
ping sun.com

keebOo


After modify uhttp or web file:

Code: [Select]
/etc/init.d/uhttpd  restart
clear browser cache! restart browser.


Test Yun in network:

At computer:
Code: [Select]
ping arduino.local

Test Yun in internet:

At Yun console:
Code: [Select]
ping sun.com


All done.... but...
I try more days to be sure to had all the things in the correct way, but still *freeze*.

This is my SET:
- dedicated router, disconnected from internet (192.168.1.1)
- 3 yun with fixed ip (101, 102, 103), connected via eth
- disabled wifi ( edited /etc/config/wireless to disabled, and add comment on /etc/rc.local)

The problem:
--> at start, perfect answer on single website (one for each yun, on SD), and quickly answer to REST command
--> after 12 hours:
1) no answer form REST command
2) websites still alive (php)
3) config panel yun still alive
(try also to restart webserver /etc/init.d/uhttpd restart)
(hung up "python bridge.py" from advanced-panel/processes get message from REST "Could not connect to YunServer 146 Connection refused")



sonnyyu



Go Up