07.04.2020

Error In Generating Keys No Available Resources

Error In Generating Keys No Available Resources 5,7/10 2741 votes
-->

This article describes some common Azure deployment errors, and provides information to resolve the errors. How are public and private keys generated. If you can't find the error code for your deployment error, see Find error code.

If you don't already have an SSH key, you must generate a new SSH key. If you're unsure whether you already have an SSH key, check for existing keys. If you don't want to reenter your passphrase every time you use your SSH key, you can add your key to the SSH agent, which manages your SSH keys and remembers your passphrase. Creating a new file with a new passphrase will not help if the old file remains available. Videos illustrating use of PuTTYgen Using PuTTYgen to generate an SSH key. Using PuTTYgen to generate an SSH key. How to set up PuTTY SSH keys for passwordless logins using Pagent. How to setup PuTTY SSH keys for passwordsless logins using Pagent. I was assigned a new TCPIP address. I reconfigured and rebooted the system. After rebooting, I was able to register the system. I made no firewall changes but perhaps there were firewall rules associated with the other IP address, though this seems unlikely, since I just set that one up.

If you're looking for information about an error code and that information isn't provided in this article, let us know. At the bottom of this page, you can leave feedback. The feedback is tracked with GitHub Issues.

Note

This article has been updated to use the new Azure PowerShell Azmodule. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020.To learn more about the new Az module and AzureRM compatibility, seeIntroducing the new Azure PowerShell Az module. ForAz module installation instructions, see Install Azure PowerShell.

Error codes

Error codeMitigationMore information
AccountNameInvalidFollow naming restrictions for storage accounts.Resolve storage account name
AccountPropertyCannotBeSetCheck available storage account properties.storageAccounts
AllocationFailedThe cluster or region doesn't have resources available or can't support the requested VM size. Retry the request at a later time, or request a different VM size.Provisioning and allocation issues for Linux, Provisioning and allocation issues for Windows and Troubleshoot allocation failures
AnotherOperationInProgress Wait for concurrent operation to complete.
AuthorizationFailed Your account or service principal doesn't have sufficient access to complete the deployment. Check the role your account belongs to, and its access for the deployment scope.
You might receive this error when a required resource provider isn't registered.
Azure Role-Based Access Control
Resolve registration
BadRequest You sent deployment values that don't match what is expected by Resource Manager. Check the inner status message for help with troubleshooting.Template reference and Supported locations
Conflict You're requesting an operation that isn't allowed in the resource's current state. For example, disk resizing is allowed only when creating a VM or when the VM is deallocated.
DeploymentActiveAndUneditableWait for concurrent deployment to this resource group to complete.
DeploymentFailedCleanUpWhen you deploy in complete mode, any resources that aren't in the template are deleted. You get this error when you don't have adequate permissions to delete all of the resources not in the template. To avoid the error, change the deployment mode to incremental.Azure Resource Manager deployment modes
DeploymentNameInvalidCharactersThe deployment name can only contain letter, digit, '-', '.' or '_'.
DeploymentNameLengthLimitExceededThe deployment names are limited to 64 characters.
DeploymentFailedThe DeploymentFailed error is a general error that doesn't provide the details you need to solve the error. Look in the error details for an error code that provides more information.Find error code
DeploymentQuotaExceededIf you reach the limit of 800 deployments per resource group, delete deployments from the history that are no longer needed.Resolve error when deployment count exceeds 800
DnsRecordInUse The DNS record name must be unique. Enter a different name.
ImageNotFound Check VM image settings.
InUseSubnetCannotBeDeleted You might get this error when trying to update a resource, and the request is processed by deleting and creating the resource. Make sure to specify all unchanged values.Update resource
InvalidAuthenticationTokenTenant Get access token for the appropriate tenant. You can only get the token from the tenant that your account belongs to.
InvalidContentLink You've most likely attempted to link to a nested template that isn't available. Double check the URI you provided for the nested template. If the template exists in a storage account, make sure the URI is accessible. You might need to pass a SAS token. Currently, you can't link to a template that is in a storage account behind an Azure Storage firewall. Consider moving your template to another repository, like GitHub.Linked templates
InvalidDeploymentLocationWhen deploying at the subscription level, you've provided a different location for a previously used deployment name.Subscription level deployments
InvalidParameter One of the values you provided for a resource doesn't match the expected value. This error can result from many different conditions. For example, a password may be insufficient, or a blob name may be incorrect. The error message should indicate which value needs to be corrected.
InvalidRequestContent The deployment values either include values that aren't recognized, or required values are missing. Confirm the values for your resource type.Template reference
InvalidRequestFormat Enable debug logging when running the deployment, and verify the contents of the request.Debug logging
InvalidResourceNamespace Check the resource namespace you specified in the type property.Template reference
InvalidResourceReference The resource either doesn't yet exist or is incorrectly referenced. Check whether you need to add a dependency. Verify that your use of the reference function includes the required parameters for your scenario.Resolve dependencies
InvalidResourceType Check the resource type you specified in the type property.Template reference
InvalidSubscriptionRegistrationState Register your subscription with the resource provider.Resolve registration
InvalidTemplate Check your template syntax for errors.Resolve invalid template
InvalidTemplateCircularDependencyRemove unnecessary dependencies.Resolve circular dependencies
LinkedAuthorizationFailed Check if your account belongs to the same tenant as the resource group that you're deploying to.
LinkedInvalidPropertyId The resource ID for a resource isn't resolving correctly. Check that you provide all required values for the resource ID, including subscription ID, resource group name, resource type, parent resource name (if needed), and resource name.
LocationRequired Provide a location for the resource.Set location
MismatchingResourceSegmentsMake sure nested resource has correct number of segments in name and type.Resolve resource segments
MissingRegistrationForLocation Check resource provider registration status and supported locations.Resolve registration
MissingSubscriptionRegistration Register your subscription with the resource provider.Resolve registration
NoRegisteredProviderFound Check resource provider registration status.Resolve registration
NotFound You might be attempting to deploy a dependent resource in parallel with a parent resource. Check if you need to add a dependency.Resolve dependencies
OperationNotAllowed The deployment is attempting an operation that exceeds the quota for the subscription, resource group, or region. If possible, revise your deployment to stay within the quotas. Otherwise, consider requesting a change to your quotas.Resolve quotas
ParentResourceNotFound Make sure a parent resource exists before creating the child resources.Resolve parent resource
PasswordTooLongYou might have selected a password with too many characters, or converted your password value to a secure string before passing it as a parameter. If the template includes a secure string parameter, you don't need to convert the value to a secure string. Provide the password value as text.
PrivateIPAddressInReservedRange The specified IP address includes an address range required by Azure. Change IP address to avoid reserved range.IP addresses
PrivateIPAddressNotInSubnet The specified IP address is outside of the subnet range. Change IP address to fall within subnet range.IP addresses
PropertyChangeNotAllowed Some properties can't be changed on a deployed resource. When updating a resource, limit your changes to permitted properties.Update resource
RequestDisallowedByPolicyYour subscription includes a resource policy that prevents an action you're trying to perform during deployment. Find the policy that blocks the action. If possible, change your deployment to meet the limitations from the policy.Resolve policies
ReservedResourceNameProvide a resource name that doesn't include a reserved name.Reserved resource names
ResourceGroupBeingDeleted Wait for deletion to complete.
ResourceGroupNotFound Check the name of the target resource group for the deployment. The target resource group must already exist in your subscription. Check your subscription context.
ResourceNotFound Your deployment references a resource that can't be resolved. Verify that your use of the reference function includes the parameters required for your scenario.Resolve references
ResourceQuotaExceeded The deployment is trying to create resources that exceed the quota for the subscription, resource group, or region. If possible, revise your infrastructure to stay within the quotas. Otherwise, consider requesting a change to your quotas.Resolve quotas
SkuNotAvailable Select SKU (such as VM size) that is available for the location you've selected.Resolve SKU
StorageAccountAlreadyExists Provide a unique name for the storage account.Resolve storage account name
StorageAccountAlreadyTaken Provide a unique name for the storage account.Resolve storage account name
StorageAccountNotFound Check the subscription, resource group, and name of the storage account that you're trying to use.
SubnetsNotInSameVnet A virtual machine can only have one virtual network. When deploying several NICs, make sure they belong to the same virtual network.Multiple NICs
SubscriptionNotRegisteredWhen deploying network resources, the Microsoft.Network resource provider is automatically registered in the subscription. Sometimes, the automatic registration doesn't complete in time. To avoid this intermittent error, register the Microsoft.Network resource provider before deployment.Resolve registration
TemplateResourceCircularDependencyRemove unnecessary dependencies.Resolve circular dependencies
TooManyTargetResourceGroupsReduce number of resource groups for a single deployment.Cross resource group deployment

Find error code

There are two types of errors you can receive:

  • validation errors
  • deployment errors

Validation errors arise from scenarios that can be determined before deployment. They include syntax errors in your template, or trying to deploy resources that would exceed your subscription quotas. Deployment errors arise from conditions that occur during the deployment process. They include trying to access a resource that is being deployed in parallel.

Both types of errors return an error code that you use to troubleshoot the deployment. Both types of errors appear in the activity log. However, validation errors don't appear in your deployment history because the deployment never started.

Validation errors

When deploying through the portal, you see a validation error after submitting your values.

Select the message for more details. In the following image, you see an InvalidTemplateDeployment error and a message that indicates a policy blocked deployment.

Deployment errors

When the operation passes validation, but fails during deployment, you get a deployment error.

To see deployment error codes and messages with PowerShell, use:

To see deployment error codes and messages with Azure CLI, use:

In the portal, select the notification.

You see more details about the deployment. Select the option to find more information about the error.

You see the error message and error codes. Notice there are two error codes. The first error code (DeploymentFailed) is a general error that doesn't provide the details you need to solve the error. The second error code (StorageAccountNotFound) provides the details you need.

Enable debug logging

Sometimes you need more information about the request and response to learn what went wrong. During deployment, you can request that additional information is logged during a deployment.

PowerShell

In PowerShell, set the DeploymentDebugLogLevel parameter to All, ResponseContent, or RequestContent.

Examine the request content with the following cmdlet:

Or, the response content with:

This information can help you determine whether a value in the template is being incorrectly set.

Azure CLI

Currently, Azure CLI doesn't support turning on debug logging, but you can retrieve debug logging.

Examine the deployment operations with the following command:

Examine the request content with the following command:

Examine the response content with the following command:

Nested template

To log debug information for a nested template, use the debugSetting element.

Create a troubleshooting template

In some cases, the easiest way to troubleshoot your template is to test parts of it. You can create a simplified template that enables you to focus on the part that you believe is causing the error. For example, suppose you're receiving an error when referencing a resource. Rather than dealing with an entire template, create a template that returns the part that may be causing your problem. It can help you determine whether you're passing in the right parameters, using template functions correctly, and getting the resource you expect.

Or, suppose you're getting deployment errors that you believe are related to incorrectly set dependencies. Test your template by breaking it into simplified templates. First, create a template that deploys only a single resource (like a SQL Server). When you're sure you have that resource correctly defined, add a resource that depends on it (like a SQL Database). When you have those two resources correctly defined, add other dependent resources (like auditing policies). In between each test deployment, delete the resource group to make sure you adequately testing the dependencies.

Next steps

  • To go through a troubleshooting tutorial, see Tutorial: Troubleshoot Resource Manager template deployments
  • To learn about auditing actions, see Audit operations with Resource Manager.
  • To learn about actions to determine the errors during deployment, see View deployment operations.

Related

How To Run Multiple PHP Versions on One Server Using Apache and PHP-FPM on Debian 10 Tutorial
How To Install the Ampache Music Streaming Server on Ubuntu 18.04 Tutorial

Introduction

When accessing a web server or application, every HTTP request that is received by a server is responded to with an HTTP status code. HTTP status codes are three-digit codes, and are grouped into five different classes. The class of a status code can be quickly identified by its first digit:

  • 1xx: Informational
  • 2xx: Success
  • 3xx: Redirection
  • 4xx: Client Error
  • 5xx: Server Error

This guide focuses on identifying and troubleshooting the most commonly encountered HTTP error codes, i.e. 4xx and 5xx status codes, from a system administrator’s perspective. There are many situations that could cause a web server to respond to a request with a particular error code–we will cover common potential causes and solutions.

Client and Server Error Overview

Keys

Client errors, or HTTP status codes from 400 to 499, are the result of HTTP requests sent by a user client (i.e. a web browser or other HTTP client). Even though these types of errors are client-related, it is often useful to know which error code a user is encountering to determine if the potential issue can be fixed by server configuration.

Server errors, or HTTP status codes from 500 to 599, are returned by a web server when it is aware that an error has occurred or is otherwise not able to process the request.

General Troubleshooting Tips

  • When using a web browser to test a web server, refresh the browser after making server changes
  • Check server logs for more details about how the server is handling the requests. For example, web servers such as Apache or Nginx produce two files called access.log and error.log that can be scanned for relevant information
  • Keep in mind that HTTP status code definitions are part of a standard that is implemented by the application that is serving requests. This means that the actual status code that is returned depends on how the server software handles a particular error–this guide should generally point you in the right direction
Available

Now that you have a high-level understanding of HTTP status codes, we will look at the commonly encountered errors.

400 Bad Request

The 400 status code, or Bad Request error, means the HTTP request that was sent to the server has invalid syntax.

Here are a few examples of when a 400 Bad Request error might occur:

  • The user’s cookie that is associated with the site is corrupt. Clearing the browser’s cache and cookies could solve this issue
  • Malformed request due to a faulty browser
  • Malformed request due to human error when manually forming HTTP requests (e.g. using curl incorrectly)

401 Unauthorized

The 401 status code, or an Unauthorized error, means that the user trying to access the resource has not been authenticated or has not been authenticated correctly. This means that the user must provide credentials to be able to view the protected resource.

An example scenario where a 401 Unauthorized error would be returned is if a user tries to access a resource that is protected by HTTP authentication, as in this Nginx tutorial. In this case, the user will receive a 401 response code until they provide a valid username and password (one that exists in the .htpasswd file) to the web server.

403 Forbidden

The 403 status code, or a Forbidden error, means that the user made a valid request but the server is refusing to serve the request, due to a lack of permission to access the requested resource. If you are encountering a 403 error unexpectedly, there are a few typical causes that are explained here.

File Permissions

403 errors commonly occur when the user that is running the web server process does not have sufficient permissions to read the file that is being accessed.

To give an example of troubleshooting a 403 error, assume the following situation:

  • The user is trying to access the web server’s index file, from http://example.com/index.html
  • The web server worker process is owned by the www-data user
  • On the server, the index file is located at /usr/share/nginx/html/index.html

If the user is getting a 403 Forbidden error, ensure that the www-data user has sufficient permissions to read the file. Typically, this means that the other permissions of the file should be set to read. There are several ways to ensure this, but the following command will work in this case:

.htaccess

Another potential cause of 403 errors, often intentinally, is the use of an .htaccess file. The .htaccess file can be used to deny access of certain resources to specific IP addresses or ranges, for example.

If the user is unexpectedly getting a 403 Forbidden error, ensure that it is not being caused by your .htaccess settings.

Index File Does Not Exist

If the user is trying to access a directory that does not have a default index file, and directory listings are not enabled, the web server will return a 403 Forbidden error. For example, if the user is trying to access http://example.com/emptydir/, and there is no index file in the emptydir directory on the server, a 403 status will be returned.

If you want directory listings to be enabled, you may do so in your web server configuration.

404 Not Found

The 404 status code, or a Not Found error, means that the user is able to communicate with the server but it is unable to locate the requested file or resource.

404 errors can occur in a large variety of situations. If the user is unexpectedly receiving a 404 Not Found error, here are some questions to ask while troubleshooting:

Error In Generating Keys No Available Resources For Kids

  • Does the link that directed the user to your server resource have a typographical error in it?
  • Did the user type in the wrong URL?
  • Does the file exist in the correct location on the server? Was the resource was moved or deleted on the server?
  • Does the server configuration have the correct document root location?
  • Does the user that owns the web server worker process have privileges to traverse to the directory that the requested file is in? (Hint: directories require read and execute permissions to be accessed)
  • Is the resource being accessed a symbolic link? If so, ensure the web server is configured to follow symbolic links

500 Internal Server Error

The 500 status code, or Internal Server Error, means that server cannot process the request for an unknown reason. Sometimes this code will appear when more specific 5xx errors are more appropriate.

This most common cause for this error is server misconfiguration (e.g. a malformed .htaccess file) or missing packages (e.g. trying to execute a PHP file without PHP installed properly).

502 Bad Gateway

The 502 status code, or Bad Gateway error, means that the server is a gateway or proxy server, and it is not receiving a valid response from the backend servers that should actually fulfill the request.

If the server in question is a reverse proxy server, such as a load balancer, here are a few things to check:

  • The backend servers (where the HTTP requests are being forwarded to) are healthy
  • The reverse proxy is configured properly, with the proper backends specified
  • The network connection between the backend servers and reverse proxy server is healthy. If the servers can communicate on other ports, make sure that the firewall is allowing the traffic between them
  • If your web application is configured to listen on a socket, ensure that the socket exists in the correct location and that it has the proper permissions

503 Service Unavailable

The 503 status code, or Service Unavailable error, means that the server is overloaded or under maintenance. This error implies that the service should become available at some point.

Error In Generating Keys No Available Resources Online

If the server is not under maintenance, this can indicate that the server does not have enough CPU or memory resources to handle all of the incoming requests, or that the web server needs to be configured to allow more users, threads, or processes.

504 Gateway Timeout

The 504 status code, or Gateway Timeout error, means that the server is a gateway or proxy server, and it is not receiving a response from the backend servers within the allowed time period.

This typically occurs in the following situations:

  • The network connection between the servers is poor
  • The backend server that is fulfilling the request is too slow, due to poor performance
  • The gateway or proxy server’s timeout duration is too short

Conclusion

Now that you are familiar with the most common HTTP error codes, and common solutions to those codes, you should have a good basis for troubleshooting issues with your web servers or applications.

If you encounter any error codes that were not mentioned in this guide, or if you know of other likely solutions to the ones that were described, feel free to discuss them in the comments!