VSTS deploy Azure function error: 4294967295 - azure

I'm using VSTS to deploy an Azure Function. I started getting some errors during the deployment from yesterday morning.
The error code is 4294967295, usually related to a locked folder but the error message says The user name or password is incorrect, so I'm a little confused.
2018-01-28T08:31:58.6556754Z ##[error]Failed to deploy web package to App Service.
2018-01-28T08:31:58.6568081Z ##[error]Error: (1/28/2018 8:31:58 AM) An error occurred when the request was processed on the remote computer.
Error: The user name or password is incorrect.
at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.DirectoryEx.CreateDirectory(String path)
at Microsoft.Web.Deployment.DirectoryEx.CreateDirectoriesFromRoot(String path)
at Microsoft.Web.Deployment.AppOfflineRuleHandler.AddAppOfflineFilesToEachApp(DeploymentBaseContext baseContext, Boolean whatIf)
at Microsoft.Web.Deployment.AppOfflineRuleHandler.Add(DeploymentSyncContext syncContext, DeploymentObject destinationObject, DeploymentObject& sourceObject, Boolean& proceed)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAdd(DeploymentObject destObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable1 passId, String user, String siteName)
Error count: 1.
2018-01-28T08:31:58.6575553Z ##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295

Based on your log, the Package or folder option for Azure App Service Deploy task is too broad. It matches more than one .zip files.
In the log, it matches two zip files:
d:\a\r1\a\Stamp BigBro\drop\HeartbeatMonitor.zip
d:\a\r1\a\temp_web_package_08951874997805498.zip
And the d:\a\r1\a\temp_web_package_08951874997805498.zip file(apparently it’s not as expected) is treated as package in msdeploy cli.
So you should change the Package or folder option to make sure it can only much the HeartbeatMonitor.zip fie. Such as any of below formats can work:
$(System.DefaultWorkingDirectory)\**\HeartbeatMonitor.zip
$(System.DefaultWorkingDirectory)\Stamp BigBro\drop\HeartbeatMonitor.zip

Related

Azure Storage Emulator returns 500 internal server error

I have an application that uses Azure Storage, when I have reinstalled the Azure Storage Emulator and Explorer and then run the app, I get this error.
The app was working before I reinstalled.
[WebException: The remote server returned an error: (500) Internal Server Error.]
Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException(HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:54
Microsoft.WindowsAzure.Storage.Blob.<>c__DisplayClass57.<PutBlobImpl>b__56(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlockBlob.cs:3132
Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse(IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:300
[StorageException: The remote server returned an error: (500) Internal Server Error.]
Microsoft.WindowsAzure.Storage.Core.Util.StorageAsyncResult`1.End() in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\StorageAsyncResult.cs:77
Microsoft.WindowsAzure.Storage.Core.Util.<>c__DisplayClass7.<CreateCallbackVoid>b__5(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:121
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
Microsoft.AspNetCore.DataProtection.AzureStorage.<StoreElementAsync>d__14.MoveNext() +1308
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
Microsoft.AspNetCore.DataProtection.AzureStorage.AzureBlobXmlRepository.StoreElement(XElement element, String friendlyName) +161
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.CreateNewKey(Guid keyId, DateTimeOffset creationDate, DateTimeOffset activationDate, DateTimeOffset expirationDate) +1493
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CreateNewKey(DateTimeOffset activationDate, DateTimeOffset expirationDate) +150
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded) +645
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now) +12
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow) +517
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) +90
[WebException: The remote server returned an error: (500) Internal
Server Error.]
One of the workaround you may follow to resolve the above issue:
Try to rename the application name with some other name and restart the azure storage emulator(>run AzureStorageEmulator.exe start) and run the application.
Alternatively to resolve with Azure storage explorer please find this SO THREAD as suggested by #Seth .
For more information you can refer this SO THREAD .

Image resizer with azure blob storage. Returns "403 forbidden" when going through the resizer

We have been using image resizer with azurereader2 for quite a while with no problem. After a small release (that really shouldnt have anything to do with this) we suddenly get errors when we try to access the images through the resizer.
This is only a problem on our test environment, the new release and image resizer etc. works just fine in production.
Both production and test is hosted in azure, and both use their own azure blob storage.
example url:
test.mysite.com/images/pim/b6ffa894-bc8f-4f1b-a1e8-ef115b78a56f.jpg?width=250&height=312&format=jpg&scale=both&mode=pad
returns the following error
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\Common\Shared\Protocol\HttpResponseParsers.Common.cs:line 50
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.c__DisplayClass13.b__12(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobClient.cs:line 788
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 299
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult result) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 50
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.EndGetBlobReferenceFromServer(IAsyncResult asyncResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobClient.cs:line 630
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.c__DisplayClass1`1.b__0(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:line 66
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ImageResizer.Plugins.AzureReader2.AzureReader2Plugin.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ImageResizer.Util.AsyncUtils.RunSync[TResult](Func`1 func)
at ImageResizer.Storage.Blob.Open() in C:\projects\resizer\Plugins\ImageResizer.Storage\Blob.cs:line 41
at ImageResizer.ImageBuilder.GetStreamFromSource(Object source, ResizeSettings settings, Boolean& disposeStream, String& path, Boolean& restoreStreamPosition)
at ImageResizer.ImageBuilder.LoadImage(Object source, ResizeSettings settings, Boolean restoreStreamPos)
at ImageResizer.ImageBuilder.BuildJob(ImageJob job)
at ImageResizer.ImageBuilder.Build(ImageJob job)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings, Boolean disposeSource, Boolean addFileExtension)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings, Boolean disposeSource)
at ImageResizer.ImageBuilder.Build(Object source, Object dest, ResizeSettings settings)
at ImageResizer.InterceptModule.c__DisplayClass5_0.b__1(Stream stream)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.c__DisplayClass28_0.b__0()
at ImageResizer.Plugins.DiskCache.LockProvider.TryExecute(String key, Int32 timeoutMs, LockCallback success)
at ImageResizer.Plugins.DiskCache.CustomDiskCache.GetCachedFile(String keyBasis, String extension, ResizeImageDelegate writeCallback, Int32 timeoutMs, Boolean asynchronous)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(IResponseArgs e)
at ImageResizer.Plugins.DiskCache.DiskCache.Process(HttpContext context, IResponseArgs e)
at ImageResizer.InterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf)
at XXX.Web.Modules.CustomImageResizingInterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf) in E:\TeamCity\buildAgent\work\4773e55a378b97a1\src\Portal\Portal\Infrastructure\Web\Modules\CustomImageResizingInterceptModule.cs:line 15
at ImageResizer.InterceptModule.CheckRequest_PostAuthorizeRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request Information
RequestID:e8c13071-0001-00c2-437e-d8b9c7000000
RequestDate:Mon, 29 May 2017 13:19:16 GMT
StatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
the url
test.mysite.com/images/pim/b6ffa894-bc8f-4f1b-a1e8-ef115b78a56f.jpg correctly redirects to the image in the azure blob.
I have tried regenerating the access key for the blob storage, without any luck.
I have tried pointing to another blob storage from our test env, that does not work either.
I can access the test blob storage just fine from my local environment.
/resizer.debug reports 0 issues detected.
Any help is greatly appreciated, let me know if i can provide additional info.
This is purely a azure blob storage connection problem, image resizer is not the culprit.

Error during deployment to azure from visual studio online

I'm getting this weird error when trying to deploy to azure from visual studio online:
Exception Message: Could not find a part of the path 'd:\a\src'. (type DirectoryNotFoundException)
Exception Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at Microsoft.TeamFoundation.Deployment.Workflow.Activities.FindPackageAndParametersFile.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I'm pretty sure that I am not using a folder named 'd:\a\src' in my solution.
I was able to fix it by changing the Build Agent Folder to something that involves $(SourceDir).

pipemapred waitoutputthreads subprocess failed with code 255

I am running a simple Map/Reduce job on Azure HDInsight (Hadoop). The mapper fails with the following error (from the JobTracker log)...
2014-03-27 16:42:50,330 INFO org.apache.hadoop.mapred.TaskInProgress: Error from attempt_201403262112_0004_m_000000_0: java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 255
at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:362)
at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:576)
at org.apache.hadoop.streaming.PipeMapper.close(PipeMapper.java:135)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
at org.apache.hadoop.streaming.PipeMapRunner.run(PipeMapRunner.java:36)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:429)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:365)
at org.apache.hadoop.mapred.Child$4.run(Child.java:266)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1233)
at org.apache.hadoop.mapred.Child.main(Child.java:260)
I am connecting to the cluster using the Hadoop.Connect method...
// Connect to the HDInsight cluster
var hadoop = Hadoop.Connect(hadoopClusterUri,
hadoopUserName,
localHadoopUser,
hadoopPassword,
asvAccount,
asvKey,
asvContainer,
createContinerIfNotExist);
Since the job is started and logged I assume the connection is successful. As a simple test, I am emitting a tiny amount of data...
context.EmitKeyValue("This is a key", "This is a value");
Completely stumped,
Bill
Update
This MapReduce spawns two jobs. This first completes successfully and the second fails with the following exception...
Unhandled Exception: Microsoft.Hadoop.MapReduce.StreamingException: The user type could not be loaded. DLL=MapReduce.exe, Type=PrescienceRx.MapReduce.BeneficiaryMapper ---> System.BadImageFormatException: Could not load file or assembly &apos;file:///c:\apps\temp\hdfs\mapred\local\taskTracker\admin\jobcache\job_201403262112_0006\attempt_201403262112_0006_m_000001_0\work\MapReduce.exe&apos; or one of its dependencies. An attempt was made to load a program with an incorrect format.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.Hadoop.MapReduce.MapperMain.Main()
--- End of inner exception stack trace ---
at Microsoft.Hadoop.MapReduce.MapperMain.Main()
at Microsoft.HdInsight.MapDriver.Program.Main(String[] args
It looks like System.BadImageFormatException: Could not load file or assembly is probably because of a mismatch between the loader's .Net version and your assembly. Try setting it back to 4.0 and then in the NuGet Package Manager Window do update-package -reinstall Microsoft.Hadoop.MapReduce to make sure you have all of the correct versions.
I set the target CPU to x64 in the solution's configuration manager and that resolved the issue.

Error publishing log file TFS2012

I have en problem with TFS2012 after i have install an Visual Studio 2012 on a Microsoft Server 2012. Im gettting this error:
Exception Message: TF270016: An error occurred publishing log files from 'D:\Builds\3_2\MES_Projects\PJDGatewayTester - Main\Sources\Src\LPS_CMData\PJDGatewayTest.log' to '\\Server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\logs'. Details: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\logs' is denied. (type PublishLogFileException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Inner Exception Details:
Exception Message: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\logs' is denied. (type UnauthorizedAccessException)
Exception Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.TeamFoundation.Common.FileSpec.CopyFile(String oldPath, String newPath, Boolean overwriteExisting)
at Microsoft.TeamFoundation.Build.Workflow.Activities.WindowsDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory)
at Microsoft.TeamFoundation.Build.Workflow.Activities.WindowsDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory, String[] renameIfExists)
at Microsoft.TeamFoundation.Build.Workflow.Activities.PublishLogFile.Execute(CodeActivityContext context)
The workflow instance has been canceled. (Reason: The activity 'Try Compile, Test, and Associate Changesets and Work Items' with ID 12211 threw or propagated an exception while being canceled.)
An error occurred while copying diagnostic activity logs to the drop location. Details: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\Logs' is denied.
An error occurred while copying diagnostic activity logs to the drop location. Details: Access to the path '\\server\Drop\Build\PJDGatewayTester - Main\PJDGatewayTester - Main_.6\Logs' is denied.
Looks like you just need to give permissions for your build service account to the drop location.

Resources