QUOTE(Froot @ Aug 8 2013, 05:06)
However, after a few hours the pi just freezes with no errors in the logs whatsoever (I'm running it headless).
I encountered a similar issue with my [
archlinuxarm.org]
PogoPlug v3 and did [
archlinuxarm.org]
some research on the matter.
For the Raspberry Pi, [
stevenhickson.blogspot.com]
try adding:
1) "vm.min_free_kbytes = 16384" to /etc/sysctl.conf
2) "smsc95xx.turbo_mode=N" to /boot/cmdline.txt
If that doesn't work, or if you have a mind-boggling problem like I do, characterized by:
1) Having all network activity spontaneously die (connections reset, only responds to pings thereon)
2) Zero entries in the log indicating what could possibly be wrong
3) Being left with a neutered, but otherwise functioning system
Downgrading kernels doesn't help.
Tweaking the TCP buffer size doesn't help.
Switching between Sun/Oracle Java and OpenJDK doesn't help.
Using a Debian rootfs doesn't help. (And it results in horrible performance, btw)
I'm guessing a USB Ethernet adapter might solve the issue, but I can't be arsed to try any further.
The TCP stack would just die at some point between six hours and three days.
I don't have a serial cable to do further investigation, so my workaround was to schedule a reboot every 12 hours.
Incidentally, these reboots help keep Hamachi tunnels from going stale, if you have that running as well.
---
Anyways, my setup process for H@H on Arch Linux ARM + PogoPlug v3 is as follows.
(I run everything as root. You probably shouldn't.)
In summary this will:
- Set up Java
- Set up H@H to run in a detached screen on startup
- Set up scheduled reboots twice a day, at noon and midnight.
Setting up Java:
1) Extract ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz
2) Move contents to /usr/lib/java/
3) ln -s /usr/lib/java/bin/java /usr/bin/java
Extract a copy of H@H to /root/HentaiAtHome/, but note that Java won't run on 128MB of RAM alone.
We'll need to set up a swap file:
CODE
#create swapfile 2gb
dd if=/dev/zero of=/root/swapfile.img bs=1M count=2048
mkswap /root/swapfile.img
#turn on swap
swapon /root/swapfile.img
#check if it's enabled
free
#enable on reboot
echo "/root/swapfile.img none swap sw 0 0" >> /etc/fstab
Setting up H@H to run on startup.
I wanted it to run in screen, rather than as a daemon. To do this, I used /etc/rc.local:
CODE
#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
screen -dmS hath
screen -S hath -X screen bash /root/HentaiAtHome/runme.sh
Contents of runme.sh:
CODE
#!/bin/bash
cd /root/HentaiAtHome/
java -jar HentaiAtHome.jar --disable_bwm --disable_logging --skip_free_space_check --use_more_memory
Setting up the scheduled reboots:
1) Run crontab -e
2) Insert:
CODE
01 00,12 * * * /sbin/shutdown -r +1
00 00,12 * * * screen -S hath -X quit
There are probably a hundred better ways to do this sort of thing, but hey, it works. Good enough for me.
---
And a picture of the final product, for the hell of it.