Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL server creation exception #397

Open
joyal-ks opened this issue Aug 27, 2018 · 2 comments
Open

SQL server creation exception #397

joyal-ks opened this issue Aug 27, 2018 · 2 comments

Comments

@joyal-ks
Copy link

Hi

I am trying to create SQL server in azure following the official documentation but I am getting deserialization exception (SQL server is getting created ).

code I am using:

fog_sql_service.sql_servers.create(
    resource_group:  'myRG',
    location: 'Australia East',
    name: 'sqlcfx9',
    version: '12.0',
    administrator_login: 'admino',
    administrator_login_password: 'welcome12#',
    tags:   {key: 'value1'})

This is the error that I am getting:

in rescue in block in create_or_update_async': { (MsRest::DeserializationError) "exception_message": "751: unexpected token at '<?xml version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/servers/sqlcfx9</id><category term=\"Microsoft.SqlServer.Management.Service.Domain.ArmResourceProvider.Server\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" /><link rel=\"edit\" title=\"Server\" href=\"servers/sqlcfx9\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/elasticPools\" type=\"application/atom+xml;type=feed\" title=\"elasticPools\" href=\"servers/sqlcfx9/elasticPools\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/elasticPoolsV2\" type=\"application/atom+xml;type=feed\" title=\"elasticPoolsV2\" href=\"servers/sqlcfx9/elasticPoolsV2\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/databases\" type=\"application/atom+xml;type=feed\" title=\"databases\" href=\"servers/sqlcfx9/databases\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/recoverableDatabases\" type=\"application/atom+xml;type=feed\" title=\"recoverableDatabases\" href=\"servers/sqlcfx9/recoverableDatabases\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/restorableDroppedDatabases\" type=\"application/atom+xml;type=feed\" title=\"restorableDroppedDatabases\" href=\"servers/sqlcfx9/restorableDroppedDatabases\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/serviceObjectives\" type=\"application/atom+xml;type=feed\" title=\"serviceObjectives\" href=\"servers/sqlcfx9/serviceObjectives\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/firewallRules\" type=\"application/atom+xml;type=feed\" title=\"firewallRules\" href=\"servers/sqlcfx9/firewallRules\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/usages\" type=\"application/atom+xml;type=feed\" title=\"usages\" href=\"servers/sqlcfx9/usages\" /><link rel=\"http://schemas.mi crosoft.com/ado/2007/08/dataservices/related/connectionPolicies\" type=\"application/atom+xml;type=feed\" title=\"connectionPolicies\" href=\"servers/sqlcfx9/connectionPolicies\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/auditingPolicies\" type=\"application/atom+xml;type=feed\" title=\"auditingPolicies\" href=\"servers/sqlcfx9/auditingPolicies\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/backupLongTermRetentionPolicies\" type=\"application/atom+xml;type=feed\" title=\"backupLongTermRetentionPolicies\" href=\"servers/sqlcfx9/backupLongTermRetentionPolicies\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/backupLongTermRetentionVaults\" type=\"application/atom+xml;type=feed\" title=\"backupLongTermRetentionVaults\" href=\"servers/sqlcfx9/backupLongTermRetentionVaults\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/importExportOperationResults\" type=\"application/atom+xml;type=feed\" title=\"importExportOperationResults\" href=\"servers/sqlcfx9/importExportOperationResults\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/recommendedElasticPools\" type=\"application/atom+xml;type=feed\" title=\"recommendedElasticPools\" href=\"servers/sqlcfx9/recommendedElasticPools\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/administrators\" type=\"application/atom+xml;type=feed\" title=\"administrators\" href=\"servers/sqlcfx9/administrators\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/administratorOperationresults\" type=\"application/atom+xml;type=feed\" title=\"administratorOperationresults\" href=\"servers/sqlcfx9/administratorOperationresults\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/disasterRecoveryConfiguration\" type=\"application/atom+xml;type=feed\" title=\"disasterRecoveryConfiguration\" href=\"servers/sqlcfx9/disasterRecoveryConfiguration\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/communicationLinks\" type=\"application/atom+xml;type=feed\" title=\"communicationLinks\" href=\"servers/sqlcfx9/communicationLinks\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/advisors\" type=\"application/atom+xml;type=feed\" title=\"advisors\" href=\"servers/sqlcfx9/advisors\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/operationR esults\" type=\"application/atom+xml;type=feed\" title=\"operationResults\" href=\"servers/sqlcfx9/operationResults\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/aggregatedDatabaseMetrics\" type=\"application/atom+xml;type=feed\" title=\"aggregatedDatabaseMetrics\" href=\"servers/sqlcfx9/aggregatedDatabaseMetrics\" /><title /><updated>2018-08-27T18:34:56Z</updated><author><name /></author><m:action metadata=\"https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/$metadata#ArmResourceProviderModel.import\" title=\"import\" target=\"https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/servers/sqlcfx9/import\" /><content type=\"application/xml\"><m:properties><d:id>/subscriptions/<mysubscription-id>/resourceGroups/RG/providers/Microsoft.Sql/servers/sqlcfx9</d:id><d:name>sqlcfx9</d:name><d:type>Microsoft.Sql/servers</d:type><d:location>Australia East</d:location><d:kind>v12.0</d:kind><d:properties m:type=\"Microsoft.SqlServer.Management.Service.Domain.ArmResourceProvider.Server_ServerProperties\"><d:fullyQualifiedDomainName>sqlcfx9.database.windows.net</d:fullyQualifiedDomainName><d:administratorLogin>admino</d:administratorLogin><d:administratorLoginPassword>welcome12#</d:administratorLoginPassword><d:externalAdministratorLogin m:null=\"true\" /><d:externalAdministratorSid m:null=\"true\" /><d:version>12.0</d:version><d:state>Ready</d:state></d:properties></m:properties></content></entry>'", "message": "Error occurred in deserializing the response", "stacktrace": [ "C:/Ruby24-x64/lib/ruby/2.4.0/json/common.rb:156:in parse'",
"C:/Ruby24-x64/lib/ruby/2.4.0/json/common.rb:156:in parse'", "C:/Ruby24-x64/lib/ruby/2.4.0/json/common.rb:335:in load'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/azure_mgmt_sql-0.9.0/lib/generated/azure_mgmt_sql/servers.rb:644:in block in create_or_update_async'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb:501:in block in on_fulfill'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb:24:in block in execute'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in block in synchronize'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in synchronize'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in synchronize'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb:19:in execute'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb:531:in block in realize'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in run_task'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in block (3 levels) in create_worker'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in loop'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in block (2 levels) in create_worker'",
"C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in catch'", "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in block in create_worker'"
],
"result": {
"response": {
"body": "<entry xml:base="https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/\" xmlns="http://www.w3.org/2005/Atom\" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices\" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" xmlns:georss="http://www.georss.org/georss\" xmlns:gml="http://www.opengis.net/gml\">https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/servers/sqlcfx9<category term="Microsoft.SqlServer.Management.Service.Domain.ArmResourceProvider.Server" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" /><link rel="edit" title="Server" href="servers/sqlcfx9" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/elasticPools\" type="application/atom+xml;type=feed" title="elasticPools" href="servers/sqlcfx9/elasticPools" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/elasticPoolsV2\" type="application/atom+xml;type=feed" title="elasticPoolsV2" href="servers/sqlcfx9/elasticPoolsV2" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/databases\" type="application/atom+xml;type=feed" title="databases" href="servers/sqlcfx9/databases" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/recoverableDatabases\" type="application/atom+xml;type=feed" title="recoverableDatabases" href="servers/sqlcfx9/recoverableDatabases" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/restorableDroppedDatabases\" type="application/atom+xml;type=feed" title="restorableDroppedDatabases" href="servers/sqlcfx9/restorableDroppedDatabases" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/serviceObjectives\" type="application/atom+xml;type=feed" title="serviceObjectives" href="servers/sqlcfx9/serviceObjectives" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/firewallRules\" type="application/atom+xml;type=feed" title="firewallRules" href="servers/sqlcfx9/firewallRules" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/usages\" type="application/atom+xml;type=feed" title="usages" href="servers/sqlcfx9/usages" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservice
s/related/connectionPolicies" type="application/atom+xml;type=feed" title="connectionPolicies" href="servers/sqlcfx9/connectionPolicies" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/auditingPolicies\" type="application/atom+xml;type=feed" title="auditingPolicies" href="servers/sqlcfx9/auditingPolicies" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/backupLongTermRetentionPolicies\" type="application/atom+xml;type=feed" title="backupLongTermRetentionPolicies" href="servers/sqlcfx9/backupLongTermRetentionPolicies" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/backupLongTermRetentionVaults\" type="application/atom+xml;type=feed" title="backupLongTermRetentionVaults" href="servers/sqlcfx9/backupLongTermRetentionVaults" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/importExportOperationResults\" type="application/atom+xml;type=feed" title="importExportOperationResults" href="servers/sqlcfx9/importExportOperationResults" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/recommendedElasticPools\" type="application/atom+xml;type=feed" title="recommendedElasticPools" href="servers/sqlcfx9/recommendedElasticPools" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/administrators\" type="application/atom+xml;type=feed" title="administrators" href="servers/sqlcfx9/administrators" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/administratorOperationresults\" type="application/atom+xml;type=feed" title="administratorOperationresults" href="servers/sqlcfx9/administratorOperationresults" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/disasterRecoveryConfiguration\" type="application/atom+xml;type=feed" title="disasterRecoveryConfiguration" href="servers/sqlcfx9/disasterRecoveryConfiguration" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/communicationLinks\" type="application/atom+xml;type=feed" title="communicationLinks" href="servers/sqlcfx9/communicationLinks" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/advisors\" type="application/atom+xml;type=feed" title="advisors" href="servers/sqlcfx9/advisors" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/operationResults\" type="application/atom+xm
l;type=feed" title="operationResults" href="servers/sqlcfx9/operationResults" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/aggregatedDatabaseMetrics\" type="application/atom+xml;type=feed" title="aggregatedDatabaseMetrics" href="servers/sqlcfx9/aggregatedDatabaseMetrics" /><title />2018-08-27T18:34:56Z<m:action metadata="https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/$metadata#ArmResourceProviderModel.import\" title="import" target="https://management.australiaeast.control.database.windows.net/v2/ManagementService.Trusted.svc/modules/ServerManagement/servers/sqlcfx9/import\" /><content type="application/xml"><m:properties><d:id>/subscriptions//resourceGroups/RG/providers/Microsoft.Sql/servers/sqlcfx9</d:id><d:name>sqlcfx9</d:name><d:type>Microsoft.Sql/servers</d:type><d:location>Australia East</d:location><d:kind>v12.0</d:kind><d:properties m:type="Microsoft.SqlServer.Management.Service.Domain.ArmResourceProvider.Server_ServerProperties"><d:fullyQualifiedDomainName>sqlcfx9.database.windows.net</d:fullyQualifiedDomainName><d:administratorLogin>admino</d:administratorLogin><d:administratorLoginPassword>welcome12#</d:administratorLoginPassword><d:externalAdministratorLogin m:null="true" /><d:externalAdministratorSid m:null="true" /><d:version>12.0</d:version><d:state>Ready</d:state></d:properties></m:properties>",
"headers": {
"cache-control": "no-store, no-cache",
"content-length": "6335",
"content-type": "application/atom+xml; type=entry; charset=utf-8",
"x-ms-request-id": "76f7a536-b3fb-4c3d-b7ea-c728e7ba00a5",
"x-content-type-options": "nosniff",
"preference-applied": "return-content",
"dataserviceversion": "3.0;",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-ms-ratelimit-remaining-subscription-writes": "1199",
"server": "Microsoft-HTTPAPI/2.0",
"x-ms-correlation-request-id": "968e4653-9f43-4c99-b780-2d6e052d733f",
"x-ms-routing-request-id": "WESTINDIA:20180827T183457Z:968e4653-9f43-4c99-b780-2d6e052d733f",
"date": "Mon, 27 Aug 2018 18:34:57 GMT",
"connection": "close"
},
"status": 201
},
"request": {
"base_uri": "https://management.azure.com/",
"path_template": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}",
"method": "put",
"path_params": {
"subscriptionId": "",
"resourceGroupName": "RG",
"serverName": "sqlcfx9"
},
"skip_encoding_path_params": null,
"query_params": {
"api-version": "2014-04-01"
},
"skip_encoding_query_params": null,
"headers": {
"Content-Type": "application/json; charset=utf-8",
"accept-language": "en-US",
"x-ms-client-request-id": "d1167587-33b1-4fbd-b9ef-eb0c53055d09"
},
"body": "{"location":"Australia East","properties":{"version":"12.0","administratorLogin":"admino","administratorLoginPassword":"welcome12#"}}",
"middlewares": [
[
"MsRest::RetryPolicyMiddleware",
{
"times": 3,
"retry": 0.02
}
],
[
"cookie_jar"
]
],
"log": null
}
}
}
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/azure_mgmt_sql-0.9.0/lib/generated/azure_mgmt_sql/servers.rb:643:in block in create_or_update_async' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb:501:in block in on_fulfill'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb:24:in block in execute' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in block in synchronize'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in synchronize' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in synchronize'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb:19:in execute' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb:531:in block in realize'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in run_task' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in block (3 levels) in create_worker'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in loop' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in block (2 levels) in create_worker'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in catch' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in block in create_worker'

Process finished with exit code 1

@parweenk
Copy link

parweenk commented Sep 4, 2018

Hi am facing exactly same issue... If anyone can help on this will be appreciated. Thanks.

@bilal-naeem-confiz
Copy link
Contributor

@joyal-ks @parweenk
I'll take a look at this and let you know what I find. Most probably it has something to do with parsing the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants