YAMon 3.4.7 doesn't start up after boot


#1

@al_c I'm using YAMon 3.4.7 on OpenWrt 18.06.1 on an Archer C7

I downloaded and ran the install.sh script to install it in /opt without surprise. YAMon started up and began to collect traffic data as expected.

I had a power failure a couple days after, and yamon didn't seem to start up. I re-ran the install script, and it began to collect data again.

I just rebooted the router, and the connection to http://192.168.1.1/yamon again gives The requested URL /yamon/ was not found on this server.

How can I make it so that YAMon starts up after a reboot? Thanks.


#2

Rather than re-running the install script you can simply run startup.sh (by default in /opt/YAMon3/)

Did you run the install script in basic or advance mode? (Can you send me your setup log? It should be in /opt/YAMon3/logs). In theory, the install script should create an auto-start entry (by default in basic mode and with a prompt in advanced mode). The restart entry should get created in /etc/init.d/... can you check that location for an entry named yamon3... does it exist? what does the file contain? Does it have proper execute permissions?

Past versions of the setup script contained a typo which prevented the creation of the /etc/init.d/ directory if it did not already exist but that was fixed some time ago and should not be in setup3.4.7.sh (AFAIR).

Let me know if this helps.

Al


#3

Yes, /opt/YAMon3/startup.sh causes YAMon to work as expected. Here's the setup log file:

root@OpenWrt:/opt/YAMon3# cat logs/setup3.4.7.log
10:04:12\t1\t
********************************************************
2019-02-24 10:04:12 --> Launched setup.sh - v3.4.7
10:04:12\t1\tBaseline settings: `/opt/YAMon3/default_config.file`
10:04:12\t1\tRouter Model: TP-Link Archer C7 v2 archer-c7
10:04:12\t1\tInstalled firmware: OpenWrt 18.06.1 r7258-5eb055306f
	  t_installmode --> b	(accepted current)
10:04:27\t1\tInstall mode: b
	  _wwwData --> data3/	(accepted current)
	  _firmware --> 1	(typed 1)
	  _ispBillingDay --> 1	(typed 1)
	  _monthlyDataCap --> 0	(accepted current)
	  _unlimited_usage --> 0	(accepted current)
	  _wwwURL --> /yamon	(accepted current)
10:04:57\t1\tSymbolic Link created --> /www/user to /tmp/www
10:04:57\t1\tReports URL: http://192.168.253.1/user/index.html
	  _dnsmasq_conf --> /tmp/etc/dnsmasq.conf	(accepted current)
	  _dnsmasq_leases --> /tmp/dhcp.leases	(accepted current)
10:04:57\t1\tCreated and saved settings in new file: `/opt/YAMon3/config.file`
10:04:58\t1\tChanged `/tmp/www/` permissions to: `775`
10:04:58\t1\tChanged `/opt/YAMon3/www` permissions to: `775`
10:04:58\t1\tCreated YAMon init script in
	  t_launch --> 1	(accepted default)
10:05:02\t1\tLaunched
14:25:51\t1\t
********************************************************
2019-02-26 14:25:51 --> Launched setup.sh - v3.4.7
14:25:51\t1\tBaseline settings: `/opt/YAMon3/config.file`
14:25:51\t1\tRouter Model: TP-Link Archer C7 v2 archer-c7
14:25:51\t1\tInstalled firmware: OpenWrt 18.06.1 r7258-5eb055306f
14:26:52\t1\t
********************************************************
2019-02-26 14:26:52 --> Launched setup.sh - v3.4.7
14:26:52\t1\tBaseline settings: `/opt/YAMon3/config.file`
14:26:52\t1\tRouter Model: TP-Link Archer C7 v2 archer-c7
14:26:52\t1\tInstalled firmware: OpenWrt 18.06.1 r7258-5eb055306f
	  t_installmode --> b	(accepted current)
14:27:11\t1\tInstall mode: b
	  _firmware --> 1	(typed 1)
	  _ispBillingDay --> 1	(accepted current)
	  _monthlyDataCap --> 0	(accepted current)
	  _unlimited_usage --> 0	(accepted current)
	  _wwwURL --> /yamon	(accepted current)
14:27:26\t1\tPath found OK for /www/yamon --> no link needed
14:27:26\t1\tReports URL: http://192.168.253.1/yamon/index.html
	  _dnsmasq_conf --> /tmp/etc/dnsmasq.conf	(accepted current)
	  _dnsmasq_leases --> /tmp/dhcp.leases	(accepted current)
14:27:26\t1\t  >>> Copy from /opt/YAMon3/config.file to /opt/YAMon3/config.old successful (0)
14:27:26\t1\tUpdated existing settings: `/opt/YAMon3/config.file`
14:27:28\t1\tChanged `/tmp/www/` permissions to: `775`
14:27:28\t1\tChanged `/opt/YAMon3/www` permissions to: `775`
14:27:28\t1\tCreated YAMon init script in
	  t_launch --> 1	(accepted default)
14:27:32\t1\tLaunched
root@OpenWrt:/opt/YAMon3#

/etc/init.d/yamon3 exists, and appears to be executable:

root@OpenWrt:/opt/YAMon3# ls -al /etc/init.d/yamon3
-rwxr-xr-x    1 root     root           345 Feb 26 14:27 /etc/init.d/yamon3
root@OpenWrt:/opt/YAMon3# cat /etc/init.d/yamon3
#!/bin/sh /etc/rc.common
START=99
STOP=10
start() {
	# commands to launch application
	if [ -d /tmp/YAMon3.4-running ]; then
		echo Unable to start, found /tmp/YAMon3.4-running directory
		return 1
	fi
	/opt/YAMon3/startup.sh 10 &
}
stop() {
	/opt/YAMon3/shutdown.sh
	return 0
}
restart() {
	/opt/YAMon3/restart.sh
	return 0
}
boot() {
	start
}
root@OpenWrt:/opt/YAMon3#

What other information can I provide? Thanks.

Rich