I have a jHipster generated Gateway which is in the process of being deployed to Cloud Foundry. The registry has been deployed and is up and running.
Upon firing jhipster cloudfoundry from commandline, and at the time of instance startup in cloud, I see the error below:
017-06-24T09:43:36.568-04:00 [APP/0] [OUT] Caused by:
org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.cloud.CloudException: No unique service matching class javax.sql.DataSource found. Expected 1, found 0
The database definitions are provided in the Gateway-dev.yml file defined and accessible in the registry.
I have tried to follow the spring-music example in github, which details (in User provided Services section) how to create User defined Oracle service in Cloud Foundry but the same error persists.
Can someone please provide thoughts on how best to approach this or is there a working example that someone knows and can be git cloned?
Thanks!
Related
I have created the app service in existing internal app service environment. And then I’m trying to deploy the source code into above app service using Azure DevOps CI & CD pipelines. But, in the release pipeline I’m getting the below error message in Azure DevOps:
Error: Error Code: ERROR_DESTINATION_INVALID
More Information: Could not connect to the remote computer ("xx-xxxx-v1-api-dev.scm.xxx-int-nonp.xxxcloudapps.com"). Make sure that the remote computer name is correct and that you are able to connect to that computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_INVALID.
Error: The remote name could not be resolved: 'xx-xxxx-v1-api-dev.scm.xxx-int-nonp.xxxxcloudapps.com'
Error count: 1.
Note: I’m using self-hosted agent in the release pipeline. I have tried to access Kudu environment for the above service in the private virtual machine. But, the kudu not opening.
So, please suggest me how to fix the above issue.
Kindly set/add the following to the Application setting and see if it helps.
Name: WEBSITE_WEBDEPLOY_USE_SCM
Value: false
If I have understood your issue correctly (using private link).
For accessing the Kudu console, or Kudu REST API (deployment with Azure DevOps self-hosted agents for example), you must create two records in your Azure DNS private zone or your custom DNS server. Kindly check this document for more details. If you haven't added the records, kindly see if that works.
Name Type Value
mywebapp.privatelink.azurewebsites.net A PrivateEndpointIP
mywebapp.scm.privatelink.azurewebsites.net A PrivateEndpointIP
https://learn.microsoft.com/azure/app-service/networking/private-endpoint#dns
Ensure that the release pipeline is running in the right host. Because the endpoint is private for the SCM too, the DevOps Agent must be in a network with access with the endpoint, so mandatory to use self-hosted Devops Agent.
Kindly see this doc for more details:
https://learn.microsoft.com/azure/app-service/networking/private-endpoint#dns
If the issue still persists, kindly capture a network trace/HAR or client-side HTTP log/review the logs.
P.S. Kindly do not share any PII data on the public forum for your privacy.
We have a spring boot application deployed in Azure App Service that access Azure Key Vault using Service Principle. Below are the steps we used
Created a Service Principal (SP) and Key-vault
Stored the SP’s client secret into Key-Vault
Provided necessary access(Get, List, Set permissions in Secret Permissions section) to SP to access Key-Vault
Also, we added VNet and to Data lake storage account and provided necessary access to SP to access storage as well.
Whitelisted IP of the App Service in Key-Vault also.
Deployed the spring boot app in Azure App service
After deployment service is up and running perfectly but suddenly sometime we are getting below error and we cant access the hosted web services because of the below error container keep on restarting in Azure.
2020-10-08 09:59:53,945 ERROR o.s.b.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to configure KeyVault property source
at com.microsoft.azure.keyvault.spring.KeyVaultEnvironmentPostProcessorHelper.addKeyVaultPropertySource(KeyVaultEnvironmentPostProcessorHelper.java:77) ~[azure-spring
-boot-2.2.4.jar!/:?]
Caused by: java.lang.RuntimeException: Max retries 3 times exceeded. Error Details: keyvault-name.vault.azure.net
Caused by: java.net.UnknownHostException: keyvault-name.vault.azure.net
After 2-3 hours it automatically gets resolved. We are not able to replicate the issue since its intermittent and we don't know the pattern. Can any one guide us where and what will be the issue.
I download google official latest Node.js app engine demo and deploy to standard env, but this problem arises:
ERROR: (gcloud.app.deploy) Error Response: [13] Error processing user code.
Here is the demo url:
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/hello-world/standard
Someone can take a look for me?
This error has happened before whenever the default App Engine service accounts gets deleted.
Please check that you have have it and it has been not modified.
In case you don't have it (it has been deleted), a workaround would be to use the Undelete API to restore the Default App Engine service account.
You will need to input your service account's unique numeric ID, which can be found in your console's activity logs.
created a default Jhipster app, followed the Jhipster Deploying to Cloud Foundry instructions, PCF created the service just fine, the application Started fine, but will not accept the admin/admin login, I queried the service database using , I see the admin entry (admin $2a$10$gSAhZrxMllrbgj/kkK9Uce...) I even tried using the password for giggles. But the app will not authenticate the admin, or user Account, what am I missing ?
I checked PCF / Web Service App Logs and found:
org.springframework.orm.jpa.JpaSystemException: Unable to commit against JDBC Connection; nested exception is org.hibernate.TransactionException: Unable to commit against JDBC Connection
2019-03-04T16:01:34.944-07:00 [APP/PROC/WEB/0] [OUT] 2019-03-04 23:01:34.937 ERROR 14 --- [nio-8080-exec-4] o.s.b.w.servlet.support.ErrorPageFilter : Forwarding to error page from request [/api/account] due to exception [Unable to commit against JDBC Connection; nested exception is org.hibernate.TransactionException: Unable to commit against JDBC Connection]
Not sure where this will take me, so what am I missing ?
We have an asp.net web api project deployed to an Azure Cloud Service (classic) that has been running fine using Swashbuckle for almost a year. We configure it like so...
GlobalConfiguration.Configuration
.EnableSwagger(c =>
{
c.SingleApiVersion("v1", "PartnerAPI");
c.UseFullTypeNameInSchemaIds();
}).EnableSwaggerUi(c => { });
Recently we needed to tweak the swagger generated output by plugging in an IOperationFilter. However our Azure Cloud Service (Classic) instance will not start if we create a class that implements the IOperationFilter. We don't even try to configure Swagger to use it. Just the fact that there is a class that implements that interface in our solution causes the deploy to fail stating...
2016-12-29T16:10:26.1066042Z ##[error]BadRequest : Your role instances have recycled a number of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent the role instances from running. Verify your code does not throw unhandled exceptions and that your configuration settings are correct and then start another update or upgrade operation.
Some Notes:
Everything runs fine on my machine, directly and in the azure emulator
Everything runs fine on teammates machine same as above
The following message appears to be related in the event logs on the azure machine when I rdp into it.
File Server Resource Manager was unable to access the following file or volume: 'E:'. This file or volume might be locked by another application right now, or you might need to give Local System access to it.
Same problem in Swashbuckle versions 5 and 5.5
No new nuget packages or references to the project
Only a "using Swashbuckle.Swagger;' that was added to the SwaggerConfig.cs
The Azure Portal reports the following for the "Instance Status Message"...
[12/29T16:43Z]Failed to load role entrypoint. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.Assembly.GetTypes() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly) at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.CreateRoleEntryPoint(RoleType roleTypeEnum) at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)' Last exit time: [2016/12/29, 16:43:59.525]. Last exit code: 0.