#Need to restart crowsnest service every time for camera to show.

1 messages · Page 1 of 1 (latest)

heavy cobalt
#

On boot, the camera is not working (black screen with FPS:00).
Go to services control, stop, start and working...

I've uploaded the log.
Version: v4.0.2-0-gb0c011b

turbid warren
#

Pretty obvious error --- [05/25/23 20:53:20] crowsnest: DEBUG: ustreamer [cam 1]: -- ERROR [19.074 main] -- Can't bind HTTP on [127.0.0.1]:8080: Success

#

So, therefor look which service blocks this port

heavy cobalt
#

Nothing is using this port

#

And again, if I stop and re-run the service, then is working fine

turbid warren
#

Then I am a bit out of knowledge, because its an ustreamer error. Crowsnest itself only starts it with the parameters set in your conf.

#

What makes me wondering is [warn] getaddrinfo: address family for nodename not supported, never saw that before but google doesnt spit anything

heavy cobalt
#

I know this is not helpful, but it was working fine with crowsnet 3.x

turbid warren
#

v3 also uses ustreamer v5.38

#

As said crowsnest v4 had changes but those only apply to RPI Sbc with MainsailOS and RaspiOS not ubuntu

heavy cobalt
#

I will try to downgrade... let you know in a moment

turbid warren
#

You could try to use an older version of ustreamer.

#

I think it was somewhat around 5.1 on our buster images

#

Downgrading to v3 makes no sense because it will always us the latest ustreamer version

#

As said that isnt a crowsnest error, it is an ustreamer error

heavy cobalt
#

downgrade to 3.0.7.3 and working

turbid warren
#

Then stick with it 🤷‍♂️
I didnt change anything in startup behavior for ustreamer

#

So, I have no clue why you got this issue. As said, latest changes does not apply to non RPI SBC

heavy cobalt
#

I just wanted to help in locating the possible bug... It is weird

turbid warren
#

I appriciate your help, I would cancle it out if there where something different between this two versions, but it isnt. Feel free to compare libs/ustreamer.sh from those versions

heavy cobalt
#

I've update again and stop working... looool

turbid warren
#

Do you use a raspicam?

#

The only thing that changed in that regard. it skips the check for a raspicam, maybe that tiny bit of missing delay leads to that behavior ^^

#

Try to use /dev/v4l/by-id/usb-9726-200619_Integrated_Camera-video-index0 as device path and see if this changes behavior

heavy cobalt
#

Nope... I'm using an unknown brand cam

turbid warren
#

I am wondering if it could be the missing delay

#

Let me prepare a test branch

#

Try branch test/delayubuntu

#

its basicly v4 with an sleep in init stream if host is ubuntu arm

#

Would be funny if that works ^^

heavy cobalt
#

ok, Testing

#

compiling

#

rebooting

#

Same error

#

[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: Parameters: --host 127.0.0.1 -p 8080 -d /dev/video0 --device-timeout=2 -m MJPEG --encoder=HW -r 1280x720 -f 15 --allow-origin=* --static /home/pi/crowsnest/ustreamer-www
[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: -- INFO [17.705 main] -- Starting PiKVM uStreamer 5.38 ...
[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: -- INFO [17.705 main] -- Using internal blank placeholder
[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: -- INFO [17.705 main] -- Enabling HTTP file server: /home/pi/crowsnest/ustreamer-www
[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: [warn] getaddrinfo: address family for nodename not supported
[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: -- ERROR [17.706 main] -- Can't bind HTTP on [127.0.0.1]:8080: Success
[05/25/23 22:01:14] crowsnest: ERROR: Start of ustreamer [cam 1] failed!
[05/25/23 22:01:15] crowsnest: ... Done!

#

Version: v4.0.2-1-gcbee6ed

turbid warren
#

let me see what else i changed

#

How are the startup times if you compare v3 and v4 logs?

heavy cobalt
#

There are both uploaded...

#

I have seen that in the boot log, when it fails, it appears:

[05/25/23 22:01:14] crowsnest: DEBUG: ustreamer [cam 1]: [warn] getaddrinfo: address family for nodename not supported

#

If I stop and rerun the crownsnet service, this message is not showing... I don't know if this is important or not

turbid warren
#

Which leeds me to the assumption that the network is not coming up fast enough

#

Reading about that message on Stackoverflow it is basicly missing localhost resolution

#

So, my assumption was it needs some kind of delay

heavy cobalt
#

but on the service start it is wanted the network-online.target. I thought that's what it was for

#

And the most curious thing... why doesn't it fail on the 3x? This is what drives me crazy

turbid warren
#

Welcome to the club ...

heavy cobalt
#

Anyway... Thank you very much for all your effort and interest

#

If I can be of any help to you, just let me know.

turbid warren
#

Would be great if you could open an Issue with all those logs on git repo, easier for me to keep track of

heavy cobalt
#

For sure!

turbid warren
#

And please dont close the post for now. Maybe I find something

heavy cobalt
#

Nope... It will be open, of course!

#

Ok... I think that's it

#

I have set the same thread name for the issue

turbid warren
#

Perfect. Thank you

heavy cobalt
#

Let me know if I can help you in any way... 👍

severe vale
#

Following… 💪🏼 the exact same thing it happen to me with a Logitech usb cam.

hot perch
#

Could be anything as you gave zero information, please open another post or read through the other nearly 30 threads on that topic

heavy cobalt
#

There is a workarount to get the 4 version working on this systems. Here is how: