502 Bad Gateway #284
Replies: 18 comments 27 replies
-
Did you get 502 when you went to the cloud console, or when you went to https://project_id.region_id.r.appspot.com/? If you got the 502 when you went to ...appspot..., check the logs in the cloud console. You might see a stack trace there. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. I got the 502 fixed. And I am able to login
using the FTC fmltc login page. However, I am getting the following error
that I cannot fix for 2 days. I am new to Google Cloud and I appreciate
your help. I got this error right after I sign in in fmltc login page:
Thank you again for your help.
…On Mon, Oct 10, 2022 at 12:55 PM Liz Looney ***@***.***> wrote:
Did you get 502 when you went to the cloud console, or when you went to
https://project_id.region_id.r.appspot.com/?
If you got the 502 when you went to ...appspot..., check the logs in the
cloud console. You might see a stack trace there.
—
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDR265F5L4W2M7EXD3DWCRJ7RANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi, Liz:
I got the following error message:
iam.gserviceaccount.com does not have storage.buckets.get access to the
Google Cloud Storage bucket.'
<https://serverfault.com/questions/1112762/error-iam-gserviceaccount-com-does-not-have-storage-buckets-get-access-to-the-g>
Please see the attached screenshot. Thank you very much!
…On Mon, Oct 10, 2022 at 8:26 PM Liz Looney ***@***.***> wrote:
I don't see what error you got. Did you forget to put it in the message
here?
—
Reply to this email directly, view it on GitHub
<#284 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDR47YI5MJJU4VV6RMTWCS63NANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi, Liz:
This morning I got a different error after I logged in. Please advise or
give some hint where I should start to fix it. Attached is the screenshot:
Thank you very much!
…On Mon, Oct 10, 2022 at 8:26 PM Liz Looney ***@***.***> wrote:
I don't see what error you got. Did you forget to put it in the message
here?
—
Reply to this email directly, view it on GitHub
<#284 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDR47YI5MJJU4VV6RMTWCS63NANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Apparently, github does not accept email attachments. So if you want to attach screenshots, you need to go to this discussion and drag/drop or paste them into a reply message. |
Beta Was this translation helpful? Give feedback.
-
OK. So I think Google Cloud Storage is good now. The indexes are for the firestore database. Unfortunately, I don't know how to see those in the cloud console. (In my own fmltc projects, the Cloud Console page for Firestore Indexes says "No rows to display". I've never understood why.) Instead, let's look at the logs from appengine. Here's what to do: |
Beta Was this translation helpful? Give feedback.
-
Or, instead of a screenshot, can you copy and paste the text? That way I copy the text to an editor where I can reformat it to see it better. |
Beta Was this translation helpful? Give feedback.
-
Please Wait for 20 mins I am outside. Will do asap.
…On Tue, Oct 11, 2022 at 3:30 PM Liz Looney ***@***.***> wrote:
OK. It looks like the deploy_indexes.sh script doesn't deploy if it thinks
it already did it.
Please do
source env_setup.sh
gcloud -q datastore indexes create index.yaml
The output should be something like this:
Configurations to update:
descriptor: [index.yaml]
type: [datastore indexes]
target project: [ftc10138powerplay]
....done.
—
Reply to this email directly, view it on GitHub
<#284 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDRPDOW2OAQ57RIBOH3WCXE6BANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
That's fantastic!!! I will update the readme for these two problems:
|
Beta Was this translation helpful? Give feedback.
-
Understand now. It is great to learn from you and this processing . There
is one last thing if you might interested:
There is error after I rerun the actual command in deploy_indexes.sh,
“Failed Precondition-the index for the query is not ready to serve…”. The
was solved by assigning all principles the role of owner. I googled and it
works for me. I am not sure why… is there a document you can recommend to
me for brief details of the what we did today? It’s okay if you don’t, I
can try to google. Really appreciate your time and help today!
…On Tue, Oct 11, 2022 at 5:12 PM Liz Looney ***@***.***> wrote:
That's fantastic!!!
I will update the readme for these two problems:
1. I'll add a command to give the Storage Admin role to the service
account.
2. I'll document that deploying the indexes takes a long time and is
asynchronous, so the indexes might not be ready until several hours (a
day?) after running deploy_indexes.sh.
—
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDVJVR7YLLR4TW5ISHTWCXQ3HANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I think that the “Failed Precondition-the index for the query is not ready to serve…”. error just indicates that (as it says) the index is not ready. I believe that adding the role of owner to all principles didn't make it work... It's just that by the time you'd done that, the index was ready. For documentation about what we did today: I tried to find documentation about the indexes, but I can't find any documentation that makes sense. I think when I created fmltc, I wanted to use Datastore and then Google replaced that with Firestore. I think for a while I was using "Firestore in Datastore Mode", but the cloud console says I'm using "Firestore in Native Mode". I think the index.yaml file and the command that is in deploy_indexes.sh are typically used for Datastore. I'm not even sure why that command works if the database is actually Firestore in Native Mode. I'll see if I can figure that out. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the update and the document , Liz.
Just wondering, do you work with FTC or Google Cloud? Our team want to
train dataset more than team element this year. Is there a limit on how
many model we can train on google cloud? Second question is once we get
the models (assume more than one), does the running and detecting object
using tensor flow fast enough in the human drive period?
It’s interesting to see how the index.yaml file work with database.
Thank you again. Have a nice evening,
…On Tue, Oct 11, 2022 at 7:07 PM Liz Looney ***@***.***> wrote:
I think that the “Failed Precondition-the index for the query is not ready
to serve…”. error just indicates that (as it says) the index is not ready.
I believe that adding the role of owner to all principles didn't make it
work... It's just that by the time you'd done that, the index was ready.
For documentation about what we did today:
IAM roles for Cloud Storage
<https://cloud.google.com/storage/docs/access-control/iam-roles>
I tried to find documentation about the indexes, but I can't find any
documentation that makes sense. I think when I created fmltc, I wanted to
use Datastore and then Google replaced that with Firestore. I think for a
while I was using "Firestore in Datastore Mode", but the cloud console says
I'm using "Firestore in Native Mode". I think the index.yaml file and the
command that is in deploy_indexes.sh are typically used for Datastore. I'm
not even sure why that command works if the database is actually Firestore
in Native Mode. I'll see if I can figure that out.
—
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDSGPTBTYCVIPGF4KGTWCX6KJANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I am on the FTC Tech Team, a group of volunteers who help the engineers at FIRST to create the FTC SDK and fmltc. When you use your own google cloud project (ftc10138powerplay), the limit is money. You may have received a certain amount of free credits from Google when you created the project. When those run out, it will start costing real money. As to whether it is fast enough during the tele-op part of the matches, that's a good question. In the FTC SDK, there's an object tracker that is used to track objects on the camera frames that come in while the tensorflow object detection is busy. That makes it pretty fast. You'll have to try it out and see. |
Beta Was this translation helpful? Give feedback.
-
Awesome, thanks for the info! Again, really appreciate you time and
help with this!
…On Tue, Oct 11, 2022 at 8:01 PM Liz Looney ***@***.***> wrote:
I am on the FTC Tech Team, a group of volunteers who help the engineers at
FIRST to create the FTC SDK
<https://github.com/FIRST-Tech-Challenge/FtcRobotController> and fmltc
<https://github.com/FIRST-Tech-Challenge/fmltc>.
When you use your own google cloud project (ftc10138powerplay), the limit
is money. You may have received a certain amount of free credits from
Google when you created the project. When those run out, it will start
costing real money.
In my experience, it isn't that expensive. In the project I use for
developing fmltc, the cost of using the service to upload videos, label
frames, create datasets, and train about 5 models was about $37. I'm not
sure if my usage is typical though because I usually don't care if my
models work very well. I don't usually have as many video frames as some
people do.
As to whether it is fast enough during the tele-op part of the matches,
that's a good question. In the FTC SDK, there's an object tracker that is
used to track objects on the camera frames that come in while the
tensorflow object detection is busy. That makes it pretty fast. You'll have
to try it out and see.
—
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDVEG3Z6X6FQ4LXLTS3WCYEVTANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I am glad I am able to run the fmltc now after found out what cause the errors existed in past couple days. However, I got new errors when I clicked the "Start training" button. I am still not very familiar with the IAM and the error seems came from the IAM. I have more than 5 principals in IAM. I am not sure which one I need to check the permission. Just in case you have any clue about the following error message: CRITICAL:root:capture_exception traceback: Traceback (most recent call last): ... File "/layers/google.python.pip/pip/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request ... rv = self.dispatch_request() ... File "/layers/google.python.pip/pip/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request ... return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) ... File "/workspace/wrappers.py", line 85, in wrapper ... return func(*args, **kwargs) ... File "/workspace/wrappers.py", line 45, in wrapper ... return func(*args, **kwargs) ... File "/workspace/app_engine.py", line 1290, in start_training_model ... model_entity = model_trainer.start_training_model(team_uuid, description, dataset_uuids, ... File "/workspace/model_trainer.py", line 307, in start_training_model ... eval_job_response = ml.projects().jobs().create(parent=parent, body=eval_job).execute() ... File "/layers/google.python.pip/pip/lib/python3.9/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper ... return wrapped(*args, **kwargs) ... File "/layers/google.python.pip/pip/lib/python3.9/site-packages/googleapiclient/http.py", line 907, in execute ... raise HttpError(resp, content, uri=self.uri) ... googleapiclient.errors.HttpError: <HttpError 403 when requesting https://ml.googleapis.com/v1/projects/XXXXpowerplay/jobs?alt=json returned "Access to project denied. This might be a transient error and a retry may succeed. If the error persists, please check the IAM permissions on your project."> . Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
You cannot combine TFLITE files. If you think about it like neural networks, which is exactly what it is, one neural network might be incredibly tuned for one thing but they need special training to not recognize other similar objects as that thing. That's why you need to create a dataset with ALL of the labels you want - during training the model will then learn to differentiate between objects. If you have videos labeled with individual labels, try creating a dataset with ALL of your videos. That's how I did it with all 3 images. That's assuming, of course, that your videos individually don't include other images. If so, you need to label them or else you might confuse the network training. Anything not labeled is specifically marked to be ignored, and if one video frame has something ignored and another video frame has something labeled, that's going to lead to a bad model. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply and advice. That is very helpful!
…On Fri, Oct 21, 2022 at 11:44 AM Danny Diaz ***@***.***> wrote:
You cannot combine TFLITE files. If you think about it like neural
networks, which is exactly what it is, one neural network might be
incredibly tuned for one thing but they need special training to not
recognize other similar objects as that thing. That's why you need to
create a dataset with ALL of the labels you want - during training the
model will then learn to differentiate between objects. If you have videos
labeled with individual labels, try creating a dataset with ALL of your
videos. That's how I did it with all 3 images.
That's assuming, of course, that your videos individually don't include
other images. If so, you need to label them or else you might confuse the
network training. Anything not labeled is specifically marked to be
ignored, and if one video frame has something ignored and another video
frame has something labeled, that's going to lead to a bad model.
—
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU4ZDVROQIL4CZ62IBQ6ITWELB5FANCNFSM6AAAAAARALYLDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi, Liz: We tested on private fmltc instance and when the model failed, we tested on FTC's fmltc instance and it worked. The batch size is different between the two instances. Maybe when we switch from TPU to GPU in private fmltc instance, the smaller batch size/ more steps work better? Would you please advice if we can do anything in IAM and assign the admin role to firestore? Thank you |
Beta Was this translation helpful? Give feedback.
-
I am new the google cloud so I followed the https://github.com/FIRST-Tech-Challenge/fmltc instructions as careful as I can. I got 502 Bad Gateway after I went to my https://console.cloud.google.com/appengine?project=YOUR-PROJECT-ID. The ending url is https://project_id.region_id.r.appspot.com/ with 502 Bad Gateway in website. Does anyone know what I can do to correct this mistake?
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions