Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.2 possible runaway on openwrt r18xxx #11

Closed
wulfy23 opened this issue Jan 19, 2022 · 4 comments
Closed

2.2.2 possible runaway on openwrt r18xxx #11

wulfy23 opened this issue Jan 19, 2022 · 4 comments

Comments

@wulfy23
Copy link

wulfy23 commented Jan 19, 2022

hello

just reporting a possible runaway issue on openwrt master
(likely due to 2.2.2 (could be 2.2.1 also I suppose) but I could be wrong... could be a master thing from the last few months)

https://forum.openwrt.org/t/rpi4-community-build/69998/1973?u=wulfy23

basically, it seems like a condition occurs where your script enters a (fast) loop
not sure of it's 'bouncing' with mwan or something...

dnsmasq goes crazy and just reloads continuously...

feel free to close this if i'm wrong, as i'm not a user of your script it could be
user error... but I still think your script (or mwan?) can use a 'backoff'+log/better-detect
looping (if my findings are correct)

Tue Jan 18 14:41:08 2022 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 6 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 2 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 6 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 2 addresses
Tue Jan 18 14:41:09 2022 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 6 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 2 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 6 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 2 addresses
Tue Jan 18 14:41:10 2022 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses

i'm not sure if 'noresolv' or dns problems are also causing / playing a part in this

@kopijahe
Copy link
Owner

Hello,

From what I read, the user is using the script wrong.

They're not supposed to use -z in /etc/rc.local, that parameter only used to trigger manual login. The correct way is explained in my blog post (step no. 16): https://blog.kopijahe.my.id/posts/autologin-kopijahe/

Login fail with status User anda sedang aktif (your account is currently active) means either the account is stuck in the login server (because they did not logout before changing IP, need 24 hours to release) or they used shaddy account (most likely abused kampus account which sold again and again to different buyer).

The fix for the first issue is implemented in the script as follows: it will try to logout the account first, and then try to login again. Sometimes we need to logout several times before it will successfully login again. And sometimes in the nth try, we get another error, which then trigger ifup on the interface.

Regarding the reboot command, as you can see, it only will be executed when there's a second login fail with SSID Tidak Sesuai (wrong SSID is detected) status and the user is on wms network using a router which doesn't have a permanent MAC address (usually by using Bolt BL100/BL201), if their rpi4 reach all of this requirements, well...

@wulfy23
Copy link
Author

wulfy23 commented Jan 19, 2022

ok, thankyou kopijahe very much for the input + feedback

sorry to have 'jumped to conclusion' about your script

(dnsmasq problems must be ujail related or something ~ not directly a runaway issue with the script)

@wulfy23 wulfy23 closed this as completed Jan 19, 2022
@zakeru46
Copy link

Hello, iam user in that question. it seems i misunderstood your parameter regarding -z switch. i just want to print output from the script (berhasil login atau tidak) to syslog message. Originally, i run the script with cron tab to manually execute in periodic time (with -z switch). Therefore, i thought it is just a matter moving the command from cron tab to rc.local.
I used smartbisnis account bought from shopee seller, and from my observation, i got 1h lease of ip address, and need to relog again after 24h period. Hence, i placed the script within cron tab. Also, i rarely got problem despite having status user anda sedang aktif (maybe because same ip?), i can still ping 1.1.1.1 without problem.
Anyway, thanks for explaining and sorry for the fuss i make.

@kopijahe
Copy link
Owner

@zakeru46: just FYI, smartbisnis is being deprecated by Telkom. There currently no way to extend the account past the current active period anymore. There's so much problem with the account leading to this day (like for quite some time, you need to login -> logout -> login to use the account. Login just once will not give you internet connection). I might remove the support for it in my script too later this year.

Also, Telkom is known to mess with 1.1.1.1 ping result (sometimes 8.8.8.8 too, but it's rare nowadays), I wouldn't recommend using it to track internet connection. You can try ping that address while logged out, you should still be able to do that even though you doesn't have internet connection.

In fact, I removed it from kopijahe 1.9.9. Maybe use OpenDNS or Quad9 IPs for connection tracking instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants