Azure Storage Emulator error and does not start - azure

This error is really driving me crazy. (Terminal running in administrator mode)
Initialization of azure storage emulator in sql server 2014:
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator>.\wastorage
emulator init -server MY-PC
Windows Azure Storage Emulator 3.0.0.0 command line tool
The storage emulator was successfully initialized and is ready to use.
Error when starting server:
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator>.\wastorage
emulator start
Windows Azure Storage Emulator 3.0.0.0 command line tool
Unhandled Exception: System.TimeoutException: Unable to open wait handle.
at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessControll
er.InternalWaitForStorageEmulator(Int32 timeoutInMilliseconds)
at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessControll
er.EnsureRunning(Int32 timeoutInMilliseconds)
at Microsoft.WindowsAzure.Storage.Emulator.StartCommand.RunCommand()
at Microsoft.WindowsAzure.Storage.Emulator.Program.Main(String[] args)

Check if you are running BitTorrent/uTorrent or similar software using port 10000.
Check Steve Marx' blog post about the issue. http://blog.smarx.com/posts/windows-azure-storage-emulator-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process
In case that post disappears, the command to check if any other software is using that port is:
C:\Users\smarx>netstat -p tcp -ano | findstr :10000
TCP 127.0.0.1:10000 0.0.0.0:0 LISTENING 3672

Summarizing and adding additional points to other answers to this question.
Open C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe file in a notepad or a notepad++ editor.
Look at the services section.
<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10001/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>
Try to open URL for "Blob" in a web browser.
In my case it is
http://127.0.0.1:10000/
If you are unable to open the URL or if there is a error, this is the reason why you are not unable to start Azure Storage Emulator.
Try below steps to resolve the issue.
1) Check if the port 10000 is busy or used by any other process.
To know this you can type the below command in the command prompt
netstat -na | find "10000"
Kill the process.
Now start the Azure Storage Emulator in -inprocess mode
In the Azure Storage Emulator's command prompt type
AzureStorageEmulator.exe start -inprocess
Ctrl+c and then
AzureStorageEmulator.exe start
If this did not resolve the issue try second step.
2) Run this
netsh http add iplisten 127.0.0.1
and then in the Azure Storage Emulator's command prompt type
AzureStorageEmulator.exe start -inprocess
Ctrl+c and then
AzureStorageEmulator.exe start

I have same issue after Azure tools update (2.3 version). After hours of research I found strange solution - set 'Start Windows Azure storage emulator' to 'False' (in properties of Azure project).

The issue maybe port 10000 is being occupied. Storage emulator runs on port 10000. So you need to kill that process. On windows, open cmd as admin and run following commands.
First find the process occupying port 10000
netstat -ano | findstr :10000
kill the process
taskkill /PID <process id> /F
Now try starting emulator again.

In the file C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe.config
you need to change port numbers:

Make sure the user that initialized the emulator is the same as the user that is starting the emulator. Note that if you elevate as a different user to run initialization, then the initialization only applies to that user.
If that doesn't help, you can try to launch the emulator with the -inprocess flag to get a more detailed error message:
WAStorageEmulator start -inprocess

Run Microsoft Azure Command Prompt as administrator and try to first initialize using AzureStorageEmulator.exe init and then start using AzureStorageEmulator.exe start commands. It worked for my case.

I had same issue since I had to rejoin my machine to the domain and the user profile got recreated.
I noticed that it was starting with option -inprocess from elevated cmd.
Then I realized that it has to do with urlac and I solved deleting old ones with following commands:
(from elevated cmd)
netsh http delete urlacl url=http://127.0.0.1:10000/
netsh http delete urlacl url=http://127.0.0.1:10001/
netsh http delete urlacl url=http://127.0.0.1:10002/
After that simply start as usual, the tool will recreate what necessary.
Now I can use it without elevation.

It is also worth to try to run the command prompt with: "Run As Administrator"
and then run the command:
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
That did the trick for me!

Another option is to change the ip binding that the emulator uses in the config file located in the storage emulator directory.
Find wastorageemulator.exe.config
and change
<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10001/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>
This would be usefull if another application is already using that port and you cannot uninstall.

if you are trying to start "Azure storage emulator" through Visual Studio=>Server explorer, make sure that you are starting visual studio as an administrator.
I was able to get this issue fixed by running the "Azure storage emulator" on the command prompt, by running the command prompt as an administrator.

open command prompt as administrator
run command: cd C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator
run command: AzureStorageEmulator start

There is some info here that might help:
AzureStorageEmulator.exe init –server MyMachine –sqlinstance **.** –forcecreate –inprocess
See this link.

I just hit this, and it turns out that Microsoft Teams was using port 10000. Forcing teams to quit resolved the issue. 🤷

For me there was nothing running on the needed ports, the issue was that Visual Studio was not started in Administrator mode so the process couldn't be started.
When I went to the Azure Storage Emulator CLI from "Start" that launches a command shell that is also not in Administrator mode which obviously produces the same result.
Opening a command shell in Admin mode did the job.

Windows Backup Agent was running on my VM box on port 10000 - moving to 10003 (via the .exe.config file worked)

First you should initialize the emulator database and configuration be starting
AzureStorageEmulator.exe as administrator with a key init:
AzureStorageEmulator.exe init
Then, if you still receive an error:
Service Status: Blob http://127.0.0.1:10000/ False
The process cannot access the file because it is being used by another process
Error: Unable to start the storage emulator.
try to change 127.0.0.1 to localhost for all services in
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe.config

It worked for me:
Press the Windows key and search "Azure Storage Emulator"
It shows me an error message "..Cannot create the database "AzureStorageEmulatorDb510"
I opened the SSMS and looked for that database but I found "AzureStorageEmulatorDb59"
I renamed the database to "AzureStorageEmulatorDb510"
Try again run "Azure Storage Emulator"

The reason for me was Hyper-V. It reserves a lot of ports. You can check reserved ports netsh int ip show excludedportrange protocol=tcp. Easiest solution - change ports in config file.

I had the same problem, I tried many ways, nothing was blocking port 10000. I tried updating the emulator config to Localhost instead of 127.0.0.1 here
<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10001/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>
but I had the timeout issue again.
Finally, I had to uninstall my IIS. and problem solved. there should be a way to make them work together.

I have had this happen recently, and it was because I'd recently installed the HDInsight emulator. It appears this was auto-starting the storage emulator causing an error when VS attempted to start it resulting in an error.
Setting the "Start Microsoft Azure storage emulator" value to False worked in this case also.

I encountered the same problem. I found out that, the port 10000 is being used by another process. In my case, utorrent was using it. It could be Bittorrent if that's what you are using. After uninstalling it, it started smoothly with altering my data.
If your torrent downloader means so much to you, you can consider solving your issue from that angle. I hope this works.

For users of the newly released documentdb emulator...Microsoft thought it is a good idea that the documentdb emulator uses the same port as the Storage emulator ;) The only way you can access your storage is by shutting down documentdb emulator and restart Visual Studio and voila you can use it again :facepalm:

I got similar issue with visual studio while trying to run Azure Functions. AzureStorageEmulator.exe init worked for me

I experienced a power outage and after rebooting received the Unhandled Exception: System.TimeoutException message attempting to launch and debug an Azure Functions project from Visual Studio 2019. I tried many (if not all) of the other suggested answers on this thread to no avail. Including but not necessarily limited to ...
Checking for processes using ports 10000-10002, (none were)
Running Visual Studio and/or AzureStorageEmulator as administrator
Deleting / recreating the storage database
Attempted netsh http add iplisten 127.0.0.1 etc. from #Ram Pratap's answer
Changed hostname and port number bindings
Tried AzureStorageEmulator init and AzureStoreEmulator start -inprocess
What finally worked for me was ...
Installing the Storage Emulator using the standalone installer
This then allowed me to fully uninstall just the Storage Emulator using Add & Remove Programs, followed by a restart.
Next I reinstalled the Storage Emulator using the standalone installer, followed by a restart.
Finally I ran AzureStorageEmulator start it worked!

Had the same issue, deleting the AzureStorageEmulatorDb510* files in my user folder(C:\Users{UserName}) and running C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe init /forceCreate solved it for me. I was then able to start with AzureStorageEmulator.exe start.
Also ran the Cmd.exe in administrator mode.

Had the same issue, node.exe is usually the one using port 127.0.0.1:1000 to 10003, which are used for StorageEmulator as well. so easy solution to try is, kill the node process from task manager,
Also test by stopping the IIS (if on windows) and test if everything works fine.

In my case AzureStorageEmulator.exe was throwing this error because i updated my VS 2022 and it installed azurite with it which was holding the port :10000.
I solved this by ending the task in Task Manager
As pointed out by Dale Francis in one of the comments of top answer

IDK but none of the solutions work for me. Then accidently I noticed an icon in my taskbar hidden items. It was showing me that my computer emulator is shutdown. Once I start the emulator by following the shown steps it is working fine.

Related

Cloud Explorer Equivalent Debug VS2022 for zipped published code uploaded to storage?

Cloud explorer in VS2022 has been removed. I publish & zip the code and upload it to Azure in a private azure storage account that then runs Function Apps (running from a package file). How can I debug remotely like I used to do with clould explorer?
Publish does not offer the Hosting option. so the Stackoverflow answers don't work for me. Also I have connected the Function App to Connected Services and I click on Attach debuger but it does not stop the code when executed, i.e. step-in code to debug doesn't work like Cloud Explorer did.
After deployment checks some settings.
Check Remote debugging is ON on azure portal and Select the Remote Visual Studio version, if not selected.
Go to visual studio and go-to tool and select get tool and features. You just need to take Azure development. after this Storage Emulator is automatically installed if not installed go to the Microsoft site and install this.
If installed you can run it by using this command. AzureStorageEmulator.exe start. More information about Azure Storage Emulator for Development and testing by Microsoft Document on
Change Configuration from Release to Debug.
Start Azure Storage Emulator below cmds. if not installed in your system click here to Download from the Microsoft site.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe
Windows Azure Storage Emulator 5.10.0.0 command line tool
Error: Expected command as first argument.
Usage:
AzureStorageEmulator.exe init : Initialize the emulator database and configuration.
AzureStorageEmulator.exe start : Start the emulator.
AzureStorageEmulator.exe stop : Stop the emulator.
AzureStorageEmulator.exe status : Get current emulator status.
AzureStorageEmulator.exe clear : Delete all data in the emulator.
AzureStorageEmulator.exe help [command] : Show general or command-specific help.
See the following URL for more command line help: http://go.microsoft.com/fwlink/?LinkId=392235
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.10.0.0 command line tool
Autodetect requested. Autodetecting SQL Instance to use.
Looking for a LocalDB Installation.
Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
Found a LocalDB Installation.
Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
Found SQL Instance (localdb)\MSSQLLocalDB.
Creating database AzureStorageEmulatorDb510 on SQL instance '(localdb)\MSSQLLocalDB'.
Granting database access to user FAREAST\v-pusharma.
Database access for user FAREAST\v-pusharma was granted.
Initialization successful. The storage emulator is now ready for use.
Error: Unable to start the storage emulator.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>netstat -p tcp -ano | findstr :10000
TCP 127.0.0.1:10000 0.0.0.0:0 LISTENING 9764
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>taskkill /F /PID 9764
SUCCESS: The process with PID 9764 has been terminated.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.10.0.0 command line tool
The storage emulator was successfully started.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>
Check whether Storage Emulator show is connected or not.
Then add break point on visiual studio and run function . it's working,
Using this option to attach debug remotely. because in visual studio 2022 not show Cloud Explorer.

Remote debugging nodejs app in Intellij with Docker - port already allocated

I want to start debugging node.js app using Intellij and node.js interpreter running on Docker. While running the app works, when I try to debug I get the error:
Error running 'index.js'
com.github.dockerjava.api.exception.InternalServerErrorException:
{"message":"driver failed programming external connectivity on
endpoint focused_poincare
(a17137973880d1be7c6a74fc142184fdda31e0dec8ebd539b09d9dbe4cf70014):
Error starting userland proxy: Bind for 0.0.0.0:55578 failed: port is
already allocated"}
Remote interpreter was configured acccording to the documentation. I have created a new Node.js Run/Debug configuration and entered the following data:
.
What might be the cause for debugging not working?
I use:
Intellij Idea Ultimate v. 2019.1.4 Preview
Intellij NodeJS plugin v. 191.7479.1, NodeJS remote interpreter plugin v. 191.6014.8 and Docker plugin v. 191.7141.44
Docker Desktop Community v. 2.0.0.3
EDIT: Adressing the comments:
Local debugging works. The file (index.js) that I am trying to run consists only of console.log('Hello world!') so I don't spawn any child processes on my own. My host system has Windows 10 Pro as OS, so for checking the open ports on host system I used netstat -an | find "55578", which returned nothing. Moreover, if I try to run docker manually from the command line, using docker run -it -p 55578:55578 node, everything runs and no error is given.
Also, each time I try remote debugging, the port number given by Intellij in an error message seems to be random high port number. I tried looking for open ports just after getting error message, but never found one that is open with a number reported by Intellij and those indeed appear in the output:
My Run/Debug configuration:
My Docker configuration (I had to check "Expose daemon on tcp://localhost:2375 without TLS" in Docker configuration to make Intellij and Docker play together):
EDIT: When I add --inspect-brk=0.0.0.0:55432 as "Node Parameters" in "Run/Debug Configurations" Intellij windows (per this bug report) the container nad program start, but debugging seems to be no-op (e.g. the program does not stop on breakpoints).
After updating to Intellij v. 2019.2 I was able to get the container debugging to work using the workaround already mentioned in my question.
I have added a parameter --inspect-brk=0.0.0.0:55432 to Node parameters option in Run/Debug configuration (see the picture below) and everything seems to be working, including the breakpoints.

Deluge Windows Service

I am trying to run the DelugeD.exe as a windows service. After installing Deluge and creating the services using NSSM, I try to start the service and get the following error:
Windows could not start the Deluged service on Local Computer. The service did not return an error. This could be and internal Windows error or and internal service error. If the problem persists, contact your system administrator.
I have created the Deluge-web-debug.exe as a Windows Service and it successfully starts. When I browse to http://localhost:8112 the web client appears, however the Connection Manager shows the Deluged daemon has not started.
No error, no logs, what could be the cause?
Thanks!
I thought I would start from scratch, reinstall deluge for windows, and try again. After this it still failed.
Using nssm, the error was:
deluged: Unexpected status SERVICE_PAUSED in response to START control.
This placed the service in a perpetual Paused state.
Finally, I decided to tear down the services using nssm remove, kill any running deluge processes, then delete the Config folder where deluged was pointing.
I am certain deleting the Config folder and all files was what solved the problem, and now it starts successfully.
I think I just solved this one by checking the "Allow service to interact with desktop" box under the LogOn tab for both the Deluge daemon and the WebUI services I created with nssm:
"Allow service to interact with desktop" in services.msc

ReferenceError: Can't find variable: __fbBatchedBridge

Using just the default code from react-native init AwesomeProject, when I run the app I get the 'ReferenceError: Can't find variable: __fbBatchedBridge (line 1 in the generated bundle)'.
And, when I 'Reload JS', the app just has the white background rather than any 'hello world' views. I haven't touched any of the code from the init.
Any ideas how to resolve the error?
Screenshot (click to view full size):
Using:
Ubuntu 15.10, 64-bit
Node.js v5.3.0
reactive-native v0.1.7
Nexus 5X, API 6.0.1
I generally see this when the packager hasn't started. Ensure that is running by running react-native start
I had the same issue while using Visual Studio Android Emulator. When the red screen shows up type in the command line
adb shell input keyevent 82
This will trigger the shake event and launch the dev menu
Then hit Dev Settings > Debug server host & port for device and enter <your ip adress>:8081. If for some reason you cannot type in the field you can trigger the text action in the command line by using
adb shell input text <your ip adress>:8081
i solved it using this command
adb reverse tcp:8081 tcp:8081
Thank you rmevans9 and Anonsage for your answers!
I am using HTC One on Ubuntu and there is no menu option, anyway this is the summary of the answers that worked for me:
Create the project
$ react-native init MyProject
$ cd MyProject/
In first console tab run and leave it running as you develop (react-native start alternative):
$ npm start
In second console tab compile and install the project (connect the device to the USB if you want):
$ react-native run-android
Fix ReferenceError: Can't find variable: __fbBatchedBridge:
Find you local ip address by executing ifconfig on Linux/Mac, for example:
inet addr:192.168.0.3
Shake the device to see menu options while app is running (if you don't have "Menu" button)
Go to Dev Settings -> Debug server host & port for device in Debugging section and copy your local ip address with the specific port:
192.168.0.3:8081 (the port can be viewed when running npm start from the first tab)
then go/press Back
Shake the device to see menu options again and press Enable Live Reload (to see changes live when editing)
Shake the device to see menu options again and press Reload JS
This worked for me according to documentation
http://facebook.github.io/react-native/docs/running-on-device-android.html#content
Using adb reverse
Note that this option is available on devices running android 5.0+ (API 21).
Have your device connected via USB with debugging enabled (see paragraph above on how to enable USB debugging on your device).
Run adb reverse tcp:8081 tcp:8081
You can use Reload JS and other development options with no extra configuration
Then Run react-native run-android which will automatically start dev server on 8081 port on your dev machine if not already running.
I encountered this when I had specified different react native versions in my packages.json and my build.gradle file. Making sure they matched, running npm update, and rebuilding from android studio fixed the issue for me.
I had the same problem.
As I followed all the steps mentioned in other answers, I could not resolve the issue.
In my case the firewall was blocking the packets coming from android.
Also If you have submitted your app for the iTunes store, also make sure that your jsCodeLocation is back to the localhost, as shown bellow:
jsCodeLocation = [NSURL URLWithString:#"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
/**
* OPTION 2
* Load from pre-bundled file on disk. The static bundle is automatically
* generated by "Bundle React Native code and images" build step.
*/
//jsCodeLocation = [[NSBundle mainBundle] URLForResource:#"main" withExtension:#"jsbundle"];

Shutdown Cassandra server and then restart it in windows 7

I installed single node cluster in my local dev box which is running Windows 7 and it was working fine. Due to some reason, I need to restart my desktop and then after that whenever I am doing like this on the command prompt, it always gives me the below exception-
S:\Apache Cassandra\apache-cassandra-1.2.3\bin>cassandra -f
Starting Cassandra Server
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Meaning port being used somewhere. I have made some changes in cassandra.yaml file so I need to shutdown the Cassandra server and then restart it again.
Can anybody help me with this?
Thanks for the help.
in windows7, with apache cassandra, a pid.txt file gets created at the root folder of cassandra. Give following instruction to stop the server:
d:/cassandra/bin> stop-server -p ../pid.txt -f
Running -f starts the server as a service, you can stop it through the task manager.
It sounds like your Cassandra server starts on it's own as a service in the background when your machine boots. You can configure windows startup services. To run cassandra in the foreground on windows simply use:
> cassandra.bat
If your are using Cassandra bundled with DataStax Community Edition and running as a service on startup of your machine then you can execute following commands to start and stop Cassandra server.
Start command prompt with admin rights
run following commands
net start DataStax_Cassandra_Community_Server
net stop DataStax_Cassandra_Community_Server

Resources