Azure storage emulator unable to initialize - azure

I've upgraded Azure Storage Emulator from 2.3 to 2.4. WAStorageEmulator.exe has been renamed to AzureStorageEmulator.exe but that's not the issue.
When I run
AzureStorageEmulator init -forcecreate
I simply get an error that Google returns with zero results:
Error: User-specified instance not found. Please correct this and re-run initial
ization.
Edit
I had to do a start and stop and then I was able to init. Because I had previous version of emulator installed I already have WAStorageEmulatorDb34 on my local SQL server instance. After I run init command I can see that no new database is being created (like WAStorageEmulatorDb42).
So I thought that the newest version may be using older DB. I then ran a query in MSSMS to check for existing blob containers and I can still see both containers I created on the older emulator containing blobs I added.
When I then accessed Development Azure Storage in Visual Studio it showed no containers whatsoever. So the new version apparently doesn't use old DB. But which one? And where is it?
Ok so I thought I'd run init one more time but with additional parameters to put DB on my SQL server instance:
AzureStorageEmulator init -server localhost -sqlinstance MSSQLSERVER -forcecreate
And then I get the aforementioned error. Again...
I'm running CMD as admin with elevated permissions.

Solution that eventually worked
Additional info
Azure Storage Emulator normally creates tables in the LocalDB storage. Depending on the emulator version these may be in various DB instances. You can check each storage emulator version's configuration in
%USERPROFILE%\AppData\Local\[AzureStorageEmulatorFolder]\*.config
Different versions have different folder names from DevelopmentStorage, WAStorageEmulator to latest (4.2) AzureStorageEmulator.
In this subfolder you'll find at least one config file that will correspond to your installed Azure storage emulator's version. If you open it, you'll see how it's configured and where it saved its tables. This is also true if you create initialization on any existing full SQL server instance.
The problem when I was trying to initialize my Azure Storage Emulator (ASE) is that I was also providing SQL server's instance which is the default one (MSSQLSERVER). I shouldn't be providing this information in the first place but only provide information about server
So the correct command line call is
AzureStorageEmulator init -server localhost -forcecreate
This created my database on my local SQL server. From here on, it's up to you how you'll migrate from an existing ASE database (if you already had one before) to the new one.

The issue I ran into is more or less an user error.
Azure Storage Emulator 4.6
Error : User-specified instance not found. Please correct this and
re-run initialization.
and
Resolution : I didn't have a windows authenticated login to my local
sql instance.

Related

Azure DataFactory Linked Service FileSystem Errornr

Azure DataFactory File System Linked Service is not working with this error:
Error details
Error code
28051
Details
c could not be resolved.
I tried to connect file excel in onpremise machine using the self hosted integration runtimeg
Appears that ours auto-updated on 11/11 and it hasn't worked since then for connecting to C drive like it has.
But I've fixed this for myself. have change the Host from c:\ to \\servername\c$ and now testing the connection is successful.
I started experimenting this same issue in two different Integration Runtimes after they updated to version 5.22.8312.1. For some reason I was unable to reach any path under C: from Azure Data Factory, but I was able to reach network paths.
I solved the issue mapping the desired local path to a network location, and making sure that the user I'm using to connect has access to that path. After that, I changed the path from C:\path\to\file.csv to \\localhost\path\to\file.csv. Make sure that this new path works on the local machine before trying in Azure Data Factory.
For those having problems with UNC share paths, you can use the relative path ".\..\..\..\..\" instead of "C:\" as well, as I wrote in this related question: Integration Runtime automatically updated, and now I can't copy data from onprem location

Azure function - "Did not find any initialized language workers"

I'm running an Azure function in Azure, the function gets triggered by a file being uploaded to blob storage container. The function detects the new blob (file) but then outputs the following message - Did not find any initialized language workers.
Setup:
Azure function using Python 3.6.8
Running on linux machine
Built and deployed using azure devops (for ci/cd capability)
Blob Trigger Function
I have run the code locally using the same blob storage container, the same configuration values and the local instance of the azure function works as expected.
The functions core purpose is to read in the .xml file uploaded into blob storage container and parse and transform the data in the xml to be stored as Json in cosmos db.
I expect the process to complete like on my local instance with my documents in cosmos db, but it looks like the function doesn't actually get to process anything due to the following error:
Did not find any initialized language workers
Troy Witthoeft's answer was almost certainly the right one at the time the question was asked, but this error message is very general. I've had this error recently on runtime 3.0.14287.0. I saw the error on many attempted invocations over about 1 hour, but before and after that everything worked fine with no intervention.
I worked with an Azure support engineer who gave some pointers that could be generally useful:
Python versions: if you have function runtime version ~3 set under the Configuration blade, then the platform may choose any of python versions 3.6, 3.7, or 3.8 to run your code. So you should test your code against all three of these versions. Or, as per that link's suggestion, create the function app using the --runtime-version switch to specify a specific python version.
Consumption plans: this error may be related to a consumption-priced app having idled off and taking a little longer to warm back up again. This depends, of course, on the usage pattern of the app. (I infer (but the Engineer didn't say this) that perhaps if the Azure datacenter my app is in happens to be quite busy when my app wants to restart, it might just have to wait for some resources to become available.). You could address this either by paying for an always-on function app, or by rigging some kind of heartbeat process to stop the app idling for too long. (Easiest with a HTTP trigger: probably just ping it?)
The Engineer was able to see a lower-level error message generated by the Azure platform, that wasn't available to me in Application Insights: ARM authentication token validation failed. This was raised in Microsoft.Azure.WebJobs.Script.WebHost.Security.Authentication.ArmAuthenticationHandler.HandleAuthenticate() at /src/azure-functions-host/src/WebJobs.Script.WebHost/Security/Authentication/Arm/ArmAuthenticationHandler.cs. There was a long stack trace with innermost exception being: System.Security.Cryptography.CryptographicException : Padding is invalid and cannot be removed.. Neither of us were able to make complete sense of this and I'm not clear whether the responsibility for this error lies within the HandleAuthenticate() call, or outside (invalid input token from... where?).
The last of these points may be some obscure bug within the Azure Functions Host codebase, or some other platform problem, or totally misleading and unrelated.
Same error but different technology, environment, and root cause.
Technology Net 5, target system windows. In my case, I was using dependency injection to add a few services, I was getting one parameter from the environment variables inside the .ConfigureServices() section, but when I deployed I forget to add the variable to the application settings in azure, because of that I was getting this weird error.
This is due to SDK version, I would suggest to deploy fresh function App in Azure and deploy your code there. 2 things to check :
Make sure your local function app SDK version matches with Azure function app.
Check python version both side.
This error is most likely github issue #4384. This bug was identified, and a fix was released mid-june 2020. Apps running on version 3.0.14063 or greater should be fine. List of versions is here.
You can use azure application insights to check your version. KUSTO Query the logs. The exception table, azure SDK column has your version.
If you are on the dedicated App Service plan, you may be able to "pull" the latest version from Microsoft by deleting and redeploying your app. If you are on consumption plan, then you may need to wait for this bugfix to rollout to all servers.
Took me a while to find the cause as well, but it was related to me installing a version of protobuf explicitly which conflicted with what was used by Azure Functions. Fair, there was a warning about that in the docs. How I found it: went to <your app name>.scm.azurewebsites.net/api/logstream and looked for any errors I could find.

How to solve DSInit not found error in Microsoft Azure?

i've read some articles "http://www.c-sharpcorner.com/UploadFile/40e97e/windows-azu-creating-and-deploying-worker-role/"
if i try to run my code' error occurs:
ERROR: Windows Azure Tools: Failed to initialize the Development Storage service. Unable to start Development Storage
i made some investigation to solve this boring problem:
http://www.nimbo.com/blog/error-failed-to-initialize-windows-azure-storage-emulator/
http://kristofmattei.be/2010/01/28/windows-azure-sdk-connecting-to-non-sqlexpress-instance/
if i run "dsinit /sqlinstance:." if i use :"WAStorageEmulator init –forcecreate" result 's below:
Error: "DsInit can not found"
If you're using Azure SDK 2.3, please note that DSInit.exe has been removed from the SDK. It has been replaced with WAStorageEmulator.exe which can be found in C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator folder.
To initialize storage emulator, the command you will use is:
WAStorageEmulator init -forcecreate
This is similar to DSInit /forceCreate.
There are some other options available as well:
WAStorageEmulator clear table
Removes just the tables from storage emulator.
WAStorageEmulator clear blob
Removes just the blob containers from storage emulator
WAStorageEmulator clear queue
Removes just the queues from storage emulator.
WAStorageEmulator clear all
Removes all tables, queues and blob containers without deleting the database.
I wrote a blog post about it as well where I talked in somewhat more details about this. You can read the blog post here: http://gauravmantri.com/2014/04/04/managing-storage-emulator-in-azure-sdk-version-2-3
I came across this issue when the emulator wouldn't initialise with SQL SERVER installed (it looks for SQLEXPRESS by default). For Microsoft Azure Storage Emulator v5.8 the accepted answer no longer works. I found the solution on the Microsoft site. In summary:
From the console window that opens on starting the emulator you can use the following commands:
If you want to initialise a specific SQL Server Instance
AzureStorageEmulator.exe init /server <SQLServerInstance>
You can also use the following command, which directs the emulator to use the default SQL Server instance
AzureStorageEmulator.exe init /server .
Or, you can use the following command, which reinitializes the database to the default LocalDB instance
AzureStorageEmulator.exe init /forceCreate

Your role instances have recycled a number of times during an update or upgrade operation

I am trying to deploy a Cloud Service with 1 Web Role to Azure.
When I do so, I get this message:
Your role instances have recycled a number of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent the role instances from running. Verify your code does not throw unhandled exceptions and that your configuration settings are correct and then start another update or upgrade operation.
The project runs just fine locally, and I'm having a hard time figuring out how to start debugging this issue. Are there any common problems that cause this message or steps to figure out what is causing it?
See https://learn.microsoft.com/en-us/archive/blogs/kwill/windows-azure-paas-compute-diagnostics-data. This will walk through all of the diagnostic data available as well as how to troubleshoot the most common issues.
We also had this annoying problem and in our case:
We use local storage, but it wasn't defined in service definition (or Worker Role's properties)
Our worker role project has reference to a service project which has reference to data layer project. But, the worker role project doesn't have reference to the data layer project. As soon as we added reference to data layer project in worker role project, it deploys successfully.
Problem #1 can be easily noticed if you first run the project in your local machine. Exception will be thrown.
Problem #2, however, is more difficult, mainly because it runs just fine in local machine. After 5 days of trouble shooting, we finally found the problem. So, check all references and try to add sub-reference projects, those that are referenced by other references.
We had similar problem, and it was due to some DDLs failed to load. (due to different version from the one MS have deployed to the VM)
Try to set CopyLocal to "true" for all the References in the project, and re-deploy.
I would either remote desktop to the cloud instance and review the Windows Event Logs for exceptions or redeploy with IntelliTrace Enabled. If you choose the later, you can download the IntelliTrace logs from Visual Studio and debug
http://msdn.microsoft.com/en-us/library/windowsazure/ff683671.aspx
One way to find out the actual error is to click on the " 1 instance" at the top of Dashboard after trying to deploy your web role. It will tell you the status of the role instance. The status should include more information about the type of error which blocks your deployment.
It depends on what your case is. For me, the status claimed that I had an unhandled Security exception. After some investigation, it turned out that under my role's OnStart(), I tried to create a event source. However, Azure service doesn't have the permission to create an event source.
For more possible issues, check http://blogs.msdn.com/b/kwill/archive/2013/09/06/troubleshooting-scenario-3-role-stuck-in-busy.aspx
For me, the issue was with my SQL Azure DB firewall rules. My Azure SQL Database servers are not set to "Allow Access to Azure services", so I have to explicitly list IPs that are allowed.
I discovered this after wrapping my code in a try/catch that swallowed all exceptions, refactoring my OnStart() and RunAsync() methods, and setting all my references to Copy Local = True. None of that worked, then I saw that I had this line in my RunAsync() method:
log4net.Config.XmlConfigurator.Configure();
I am using the AdoNetAdapter for log4net and connecting to an Azure SQL DB for logging, so that led me to check the firewall rules.
For me, I had some differing version of nuget packages in my various projects. Once I consolidated everything to the same version(s), it worked fine.
With the release of Windows Azure SDK version 2.2 for Visual Studio 2012 and 2013, Now you can Remote Debug Cloud Resources within Visual Studio.
Once your cloud service is published and running live in the cloud, you can simply set a breakpoint in your local source code. This may help you in digging out what's going wrong!

Unable to start Message Engine in Websphere

I am facing a problem while starting the websphere message engine for one of the application deployed on websphere. This application is getting deployed automatically as a part of the installation of Websphere Lombardi 7.2 express edition. It's using websphere 7 internally to deploy it. When I try to start the message engine from the administrative console of websphere I am getting following error:
The messaging engine ProcessCenter01.twperfsvr-twperfsvr_bus cannot be started as there is no runtime initialized for it yet, retry the operation once it has initialized. For the runtime to successfully initialize the hosting server must be started, have its 'SIB service' already enabled, and dynamic configuration reload enabled. If this is a newly configured messaging engine and it is the first messaging engine to be hosted on this server, then it is most likely the 'SIB service' was not previously enabled and thus the server will need to be restarted. The messaging engine runtime might not be initializing because of an error while trying to start, examine the SystemOut.log of the hosting server to check for error messages indicating the problem.
After restarting the server, the same error shows. Can anyone help me to to find what gets loaded as a part of "initialization of runtime"? Are there any config files etc. that I need to check to solve this issue? I am suspecting some missing configuration causing error to load the runtime for this particular application.
I too faced this issue today had to delete all the files under the message store
check the directory-file path mentioned in
Application servers > server1 > Messaging engines > XXX.server1-primaryBus > File store
Just Enable the SIB Services For the particular Server.
Example:Server-->Application Server-->click on Server Name-->right hand side we can see SIB services-->Check box the Enable services.
This will solve your problem
Recently I have faced the same issue when I rebuilt the jvms in UAT envt. After searching on web I found that because of the old messages saved in the message store(flat files in my envt) the messaging engines was not getting initiated. After deleting the old messaging store and restarting the servers it got initialized.
I have struggled with this problem too.
In our situation the problem was that the file message store location was used that was already created for a different (or old) message-engine.
If you add a busmember to the service-bus and use a file store implementation, then you need to supply the path for the store and log folder. Make sure these locations don't exist yet, other wise you will run in the problem above. The message-engine for this member will use these folders.
If you have a script for creating the message-bus infrastructure, make sure that when you delete the bus or remove message-engines, that you remove the file store/log folders for these, before you re-run your script.
Another possibility is that you are using a external database as a data store, and the user that is used for the connection is not allowed to create a database. You might find a ffdc entry like this:
DB2 SQL Error: SQLCODE=-552, SQLSTATE=42502, SQLERRMC=DB2ADMIN;CREATE
SCHEMA, DRIVER=3.61.65
Then you have to go to your database administration tool and give DB2ADMIN the proper privileges. Then restart the server or cluster.
Finally this issue is been resolved. I did not create the schema in SQL Server with same name as that of the username I gave to connect SQL Server during the installation of WLE 7.2
Please find details about this at below link:
http://www.ibm.com/developerworks/forums/message.jspa?messageID=14795282

Resources