Problems launching blueprint Fi-Lab Cloud - fiware

I need to launch a VM with Orion Context Broker and CEP in Fi-Lab. For this I clone a template with Orion and then I add a tier with CEP. Then I launch the blueprint instance, but always I have an error:
Success: Blueprint Instance FinalMachine status.
Description: Create environment FinalMachine
Status: ERROR
Error: Infrastructure error Error creating server: {"overLimit": {"message": "Quota exceeded: code=InstanceLimitExceeded", "code": 413, "retryAfter": 0}}
What is it happening??
UPDATE
An screenshot of my blueprint:
Another screenshot of my instance tab:

You should check your available quotas. Do you have any other deployed VM or any other public IP consumed, apart from this blueprint template?
If you try to deploy a new VM, in the open windows in which you have to introduce the data of your new VM, you can see on the right the available resources for your user.

If you want to see the quota that you have available, you only need to launch a new instance.
On the bottom right you could see in this case the number of available instances, vcpus, disk and memory for that user, together with the resources that currently have used (dark grey) and the new resources to consume (green).

Related

Google Market Place VM Deployment Issues

I am receiving the error message when deploying a Windows Server Marketplace Instance with error below. Any help is greatly appreciated.enter image description here
Create VM instance "windows-server-2022-test" and its boot disk "windows-server-2022-test"
13 hours ago
GCPvirtualHybrid
Operation type [insert] failed with message "The resource 'projects/windows-cloud/global/images/windows-server-2022-dc-v20220812' is obsolete. New uses are not allowed. No replacement was specified."

Request had insufficient authentication scopes on terraform when creating gcp mysql

Keep getting this error:
Error, failed to create instance group-database-instance: googleapi: Error 403: Request had insufficient authentication scopes.
More details:
Reason: insufficientPermissions, Message: Insufficient Permission
I have added a service account with editor permissions to use all gcp resources and added directed terraform to a credentials file generated.
Would this be an error in the code or something else?
Based on the error message you have provided and the task you would like to accomplish, it would seem that you might need to add a scope when creating your instance.
To use the Google Kubernetes Engine API for a GCE virtual machines, you will need to add the Cloud Platform Scope ("https://www.googleapis.com/auth/cloud-platform") to your VM when it is created.
Additionally, if you are using the gcloud command-line, you can follow along with something like:
gcloud compute instances create NAME --scopes=https://www.googleapis.com/auth/cloud-platform
If you are using the Cloud Console UI, when you are creating a VM instance, look for the "Identity and API access" section, and select "Allow full access to all Cloud APIs".

Connect to Google Cloud MySql From Cloud Run (knative)

For a sample project I am working on (https://gitlab.com/connorbutch/reading-comprehension-ws), I am having issues connecting to a google cloud mysql database from google cloud run. However, when I run locally with the same args (in both docker and kubernetes) the application looks to succeed.
The steps I followed in setting up my google cloud run application are listed here (https://cloud.google.com/sql/docs/mysql/connect-run). I included the mysql db in the cloud database info. Things I have tried
connecting using ip address in jdbc connection string (which works locally, but this statement on the page suggests it might not on google cloud run, "Cloud Run (fully managed) does not support connecting to the Cloud SQL instance using TCP. Your code should not try to access the instance using an IP address such as 127.0.0.1 or 172.17.0.1.")
connecting using unix socket as suggested, server does not even start
When I start the application with the ip address in the jdbc url, on google cloud, it looks like the app starts successfully:
2020-02-12T02:51:01.733606Z 2020-02-12 02:51:01.733 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-02-12T02:51:01.740162Z 2020-02-12 02:51:01.739 INFO 1 --- [ main] com.connor.Application : Started Application in 15.717 seconds (JVM running for 17.715)
However, when I make the first request, I see the following:
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
Caused by: java.net.SocketTimeoutException: connect timed out
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
Is there any suggestions you may have? I am wondering if it may be related to having to configure our DataSource as listed here: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/cloud-sql/mysql/servlet/src/main/java/com/example/cloudsql/ConnectionPoolContextListener.java
Following the documentation steps:
Build and deploy container
Connect from Cloud Run
On the last step: “Connecting to CloudSQL” of the 2nd link instead of using the code snippet, I used the following command from the GitHub instructions:
gcloud run services update helloworld --add-cloudsql-instances [INSTANCE_CONNECTION_NAME] --set-env-vars CLOUD_SQL_CONNECTION_NAME=[INSTANCE_CONNECTION_NAME],DB_USER=[MY_DB_USER],DB_PASS=[MY_DB_PASS],DB_NAME=[MY_DB]
where "helloworld" is the name of my service.
Please be meticulous with the spacing on this command, as it can easily throw errors.
Having said that after performing a curl command I did not receive any errors, so my application runs successfully.
Additionally, during my investigation on the error you received, I came across this link, which contains a list of possible causes for this error.
Finally, since the error indicates a timeout, you could also try modifying the request timeout of Cloud Run by following this.
Some further links that could come in handy for you are:
Diagnosing issues with Cloud SQL instances
Troubleshooting Cloud Run (fully managed)
I hope this information helps.
Sadly the https://cloud.google.com/sql/docs/mysql/connect-run document is currently not documenting the Knative instructions. Any time you see "Cloud Run (fully managed)" that's not to Kubernetes implementation.
If you are using Cloud Run on a Kubernetes/GKE cluster, this is probably more applicable. https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine That said this approach uses "Cloud SQL Proxy" sidecar container, which is not yet a notion supported by Knative today.
However, using those instructions, you can connect to Cloud SQL instance over a private IP, as GKE clusters can be in a VPC (though "Cloud Run fully-managed" applications currently cannot).

How do you start a Dataflow template from a Compute Engine instance?

From my workstation I can fire templated Dataflow jobs with the gcloud dataflow jobs command. The required authorization to insert a new job come from my workstation where I'm logged in.
On the Compute Engine instance I rely on it's service account. The one with (number)-compute#. Within the AIM section I enabled Dataflow/Dataflow Admin, Dataflow/Dataflow Developer and Dataflow/Dataflow Worker for this service account to be safe.
I even added Cloud Dataflow Service Agent when I came across that one.
Then I try to start a Dataflow from the command line but I get an error about insufficient authentication scopes: ERROR: (gcloud.dataflow.jobs.run) PERMISSION_DENIED: Request had insufficient authentication scopes.
If I do a gcloud config auth and login with my personal account, of course, it works.
Somehow I'm missing the proper permissions to set to the applied service account.
Is there a guideline I missed? Can somebody please point me into the right direction?
The error message indicates that the instance does not setup access scope properly. To launches a job from a GCE VM, the VM must have compute.read-only, compute, or cloud-platform scope for the project.
The way to verify it is using the command "gcloud compute instances describe --zone=[zone][instance]" and look for "scopes".
This document and this existing question may provide useful guidelines for you.

Google cloud VM Instance DNS error

I am having a bit of an issue with the VM Instances on google cloud. I installed and set up apache and a website with it but now I am trying to configure a custom domain and when I try to add it in SSH I get the following error:
ERROR: (gcloud.dns.managed-zone.create) ResponseError: status=403, code=Forbidden, reason(s)=insufficientPermissions
message=Insufficient Permission
I have also tried the directions at the following https://cloud.google.com/appengine/docs/domain and am getting a 404 not found error on my domain. Any help would be greatly appreciated.
You say you are having an issue with a VM instance and are trying to set up a custom domain. Those two are in very different realms. VM instances are under Compute Engine (except for Managed VMs, which live under App Engine, but that is beside the point). Custom Domains are features just of App Engine.
What do you mean that you are trying to "add it in SSH"? Did you mean DNS? If so, see my answer below.
What command are you running to get ERROR: (gcloud.dns.managed-zone.create) ResponseError: status=403, code=Forbidden, reason(s)=insufficientPermissions message=Insufficient Permission?
The docs apply to App Engine, not Compute Engine. That you are getting a 404 error is no surprise if you don't also have a corresponding app running in App Engine.
If you are trying to create a DNS hostname for a web site hosted on a VM instance on Compute Engine, I recommend that you either (a) use a static IP address and a static A record pointing to it, or (b) use an ephemeral IP address and set up a dynamic DNS A records pointing to it. (I use freedns.afraid.org for my DDNS.)