-
Notifications
You must be signed in to change notification settings - Fork 18
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
No space left on device ffmpeg? #15
Comments
If you |
Appreciate all your help on this! I did a docker system prune and then also added in a volume mapping for ./tmp -> /tmp (like your fork), and it seemed to stop erroring on space. However, you're correct that there are no log entries for analysis, and subsequently, nothing showing up in the UI for detections. birdnetserver is running (I think?):
The logs I've provided have all been from the attached output of docker compose up, for what it's worth. Would the analysis lines show up there? |
And I ran out of space again, this time after far more recordings. tmpfs raised to 64MB this time. I'm guessing what's happening is, the recordings are being made, but not analyzed, so the raw recordings are never being rotated out and whatever the size of tmpfs is, will eventually be exhausted. I see the initial task created to loop through the recordings:
But can't seem to find where it's falling over. I wonder... is config.py, at the root of the birdcage_backend container in use? Because It's still leveraging that 192.168.1.75 address...hmmm
|
You will eventually want to unwind this. You must have been looking at my unpatched main branch. Long term you do not want to be writing the temporary data to disk. You are running out of space as the files are not being analyzed and removed. And it does not take long to fill up a 16mb buffer...
I agree, looks like the analysis server is up. But the data is not making it to the analysis server. You sure you got things mapped in your |
Yeah, I walked back the /tmp thing. We're good there. Only thing I can think - while the birdnetserver container is running port 8080 internally, it's advertising to the host on 7667. Birdcage is pointing at the host IP address on that port 7667 for the analysis server. Which, seems correct, but I'm admittedly not expert on docker networking. My compose file looks like this (this server IP that runs docker is 192.168.111.170)
And docker ps brings the following:
|
Everything looks OK to me in that screenshot. You able to publish a snip of your |
FYI: The values in config.py are overridden by environment variables set in the docker-compose file. I have the defaults set to values that work in my test environment. Start with getting the birdnet-analyzer service running. If it is working correctly, you should be able to do a wget from the command line of your server to http://(analyzer ip address):(analyzer port)/healthcheck and get back a json string like {"msg": "Server is healthy."} Once you have that working, put that IP address and port into the docker compose file for ANALYZE_SERVER and ANALYZE_PORT. Feel free to share your whole docker-compose file. We'll get it going I have no doubt. Later today I'll push up an image of the analyzer so you can avoid that step. If and when the BirdNET folks start providing images themselves I'll switch. |
I just added the birdnetserver container to the docker compose. I suspect the networking is acting as an isolating factor between your app, and the birdnetserver:
Note I changed the driver from bridge to host. This doesn't seem to have made a difference either way. Of note, if I play with the port number for ANALYZE_PORT (setting it to the birdnetserver container's internal 8080 port), I get a hard failure during docker compose up:
So I would assume that the absence of this error means it is connecting successfully / can see the server. So...yeah. I'm confused. :) Also, yes, I get the server healthy message when browsing to the appropriate URL. |
The backend shouldn't be trying to hit port 8080... it should be trying to hit port 7667. Let me look to see if I screwed something up. |
Sorry, I was just playing around trying things. I set it to 8080 to see what happens and it indeed errored. |
If you hit http://192.168.111.170:7667/predictedspecies?latitude=35.86264&longitude=-86.66016&week_number=21&sf_thresh=0.03 in your browser do you get a bunch of data back? |
In your docker compose you have "driver: host" ... not sure that's what you want. Probably bridge. It should still work, but... |
Yeah, I switched it back to bridge. Doesn't seem to make a difference either way. |
Ok. Now try http://192.168.111.170:7007 - does a page with some API documentation come up? |
The back end server is supposed to spin up one task per stream, and one task to handle analysis. The analysis task monitors for files in the tmp directory and, pulls in some metedata from the database, calls the analysis service, stores results as necessary, and deletes the input file from the tmp directory. I'm not understanding why that isn't working. Can you verify that there is a db directory in the directory where your docker compose file is? And that in this db directory is a file called birdcage.db and it has a non 0 size? |
Yes sir - swagger comes up!
Latest logs:
Running from docker-compose.yml file:
|
After "recording successful" you should see some output from the analysis task indicating that it is working on the wav files, which you are not.... Do you have multiple streams defined? If so, could you try with just one? Assuming that doesn't tell us anything I'll add some additional debugging messages later today to see if we can figure out what's happening. Also, I assume you aren't getting any mp3s in the dectections folder correct? |
I just stopped and destroyed all containers, and redeployed fresh. Added back in a single RTSP stream, CTRL-C'd out, then started back up. Correct, no .mp3s which makes sense given that it seems that analysis isn't happening on the .wav's created.
I can bash into the birdnetserver container and run the client.py script successfully...so it looks like something just isn't being called birdcage->birdnetserver. Again - really appreciate the work on this! |
Sure - if you are having this problem then other people will have this problem. I'll add some debugging messages later on. Works fine on my machine :) |
I can certain spin up another Linux host and try there. I’m an old RHEL stodger and I know Centos/Alma aren’t preferred for docker. (Despite docker supposedly being independent from the underlying OS. Hi Java! Don’t systemd me, bro. ;)
Will try something fresh and report back.
One Q; do you put birdnet server in the same compose file/network ?
…Sent from my iPhone
On May 23, 2023, at 11:26 AM, mmcc-xx ***@***.***> wrote:
Sure - if you are having this problem then other people will have this problem. I'll add some debugging messages later on.
Works fine on my machine :)
—
Reply to this email directly, view it on GitHub<#15 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABRHNAXI5B2SBCYKSF5IPTLXHTQENANCNFSM6AAAAAAYL6DAXU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#15 (comment)", "url": "#15 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
I don't but I should and I will when I finally push an image.
I once sold Bob Young, founder of Red Hat, a typewriter. I bring this up whenever someone mentions red hat. |
Just tried a fresh Ubuntu 22 VM. Birdnetserver doesnt start due to this:
and so everything cascades from there. :) |
Ah ha. So it appears that BirdNET had a commit kahst/BirdNET-Analyzer@81052b8 that changed all that typing, so I grabbed the previous version of config.py from there and then it all works great. SO. With all of that, on my new ubuntu22 VM.....drumroll? IT WORKS!
|
Phew. Ok that emphasizes the need for a known good image of the analyzer. I'll push one later today and update the docer-compose. Thanks for the troubleshooting. |
My pleasure! Is there a lag where it takes a bit for detections to show up on the main web page? |
I think I've spoken too soon. Back to original behavior, even with the new setup! I added cameras 2 and 3 and it just gets in its recording loop. I removed cams 2 & 3, and it's back to analyzing. :) |
Ok, good to know! I never actually tested it with multiple cameras :) I'll
get on that tonight.
…On Tue, May 23, 2023 at 2:13 PM yetdog ***@***.***> wrote:
I think I've spoken too soon. Back to original behavior, even with the new
setup! I added cameras 2 and 3 and it just gets in its recording loop.
I removed cams 2 & 3, and it's back to analyzing. :)
—
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKBEDJGZ3Q35VUATFNNKJTXHT44VANCNFSM6AAAAAAYL6DAXU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
OK - I pushed new images and posted a new docker-compose file that I think will address both problems. I think the issue with the multiple cameras was that I hadn't configured celery to have enough worker processes. Now by default there are 10, which I think should handle 8 streams. Maybe 7. But more than 1. I also push an image for the analyzer service |
I think this is fixed, so I'm closing the issue. If I'm wrong feel free to open another one. |
A couple of minutes after starting the app:
Clearly I have plenty of space. Odd!
The text was updated successfully, but these errors were encountered: