fail to upload image: {:error, :connect_timeout}

Hello, My farmbot can not take photo with the camera, every time I tried to take photo or try to calibrate the camera, an error message appears in the logs fail to upload image: {:error, :connect_timeout}. I guess maybe there is a connection problem between the farmbot and the server, since I live in China so I tried VPN /Shadowsockets, doesn’t work. - I’m sure the camera itself works just fine because plug the camera on my laptop and the it works perfectly.
Does anyone have a solution for this problem? My farmbot serial number is FB8365

Hi There

First question, and just starting with the basics, are you able to access my.farm.bot and have a reliable connection to your device?

If so, go to the console and up in the top right there is network connection.

Get your pings up to at least 30 and take a screenshot and paste it on this thread.

Melbourne, AU


Thanks for the reply, is there anything wrong? my.farm.bot login is fine, every other function works fine except the camera

Ok. Your network is not the greatest, but it does appear to be stable.

Have you been able to calibrate the camera or obtain any image out of it under any circumstances?

Have you upgraded to the latest version of FB OS? Some earlier versions had camera issues.

Have you tries the most basic camera functions?

Have you reseated the camera connector on the PI board?

There is 2 or 3 photos were captured during my 50-60 trys and there is no certain pattern to follow. I’ve updated the firmware(FB OS) reconnect the camera and everything. I’ve spoken to some other users in China, they have the same problem, they said farmbot use google service which is blocked here in China to store the photo or something like that maybe that’s why. Maybe we have to deploy the platform locally.

Thanks

  1. FarmBot uses different back-end services for different features
  • Command/telemetry traffic → Web-app (Heroku) & MQTT broker (Digital Ocean)
  • Photo uploads → Google Cloud Storage bucket FarmBot Forum
  1. Google’s storage endpoints (https://storage.googleapis.com/...) are aggressively throttled or reset by the Great Firewall. Small control packets still get through (so pings/WebSockets show 100 % OK) but the TLS session carrying a multi-MB JPEG stalls until FarmBot OS gives up and returns connect_timeout.

  2. AWS-hosted services (CloudFront, S3, etc.) show the same pattern: traffic is randomly rerouted to the US or dropped, giving very high latency and poor throughput.

This is hard to fix. Try dropping the resolution. It might work but I am not sure of a fix.

Thanks for looking into my questions, based on other local users’ feedback and the information you just provided, I’m pretty sure we have to deploly it local, :unamused_face:. If Google Cloud is the back-service for photos it is not stable here for obvious reasons and I’ve tried to lower the resolution but not help.

Which brings up another question, if we deploy the platform on cloud here in China, like using a Chinese cloud server, is it possible that we just use a different photo storage service otherthan GoolgeCloud?

Look at the FarmBot-Web-App repository on GitHub . . you’ll see that Google Cloud Storage is widely used.
If you self-host the Web App then you could (conceivably) modify the Web App code to use a new Cloud Storage API (?)

Image uploads on Farmrbot are indeed a problem in China. I can’t upload images to Google’s servers on the Raspberry Pi. All other functions are normal.

My current solution is to set up my own local server, which is functioning normally and uploading images.

If I were to set up my own cloud server, would image uploads also be automatically routed to my own server? I haven’t delved into the code, so I’m not entirely sure.

If the domain isn’t internal to Farmrbot, and images are being received using a local server address, setting up your own server would be a more suitable option, whether locally or in the cloud.

Farmbot-Web-App/config/storage.yml at staging · FarmBot/Farmbot-Web-App · GitHub This configuration description does indeed build a local server and save it on your own server

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.