Azure Storage Emulator fail to start - azure-storage-emulator

I'm trying to run Azure Function locally using Visual Studio and doing timed trigger, and I have set this in local.settings.json
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
But when I run it, it has an error "Invalid storage account 'devstoreaccount1'.
I try to start the emulator (admin, turned off firewall), it has this error. Default install, no modifications.
C:\Windows\system32>cd C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe init
Windows Azure Storage Emulator 5.2.0.0 command line tool
Found SQL Instance (localdb)\MSSQLLocalDB.
Creating database AzureStorageEmulatorDb52 on SQL instance '(localdb)\MSSQLLocalDB'.
Granting database access to user Robin-PC\Robin.
Database access for user Robin-PC\Robin was granted.
Initialization successful. The storage emulator is now ready for use.
The storage emulator was successfully initialized and is ready to use.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.2.0.0 command line tool
Unhandled Exception: System.TimeoutException: Unable to open wait handle.
at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessController.InternalWaitForStorageEmulator(Int32 timeoutInMilliseconds)
at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessController.EnsureRunning(Int32 timeoutInMilliseconds)
at Microsoft.WindowsAzure.Storage.Emulator.Commands.StartCommand.RunCommand()
at Microsoft.WindowsAzure.Storage.Emulator.Program.Main(String[] args)
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>

After many tries, I managed to find out why. The default 10000 port is taken by a background process. I followed this instruction to find out which process and killed it, then it will work.
https://stackoverflow.com/a/43787993/283598

In my case I had spun up the newer Azurite storage emulator, which used the same port number.
Terminating that storage emulator allowed me to start the (deprecated) Windows Azure Storage emulator.

I have this same issue, how i solved that issue is given below
open command prombt as admin and change directory to C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator
Run command "AzureStorageEmulator.exe start -inprocess "
This worked for me

Related

Where to find coredump on Azure App Service using Linux?

I am using Azure App Service hosted on linux to use a .Net Core 6.0 app.
I have a null pointer error that is resulting in a segfault, that in turn is taking down the app service. I have had a few errors that result in segfaults so while I can fix the null pointer I really want to find why the container is crashing.
I can see the the following in AppServiceConsoleLogs:
/opt/startup/startup.sh: line 17: 65 Segmentation fault (core dumped) dotnet xxx.dll
I am hoping if I can find the dumped core I might figure out the segmentation fault.
I have looked around the folders by going into the SSH console, but I cannot find anything that looks like memory dump.
Where to find coredump on Azure App Service using Linux?
I have deployed the .NET Core 6 App to Azure App service.
Navigate to Azure portal => your Deployed App Service => Advanced Tools => Go .
Click on - Site wwwroot.
Deployed files will be compiled into dll files.
Click on the file, you can see the content.
We can also check the files in Bash.
In Bash, Navigate to the Application root directory and run ls.You can see the deployed files.
In Configuration section => General Settings, check the startup command.
It has to be
dotnet YourAppName.dll
Make sure the dll is available in Bash or SSH.
Update:
We can find the core dumps in LogFiles/core folder.
But initially, it is disabled.
To enable it, we need to add the below command in Startup of the deployed app service.
ulimit -c unlimited
Thanks #Sourabh Edake for the command.
Restart the app. Whenever there is an exception, the core dump will be created in the mentioned LogFiles/core folder.

Unable to use MSDeploy from Local to Remote Server

Error image Unable to Remote Deploy my Webservice on to the remote machine from local machine. I have two servers that i would be needing to enable web deployment from local system to remote server Windows 2012 system. Upon searching multiple resources i found below steps that need to be ensured before performing the remote deploy using MsDeploy from Local to Remote .
Also Package works fine which is built from Visual Studio if i copy the files on to the remote server and run the command file it is able to deply the windows service on to IIS locally . But i would need this to be deployed from my local machine to remote server*
Steps I tried :
Ensure Web Deploy is installed.
Remote Services are running.
Under Management Service in IIS ensure Enable Remote connections
is enabled.
Ensure 80 and 8172 Ports are enabled and running ( ran the below steps )
Web Deploy is installed on the server that i'm trying to deploy the
package.
I try running the below code and it returns below error :
Command I provide :
C:\Users\xxxxx>net start wmsvc
The requested service has already been started.
C:\Users\xxxxxx>net start msdepsvc
The requested service has already been started.
Command I provide :
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy.exe -verb:sync -source:package="C:\Users\xxxxxx\Desktop\" -dest:auto="",ComputerName="https://serveripaddress:8172/MsDeploy.axd",UserName='domain/user',Password='password',AuthType='Basic' -allowUntrusted
Info: Using ID 'someinfoid like : 92c-da-sd-2398as823...... is generated' for connections to the remote server.
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the remote computer (""). On the remote computer, make sure that Web Deploy is installed and that `the required process ("Web Management Service") is started.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.
Installed Web Deploy Components
Ensured the Services are enabled ( Web Deploy / Remote Services )
Remote Server : Windows 2012
Local System : Windows 10

Could we deploy web site to azure web app use "MSDeployUseChecksum" config?

Actually,I got error when I deploy use "MSDeployUseChecksum" ,if remove "MSDeployUseChecksum", deploy will successed. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): msdeploy error ERROR_PROXY_GATEWAY: Web deployment task failed. (Could not connect to the remote computer ("dev-cms.scm.didix-dev-ase.p.azurewebsites.net") using the specified process ("Web Management Service"). This can happen if a proxy server is interrupting communication with the destination server. Disable the proxy server and try again. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_PROXY_GATEWAY.
pubxml file

Repository.RemoveUntrackedFiles() : access denied

Windows Server 2008
McAfee Agent v4.8.0.1938
no indexing service
ASP.NET C# app
libgit2sharp v0.21.0.176 NuGet package
My ASP.NET app uses libgit2sharp Repository.Clone() method to clone a GitHub repo to local repo
Running my app tests on my local workstation, I perform various operations against this repo with no issues.
However, once my app is deployed to a remote server and hosted inside IIS , I'm encountering what appear to be either permissions or locking issues.
Repository.RemoveUntrackedFiles()
Exception thrown :
Failed to rename lockfile to 'c:/github/my-org/my-repo/.git/index':
Access is denied.
If I re-attempt the operation it again fails but this time with a different exception :
The index is locked. This might be due to a concurrent or crashed
process.
Subsequent attempts ( no matter how many ) fail with this same exception.
Issue is not resolved with iisreset or reboot.
If I re-create the local repo by going to cli and deleting local repo folder and then running git clone, I'm now able to successfully execute various git operations until I again attempt Repository.RemoveUntrackedFiles() at which point the above error-sequence re-occurs.
EDIT : I'm also encountering similar issues with
Repository.Checkout()
Exception thrown :
Failed to rename lockfile to 'c:/github/my-org/my-repo/.git/index':
Access is denied.
I then go to the server and from the command line attempt git checkout master :
c:\github\opentable\service-ot-frontdoor-config>git checkout master
fatal: Unable to create 'c:/github/opentable/service-ot-frontdoor-config/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

CC.Net Access Denied Error

I have CruiseControl.Net setup as my continuous integration environment. I've been working on adding a Visual Studio 2008 Web Deployment Project to my solution but I'm getting a weird "access denied" error and I can't figure out why.
I have CC.Net running under its own account on my server which is a member of the administrators group, so the CC.Net service should have access to everything it needs. The problem is when I trigger a build from the web interface the build fails with the error:
C:\Program Files
(x86)\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(667,5):
error : Access is denied.
The particular task on that line is the "CreateVirtualDirectory" task to create an IIS virtual directory for my asp.net application.
What's weird is if I open a command prompt on my build server running as the exact same user account the CruiseControl service is running as and run my build script everything builds successfully - including the creation of the IIS virtual directory. It's only when a build is initiated through the web interface that it fails.
I don't understand what the difference is between the two since presumably they are both running as the same user with the same privileges.
Suggestions?
Is it possible that the virtual folder it is trying to create already exists? Another thought - when you run from a command line, it is possible you have different environment variables or drive mappings that CC.Net wouldn't have?

Resources