I created storage account in azure but when i create a repository in azure it is showing error like this.
I given command as
PUT _snapshot/azurerepository
{
"type": "azure"
}
Response
{
"error": {
"root_cause": [
{
"type": "repository_verification_exception",
"reason": "[azurerepository] can not initialize container elasticsearch-snapshots"
}
],
"type": "repository_verification_exception",
"reason": "[azurerepository] can not initialize container elasticsearch-snapshots",
"caused_by": {
"type": "storage_exception",
"reason": "An unknown failure occurred : Connection refused: connect",
"caused_by": {
"type": "connect_exception",
"reason": "Connection refused: connect"
}
}
},
"status": 500
}
Thanks
This is due to my network connection under some firewall. Once firewall is removed i can to access azure with out any problem.
Related
I'm trying to create some kind of AzureBlobStorage linked service which will retrieve it's accountKey from Key Vault by dynamically provided secretName. I'm trying to follow this guide.
So for this I've prepared this json:
{
"name": "AzureBlobStorageLinkedServiceWithDynamicStorageAccountKeysFromKeyVault",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"type": "AzureBlobStorage",
"typeProperties": {
"connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=#{linkedService().storageAccountName}",
"accountKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "AzureKeyVaultWithStorageAccountsSecrets",
"type": "LinkedServiceReference"
},
"secretName": {
"type": "Expression",
"value": "#{linkedService().storageAccountName}"
}
}
},
"parameters": {
"storageAccountName": {
"type": "String",
"defaultValue": "fixmeaccountname"
}
},
"annotations": []
}
}
When I'm trying to test this I'm getting error
Invalid storage connection string provided to 'UnknownLocation'. Check the storage connection string in configuration. Duplicate setting 'AccountName' found.
If I remove AccountName=#{linkedService().storageAccountName} from connectionString then I have this error
Invalid storage connection string provided to 'UnknownLocation'. Check the storage connection string in configuration. Duplicate setting 'AccountKey' found.
Is it possible to have such linked service with parameterized key vault?
The secret on the KV is it connectionstring or just the key ? I think you are storing the connectionstring as a secret , please try out with just the key and it should work .
I have a logic app inside an ISE which uses an API Connection to write to my storage account. Both ISE and storage account are in the same private VNet and my storage account has firewall rules enabled for each subnet of the ISE. Even so, all requests to the logic app fail to write to blob storage with the error:
{
"status": 403,
"message": "This request is not authorized to perform this operation.\r\nclientRequestId: ...",
"error": {
"message": "This request is not authorized to perform this operation."
},
"source": "azureblob-cus.azconn-cus.p.azurewebsites.net"
}
If I disable the blob storage firewall rules, it can write to the storage account. Why can my logic app-inside the ISE which has firewall rules configured for the storage account-not write to my storage account?
I figured it out. I was creating my API connections against the publicly available blob storage service rather than the managed connector inside my ISE. Instead of having
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"location": "[resourceGroup().location]",
"name": "[parameters('BackupStorageAccountName')]",
"properties": {
...
"api": {
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azureblob')]"
}
}
}
I needed to have
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"location": "[resourceGroup().location]",
"name": "[parameters('BackupStorageAccountName')]",
"properties": {
...
"api": {
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Logic/integrationServiceEnvironments/', parameters('iseName'), '/managedApis/azureblob')]"
}
}
}
I am using arm template to deploy Azure NotificationHub
Here is
{
"apiVersion": "2017-04-01",
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs",
"name": "[parameters('notificationHub_name')]",
"location": "[parameters('location')]",
"properties": {
"GcmCredential": {
"properties": {
"googleApiKey": "[parameters('googleApiKey')]",
"gcmEndpoint": "[parameters('googleEndpoint')]"
}
},
"ApnsCredential": {
"properties": {
"appId": "[parameters('apnsAppId')]",
"appName": "[parameters('apnsAppNameId')]",
"keyId": "[parameters('apnsKeyId')]",
"token": "[parameters('apnsToken')]",
"endpoint": "[parameters('apnsEndpoint')]"
}
}
},
"dependsOn": [
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('notificationHub_namespace'))]"
]
}
But I got error without details BadRequest
{
"code": "DeploymentFailed",
"details": [
{
"code": "BadRequest",
"message": {
"error": {
"message": "Bad Request",
"code": "BadRequest"
}
}
]
}
I test my parameters from azure portal and it works - so I assume that parameters are correct.
The question is how to deploy NotificationHub with ApnsCredentials using ARM?
Above arm template is correct.
My parameters were bad.
I found solution by previewing requests sent from azure portal.
I was using endpoints for certificates:
Sandbox endpoint: gateway.sandbox.push.apple.com,
Production endpoint: gateway.push.apple.com
Endpoints for token authorization are different :
Sandbox Endpoint: https://api.development.push.apple.com:443/3/device
Production Endpoint: https://api.push.apple.com:443/3/device
Here you can find details:
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-http2-token-authentification#configure-via-management-api-rest
I would like to create azure container with resource group and cluster of specific Orchestrator Kubernetes cluster.
I know by using CLI its possible but I want to do this using Azure Rest API's for Container service from link given here
learn.microsoft.com/en-us/rest/api/container-service/containerservices/createorupdate
Registered my app in AAD and gave required permissions.
Got access token and making request to below api as per link
PUT management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}?api-version=2017-01-31
but I am getting error as
{
"error": {
"code": "InvalidResource"
"message": "The resource definition is invalid."
}
}
I understand we get this error when there is nothing in request body.
So my real question here is if I want to create container service with resource group and cluster using API request.
Request Body
{
"id": "myCluster",
"name": "myCluster",
"type": "Microsoft.ContainerService/containerServices",
"location": "southindia",
"tags": {
"tag": "test"
},
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes"
},
"servicePrincipalProfile": {
"clientId": "<clientid>,
"secret": "<secret>"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "testabc"
},
"agentPoolProfiles": {
"name": "agentPool1234",
"count": 2,
"vmSize": "Standard_A1",
"dnsPrefix": "testabcagents"
},
"linuxProfile": {
"adminUsername": "kubeadmin",
"ssh": {
"publicKeys": [
{
"keyData": "sshkey"
}
]
}
}
}
}
Response getting
{
"code": "BadRequest",
"message": "An error has occurred in subscription <subscriptionid>, resourceGroup: tobeDeletedResourceGroup request: OrchestratorType has unknown orchestrator: ."
}
Please help me out on this
Two things are missing from Azure REST API documentation.
1) It requires version of orchestratorRelease with orchestratorType like this. "orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.7"
}
2) Next error i got about missing vmSize in Properties.MasterProfile.VMSize.
So I have added following updates to json
"masterProfile": {
"count": 1,
"dnsPrefix": "testabc",
"vmSize": "Standard_D2_v2"
}
Its very surprising and annoying that documentation is missing these 2 important json parameters.
agentPoolProfiles should be an array of json objects. I pulled this example from azure-cli's mock unit tests to help give you a frame of reference.
https://gist.github.com/bacongobbler/470b8d139536144edf91174916ec4036
I am trying to create filters via the Gmail API
Services > Gmail API v1 > gmail.users.settings.filters.create
Listing and lookup of single filters are working but I am not able to create new filters.
Request
POST https://www.googleapis.com/gmail/v1/users/me/settings/filters?key={YOUR_API_KEY}
{
"criteria": {
"query": "test"
},
"action": {
"addLabelIds": [
"Label_582"
]
}
}
Response
500
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
"Label_582" is valid.
Any ideas?
Thanks and best regards