smarx / waz-cmd

Ruby-based command-line tool for the Windows Azure Service Management API
Microsoft Public License
11 stars 3 forks source link

Error when deploying an application #2

Closed ariofrio closed 12 years ago

ariofrio commented 12 years ago

Immediately after calling cspack.exe, I run:

waz deploy myapp staging .\myapp.cspkg .\ServiceConfiguration.Cloud.cscfg

And I get the following error:

Operation failed (400)
BadRequest: The file provided is not a valid service package. Detailed error
code: FileFormatException

What could this be caused by?

smarx commented 12 years ago

Without any other information, I would assume the error message is correct, and you have an invalid .cspkg. Have you tried deploying it via the portal to confirm it's not a quirk of waz-cmd?

ariofrio commented 12 years ago

I just deployed my .cspkg file via the portal and it worked fine. After deleting the deployment, I ran:

waz deploy myapp production .\PythonRole.cspkg .\ServiceConfiguration.Cloud.cscfg

And I got the same error. Here are the relevant files, generated using .\pack.cmd on a fresh clone of PythonRole.

smarx commented 12 years ago

Strange. I downloaded your .cspkg and .cscfg and was able to deploy it without trouble using waz deploy smarxtest staging PythonRole.cspkg ServiceConfiguration.Cloud.cscfg. Just to check some assumptions: "myapp" above is a placeholder for the name of an app you have created? And you have at least one storage account? Have you ever deployed anything successfully with waz-cmd, or is everything failing?

ariofrio commented 12 years ago

Yes to both questions. Deploying with waz-cmd has never worked for me, but other operations work fine.

I've tried looking for more information on when "FileFormatException" is returned, but I couldn't find any. I've also tried manually uploading the service package to blob storage using Azure Storage Explorer and deploying from the portal using that, and it worked fine.

By the way, it seems that the package is not getting uploaded properly by waz-cmd (I downloaded both files using Azure Storage Explorer):

$ md5sum original/PythonRole.cspkg
8717784d1bba4c2be548662f940b437e *original/PythonRole.cspkg
$ md5sum manually/PythonRole.cspkg # using Azure Storage Explorer
8717784d1bba4c2be548662f940b437e *manually/PythonRole.cspkg
$ md5sum.exe waz-cmd/PythonRole.cspkg # by commenting out bin/waz:503
c4cb8074e8f6ee088e691e04af78bf42 *waz-cmd/PythonRole.cspkg