technion / lol_dht22

A Raspberry Pi DHT22/AM2302 polling application
81 stars 64 forks source link

Lock file is in use, waiting... #2

Closed shrx closed 11 years ago

shrx commented 11 years ago

I got this error today, and now it appears constantly. I don't receive any usable data anymore. Tried recompiling the program, but it's still the same.

sudo ./loldht
Raspberry Pi wiringPi DHT22 reader
www.lolware.net
Lock file is in use, waiting...
Lock file is in use, waiting...
Lock file is in use, waiting...
technion commented 11 years ago

Sorry I missed this post! Looks like something got killed at some point without releasing a lock. Try to rm this file: /var/run/dht.lock Make sure loldht isn't running when you do that.

shrx commented 11 years ago

Yes, I think I fixed it this way later that day.

shrx commented 11 years ago

Hmm I got this error again, and simply removing dht.lock does not fix it.

technion commented 11 years ago

If you look at ps -waux do you see an orphaned copy of the application running?

shrx commented 11 years ago
ps waux | grep dht
pi       32445  0.0  0.3   4088   800 pts/0    S+   18:27   0:00 grep --color=auto dht

Looks like no process is detected. Running sudo loldht produces a list of Data not good, skipping messages.

shrx commented 11 years ago

I tried to recompile, and noticed something interesting. configure lists that wiringPi is not detected, but I have it installed. Could this be the problem?

sudo ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking wiringPi usability... no
checking wiringPi presence... no
checking for wiringPi... no
checking /usr/local/include/wiringPi.h usability... yes
checking /usr/local/include/wiringPi.h presence... yes
checking for /usr/local/include/wiringPi.h... yes
checking for wiringPiSetup in -lwiringPi... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
shrx commented 11 years ago

Well I don't know how, because I'm on vacation, but after three days (the script with loldht is called every 5 minutes with a cronjob), it fixed itself without me doing anything. I still think this should be looked into though.