([quote=“jada4p, post:14, topic:16573, full:true”]
MOX classic 0.5 GB, 2x WiFi, HBS branch, Sentinel, Haas, simple config. Reboot problem persisting, HaaS not working. Other OK.
TO 2GB, 2x WiFi, HBK branch, Sentinel, HaaS, RIPE Atlas, simple config. HaaS not working. Other OK.
[/quote])
HaaS seems not to work (at least for me)… Latest entry were on 2021-12-30 for my TO (on HBK branch, i.e. up to date on daily changes), or on 2022-01-19 for my MOX (on HBS branch, i.e. on stable version of TOS this ntime).
Even though I changed HaaS token for both devices (more times, to be sure), nothing has changed, i.e. no new data.
Working here, but HaaS sometimes randomly stops, mostly after phyton errors.
It also has trouble here to start after a reboot, both on MOX and TO2016 ( latest OS, simple setup and config )
What i did was to add this cron job in Luci> System> scheduled tasks :
0 */6 * * * /etc/init.d/haas-proxy reload
so, if it for whatever reason stops running, this will reload/start it every 6 hours ( again)
Unfortunately it didn’t help. HaaS still not working, last entry: 2021-12-30.
(TO 2GB, 2x WiFi, HBK branch - i.e. now at ver. 5.3.6, Sentinel, HaaS, RIPE Atlas, simple config)
Do you need any more info?
I had similar problem - “haas” process was running, but no new entries on https://haas.nic.cz/device.
And connection to port 22 was not working.
I had to restart “haas” manually:
/etc/init.d/haas-proxy stop
/etc/init.d/haas-proxy start
Thanks to your hints I found that there is no HaaS process running. Only after this I searched system log for any message regarding HaaS… Sorry it didn’t come to my mind sooner: I found source of my trouble with HaaS.
It’s, as in most cases, user fault - my fault: instead of specifying log file in HaaS config, I errorneously set log directory thus HaaS started but crashed on this error.
After correcting HaaS config and restarting haas-proxy there was no error message and haas process is running… and there are new sessions displayed on HaaS My Honeypot device page for my Omnia.
I have the same thing occur randomly. After a time, it just starts logging again. I just noticed that the last entries on my account are from September 2021.
As far as HaaS could sometimes stop working, I created small script which checks whether HaaS (haas-proxy) is working, and in case not, restart it. This script could be run by cron (with option -s and maybe -l)… I’d like to publish it for anyone use… Feel free to use/modify it as you like
checkHaaS.sh
# checkHaaS.sh (c) jada4p v2 20220222
# check whether HaaS is running, restart it when not
SILENT=NO
LOG=NO
LOGFILE=`awk -v FS="\'" '/log / { print $2 }' /etc/config/haas`
#LEVEL=`awk -v FS="\'" '/log_level / { print $2 }' /etc/config/haas`
#TOKEN=`awk -v FS="\'" '/token / { print $2 }' /etc/config/haas`
#echo LOGFILE=$LOGFILE
#echo LEVEL=$LEVEL
#echo TOKEN=$TOKEN
for i
do
case $i in
-i) # -----------------------------------help
echo "checkHaaS.sh check whether HaaS is running, restart it when not"
echo "checkHaaS.sh -s silent - no runtime comments"
echo "checkHaaS.sh -l log actions"
exit
;;
-s) # -----------------------------------silent
SILENT=YES
;;
-l) # -----------------------------------log
LOG=YES
if [ "$LOGFILE" = "" ]
then LOGFILE="/var/log/messages"
fi
;;
*) echo "invalid parameter(s), aborted"
/root/checkHaaS.sh -i
exit
;;
esac
done
# ---------------------------------------------------------check proxy pid
if [ "$SILENT" = "NO" ]
then echo "Checking if exist haas-proxy PID"
fi
if [ ! -s /var/run/haas-proxy.pid ]
then if [ "$SILENT" = "NO" ]
then echo "HaaS is not running, no haas-proxy PID, starting it"
fi
/etc/init.d/haas-proxy reload
/etc/init.d/haas-proxy start
if [ "$LOG" = "YES" ]
then DATE=`date +"%Y-%m-%d %T %Z"`
MSG="checkHaaS: no PID found, HaaS restarted"
echo "$DATE $MSG" >> $LOGFILE
fi
else if [ "$SILENT" = "NO" ]
then echo "HaaS is running, haas-proxy PID found"
fi
fi
# ---------------------------------------------------------check process
if [ "$SILENT" = "NO" ]
then echo "Checking if there is HaaS process"
fi
sleep 10 # for some reason PID file is not found when testing
# immediately after restart
if [ $(ps `cat /var/run/haas-proxy.pid` | grep token | wc -l) -ne 1 ]
then if [ "$SILENT" = "NO" ]
then echo "HaaS is not running, starting it"
fi
/etc/init.d/haas-proxy reload
/etc/init.d/haas-proxy start
if [ "$LOG" = "YES" ]
then DATE=`date +"%Y-%m-%d %T %Z"`
MSG="checkHaaS: no process found, HaaS restarted"
echo "$DATE $MSG" >> $LOGFILE
fi
else if [ "$SILENT" = "NO" ]
then echo "HaaS is running"
fi
fi
Note there are some commented lines on beginning of script, they were used for debugging and left for possible future use. The script is supposed to reside in /root directory.
I too have experienced problems with nothing being logged to the HaaS site for my Turris Omnia. Some details:
Device Turris Omnia
reForis version 1.1.2
Turris OS version 5.3.5
Turris OS branch HBS
Kernel version 4.14.264
I have generated a token on haaz.nic.cz and specified the token in reForis → Sentinel → HaaS. I’ve tried multiple times generating a new token and setting that. But to no avail, as I continue to get the message “No sessions in specified interval.” on haas.nic.cz.
With the log class set to “debug” in the script /etc/init.d/haas-proxy I see the following in the system logs:
root@turris:/tmp/log# grep haas *
messages:Mar 3 13:17:19 turris haas-proxy-start[18297]: 2022-03-03T08:17:19 INFO twisted twistd 19.10.0 (/usr/bin/python3 3.7.12
) starting up.
messages:Mar 3 13:17:19 turris haas-proxy-start[18297]: 2022-03-03T08:17:19 INFO twisted reactor class: twisted.internet.epollre
actor.EPollReactor.
messages:Mar 3 13:17:19 turris haas-proxy-start[18297]: 2022-03-03T08:17:19 INFO twisted ProxySSHFactory starting on 2525
messages:Mar 3 13:17:19 turris haas-proxy-start[18297]: 2022-03-03T08:17:19 INFO twisted Starting factory <haas_proxy.proxy.Prox
ySSHFactory object at 0x24…>
I’m definitely not ruling out any user error at this stage. I once upon a time had the HaaS working and could see many attempts being made. Is there any other information that I can provide here to help debug this?