EmeraldDeer
Very Senior Member
If it happens again, I will check /jffs/scripts/nat-startWeird, it's created via nat-start so should persist
Code:
# cat /jffs/scripts/nat-start
#!/bin/sh
/jffs/scripts/ntpmerlin ntpredirect # ntpMerlin
If it happens again, I will check /jffs/scripts/nat-startWeird, it's created via nat-start so should persist
# cat /jffs/scripts/nat-start
#!/bin/sh
/jffs/scripts/ntpmerlin ntpredirect # ntpMerlin
Try inserting at the top of nat-startIf it happens again, I will check /jffs/scripts/nat-start
Code:# cat /jffs/scripts/nat-start #!/bin/sh /jffs/scripts/ntpmerlin ntpredirect # ntpMerlin
sleep 10
Lot happening on reboot, even when just looking at ntp, nat and firewallMay 24 13:11:28 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
May 24 13:11:29 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
has to be where the issue is happening... it happens when you sometimes make adjustments in the router that involve this restarting.
May 5 01:05:21 router ntpd: Started ntpd
May 23 21:45:20 router ntp: Initial clock set
May 23 21:45:20 router rc_service: ntpd_synced 1944:notify_rc restart_stubby
May 23 21:45:20 router rc_service: ntpd_synced 1944:notify_rc restart_diskmon
May 23 21:45:20 router rc_service: waitting "restart_stubby" via ntpd_synced ...
May 23 21:45:24 router S77ntpd: Waiting for NTP to sync before starting...
May 23 21:45:24 router ntpd[2349]: ntpd [email protected] Thu Mar 21 09:03:59 UTC 2019 (1): Starting
May 23 21:45:24 router ntpd[2349]: Command line: ntpd -c /jffs/configs/ntp.conf -g
May 23 21:45:24 router ntpd[2360]: proto: precision = 0.200 usec (-22)
May 23 21:45:24 router ntpd[2360]: switching logging to file /opt/var/spool/ntp/ntp.log
May 23 21:45:31 router rc_service: udhcpc 2615:notify_rc start_firewall
May 23 21:45:32 router custom_script: Running /jffs/scripts/service-event (args: start firewall)
May 23 21:45:32 router nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
May 23 21:45:32 router custom_script: Running /jffs/scripts/nat-start
May 23 21:45:32 router rc_service: waitting "start_firewall" via udhcpc ...
May 23 21:45:32 router rc_service: udhcpc 2615:notify_rc stop_ntpd
May 23 21:45:32 router rc_service: waitting "start_firewall" via udhcpc ...
May 23 21:45:32 router rc_service: waitting "start_firewall" via udhcpc ...
May 23 21:45:32 router custom_script: Running /jffs/scripts/firewall-start (args: eth0)
May 23 21:45:35 router rc_service: udhcpc 2615:notify_rc start_ntpd
May 23 21:45:35 router rc_service: waitting "stop_ntpd" via udhcpc ...
May 23 21:45:35 router custom_script: Running /jffs/scripts/service-event (args: stop ntpd)
May 23 21:45:36 router custom_script: Running /jffs/scripts/service-event (args: start ntpd)
May 23 21:45:36 router ntpd: Started ntpd
May 23 21:45:53 router YazFi: Firewall restarted - sleeping 60s before running YazFi
May 23 21:45:55 router rc_service: udhcpc 2615:notify_rc start_firewall
May 23 21:45:55 router custom_script: Running /jffs/scripts/service-event (args: start firewall)
May 23 21:45:55 router nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
May 23 21:45:55 router custom_script: Running /jffs/scripts/nat-start
May 23 21:45:55 router ntpMerlin: Lock file found (age: 23 seconds) - stopping to prevent duplicate runs
May 23 21:45:55 router custom_script: Running /jffs/scripts/firewall-start (args: eth0)
May 23 21:50:00 router ntpMerlin: Stale lock file found (>120 seconds old) - purging lock
imagine how much more will be going on at reboot when you add that sleep 5 or sleep 10 option.Lot happening on reboot, even when just looking at ntp, nat and firewall
Code:May 5 01:05:21 router ntpd: Started ntpd May 23 21:45:20 router ntp: Initial clock set May 23 21:45:20 router rc_service: ntpd_synced 1944:notify_rc restart_stubby May 23 21:45:20 router rc_service: ntpd_synced 1944:notify_rc restart_diskmon May 23 21:45:20 router rc_service: waitting "restart_stubby" via ntpd_synced ... May 23 21:45:24 router S77ntpd: Waiting for NTP to sync before starting... May 23 21:45:24 router ntpd[2349]: ntpd [email protected] Thu Mar 21 09:03:59 UTC 2019 (1): Starting May 23 21:45:24 router ntpd[2349]: Command line: ntpd -c /jffs/configs/ntp.conf -g May 23 21:45:24 router ntpd[2360]: proto: precision = 0.200 usec (-22) May 23 21:45:24 router ntpd[2360]: switching logging to file /opt/var/spool/ntp/ntp.log May 23 21:45:31 router rc_service: udhcpc 2615:notify_rc start_firewall May 23 21:45:32 router custom_script: Running /jffs/scripts/service-event (args: start firewall) May 23 21:45:32 router nat: apply nat rules (/tmp/nat_rules_eth0_eth0) May 23 21:45:32 router custom_script: Running /jffs/scripts/nat-start May 23 21:45:32 router rc_service: waitting "start_firewall" via udhcpc ... May 23 21:45:32 router rc_service: udhcpc 2615:notify_rc stop_ntpd May 23 21:45:32 router rc_service: waitting "start_firewall" via udhcpc ... May 23 21:45:32 router rc_service: waitting "start_firewall" via udhcpc ... May 23 21:45:32 router custom_script: Running /jffs/scripts/firewall-start (args: eth0) May 23 21:45:35 router rc_service: udhcpc 2615:notify_rc start_ntpd May 23 21:45:35 router rc_service: waitting "stop_ntpd" via udhcpc ... May 23 21:45:35 router custom_script: Running /jffs/scripts/service-event (args: stop ntpd) May 23 21:45:36 router custom_script: Running /jffs/scripts/service-event (args: start ntpd) May 23 21:45:36 router ntpd: Started ntpd May 23 21:45:53 router YazFi: Firewall restarted - sleeping 60s before running YazFi May 23 21:45:55 router rc_service: udhcpc 2615:notify_rc start_firewall May 23 21:45:55 router custom_script: Running /jffs/scripts/service-event (args: start firewall) May 23 21:45:55 router nat: apply nat rules (/tmp/nat_rules_eth0_eth0) May 23 21:45:55 router custom_script: Running /jffs/scripts/nat-start May 23 21:45:55 router ntpMerlin: Lock file found (age: 23 seconds) - stopping to prevent duplicate runs May 23 21:45:55 router custom_script: Running /jffs/scripts/firewall-start (args: eth0) May 23 21:50:00 router ntpMerlin: Stale lock file found (>120 seconds old) - purging lock
Zilch/nada/nowtimagine how much more will be going on at reboot when you add that sleep 5 or sleep 10 option.
+===apply:nat===+ +===nat-start===+
| |
| |
| Insert rules
| |
| +===nat-start===+
|
|
Initialise rules
|
+===apply:nat===+
+===apply:nat===+ +===nat-start===+
| |
| |
| sleep 10
| |
| |
| |
| |
Initialise rules |
| |
+===apply:nat===+ |
|
|
|
Insert rules
|
+===nat-start===+
that way you do not have to add sleep commands to an already time consuming process.
I have been looking for a place to put that sleep 15 option..Zilch/nada/nowt
Currently the timing of the asynchronous requests is:
Code:+===apply:nat===+ +===nat-start===+ | | | | | Insert rules | | | +===nat-start===+ | | Initialise rules | +===apply:nat===+
With the addition of the 'sleep 10', we are not contributing to the system load ( assuming that the 'sleep' function isn't using old-skool spin-loop, but IRQ method), in fact rather than running concurrent tasks, we are now serialising the execution, so in all probability, actions performed by nat-start will execute quicker (less wall-clock time) as we have delayed its execution until the frenzy of competing tasks has dramatically subsided and there are more available cpu cycles.
Code:+===apply:nat===+ +===nat-start===+ | | | | | sleep 10 | | | | | | | | Initialise rules | | | +===apply:nat===+ | | | | Insert rules | +===nat-start===+
NOTE: Whilst not ideal, the use of judicious 'sleep' commands to alleviate/accomodate race-conditions is an accepted necessary evil in programming.
P.S. Surely spawning a separate task to monitor the existence of the custom rules created in nat-start would be wasteful?
However, it's up to @RMerlin to evaluate if delaying the execution request of nat-start is a viable solution? - whoah, wait a minute......does that involve a 'sleep'?![]()
May 25 11:01:57 miniupnpd[6314]: upnp_event_recv: recv(): Connection reset by peer
May 25 11:01:57 miniupnpd[6314]: upnpevents_processfds: 0x2c198, remove subscriber uuid:dfa95978-19f0-4b68-b715-c88c46a8edfd after an ERROR cb: http://192.168.1.64:2869/upnp/eventing/susxmlkqkh
Does this happen on the stable (i.e. non-alpha) firmware?okay so i toggled on and off the Upnp feature and i lost my prerouted traffic
View attachment 17787
Yes I have had it happen on the 384.11 build as well, just didnt know what caused it.Does this happen on the stable (i.e. non-alpha) firmware?
I reconfigured to use this pool and removed all of the servers. So far, so good. Thanks!
We use essential cookies to make this site work, and optional cookies to enhance your experience.