Error when start Azure Function in Visual Studio Pro 2017 - visual-studio

when I want to start the Azure Function in 2017 the error comes up:
I don't know why.
07.07.2020 20:21:57] Retrying to start listener for function 'Function1' (Attempt 5)
[07.07.2020 20:21:57] A ScriptHost error has occurred
[07.07.2020 20:21:57] The listener for function 'Function1' was unable to start. Microsoft.Azure.WebJobs.Extensions.DocumentDB: The listener has already been started or is starting.
[07.07.2020 20:21:57] The listener for function 'Function1' was unable to start. Microsoft.Azure.WebJobs.Extensions.DocumentDB: The listener has already been started or is starting.
[07.07.2020 20:21:57]
[07.07.2020 20:21:57] The listener for function 'Function1' was unable to start.
[07.07.2020 20:21:57] The listener for function 'Function1' was unable to start. Microsoft.Azure.WebJobs.Extensions.DocumentDB: The listener has already been started or is starting.
What should I do?
Thanks

Please show the local.settings.json of your function app. Maybe the connection string has some problem.
If your firewall restricts func from accessing the Storage Account, then this error may be reported. The firewall is one of the reasons that the listener cannot access the virtual Storage Emulator.
When running the function locally, all triggers except httptrigger need to use the Storage Emulator. If the firewall restricts the listener's access to virtual storage, problems can occur when performing functions.
Try disabling the firewall and see if that resolves the issue.
Of course, it is also possible that the Storage Emulator service is not open. Try typing
"%programfiles(x86)%\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" status
in cmd to check the status.
If it returns false, enter the following command to start the Storage Emulator:
"%programfiles(x86)%\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" init
"%programfiles(x86)%\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start
To sum up:
This type of problem is generally for three reasons.
1.Connection string error prevents connection,
2.firewall is set
3.some services are not turned on.
Please do the above steps and let me know whether you can solve this problem.:)

Related

IO Exception in .NET Core application

I am just starting working with ASP.NET Core 2.0 on a Windows machine. I cannot run kestrel server due to the port 5000 being used by some other apps.
Exception has occurred: CLR/System.IO.IOException An unhandled exception of
type 'System.IO.IOException' occurred in System.Private.CoreLib.dll: 'Failed to
bind to address http://127.0.0.1:5000: address already in use.'
The issue is that I kill the process and run the dotnet run command. It works but for the second time I get the error again. So somehow I should the port should be released when I stop debugging but it doesn't. Any tips?
I have faced the same. Here is the solution please refer to this:-
https://github.com/dotnet/core/issues/3110
change your port in the program.cs and launch setting.json file.
eg - : webBuilder.UseUrls("http://localhost:6980");
I had the same problem, and based on the karnveer0098 answer, I just changed the line "applicationUrl": "http://localhost:60758" inside of 'launchSettings.json', to another port number, then all came back to normal.

Cannot authenticate in Visual Studio 2017

My Visual Studio 2017 trial period has expired, and I am unable to log in to unlock the program. Authentication fails every time, with the error:
An error has occurred and we can no longer retrieve information for your account.
Please reenter your credentials.
I checked the logs for the servicehub, and they all say (line breaks added for readability):
Error :
Error starting hub controller:
System.InvalidOperationException:
Controller terminated before accepting connections.
Exit code: -1073741502.
or
Error :
Exception retrying connect to json rpc:
System.InvalidOperationException:
Controller terminated before accepting connections.
Exit code: -1073741502.
I have tried running the program as an administrator, deleting the session tokens, using different Microsoft accounts, and even using different PCs. The different PCs issue makes me think that it could be some problem with my network, but I'm not sure what that could be.
I don't know if you use nodejs on your machine, but I do and a nodejs config thing was totally the underlying issue. I had added a 'NODE_OPTIONS' environment variable and for whatever reason it apparently wreaks havoc on Visual Studio and other software.
See this article: https://developercommunity.visualstudio.com/content/problem/287499/systeminvalidoperationexception-controller-termina.html

ORA-12560:TNS:Protocol adapter error in OracleService ORCL is still running

I use sqlplus to try to connect / as sysdba.
I tried to set oracle_sid=ORCL, but it's not better.
I Google[d] for this error but not able to find the actual reason and how to solve this error ?
ORA-12560: TNS:protocol adaptor error
Can anyone tell me a perfect solution to solve login problem.
If you don't have both the listener and the database services up, then you will get this error.
From your post, OracleServiceORCL is running. Now you need to check for this service: OracleHOMENAMETNSListener (where HOMENAME is the name of your oracle home). Find it and start it if it's not running.
If they are both running, then try bouncing the listener service. If that doesn't do it, try bouncing the database service. (BUT: if any other users could be connected, DO NOT bounce either service as that will kick them out.)
If that doesn't do it then run lsnrctl status and lsnrctl services to check whether the listener is coming up properly and listening for ORCL.
I have faced similar error few days ago . Here is what I did:
Checked the status of listener. It was up and running.
Checked oracle services. It was up and started.
So what I did next is bouncing the services and the issue then was resolved.

Azure Mobile Service: Cannot connect to local instance hosted in IIS Express

I've got a weird problem with Azure Mobile Services hosted on IIS Express. I searched around SO and the web, but I did not find anything that works for my problem, so here it is:
When I create a new Azure Mobile Service project in Visual Studio (VS 2013 Upd. 4, Azure Tools 2.2, Admin mode), then all seems to be fine at first sight, and I can interact with it as expected through the test webpage that pops up after (Ctrl+) F5.
However, when I try to call the service programmatically from a client, e.g. like in this test
[TestFixture]
public class Fixture
{
private static readonly MobileServiceClient ServiceClient =
new MobileServiceClient("http://localhost:64481/");
[Test]
public async void Test()
{
IMobileServiceTable<TodoItem> table = ServiceClient.GetTable<TodoItem>();
List<TodoItem> items = await table.ToListAsync();
Assert.That(items.Count, Is.EqualTo(2));
}
}
... then I (most of the time) cannot access the service, and I get this exception:
System.Net.Http.HttpRequestException : An error occurred while sending the request.
----> System.Net.WebException : Unable to connect to the remote server
----> System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond [::1]:64481
The weird thing is that the above test occasionally succeeds, but most of the time fails with this exception. I cannot find any regularity behind this. It seems like there's a bigger chance for it to succeed if IISExpress was freshly started and the test webpage is open, but that's not a strict rule.
So far, I have monitored the iisexpress.exe process with ProcessMonitor and executed the command line manually from the console (Admin mode). When I do that, again the test page is working as expected and I can see the requests coming through at the console. I can also see that in the error scenario no request is reaching the web server. So obviously it gets blocked by something in the chain that comes beforehand.
Remark: The error also occurs without any firewall running.
I'm totally stuck on this, having no idea what the problem could be, not even what else I could do to find out what's going on. Any help on this is appreciated.

On XAMPP for Windows: Apache closes abruptly

I started using XAMPP for Windows recently. Yesterday, it was working just fine, but not today. I had already disabled the use of port 80 and 4xx from Skype (after seeing lots of posts about that) and had even removed the software from startup. MYSQL and FileZilla start just fine with XAMPP, but I get this when I try to use Apache (which I can install it as a service):
Attempting to start Apache app...
Executing "f:\xampp\apache\bin\httpd.exe"
Return code: 0
Status change detected: running
Status change detected: stopped
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
Now, I am also getting this on Event Viewer: "Event Log is unavailable. Verify that the service is running." When going to services and I try to initialize Apache2.4, it gives me a message and later disappears from the Service list.
I can start Apache when I install the serivce and then click on "Start," but then it gets stuck on "Attempting to start Apache service..." and nothing happens.
I also click on Apache's "Start" without installing the service, and that's when I get the long error above.
When I click on "Start" again, after the "Attempting to start Apache service..," I get "Status change detected: running" and then immediately "Status change detected: stopped" and then again
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
Not sure what to do now. Please help.
I am having identical issues. XAMPP was also working yesterday and this morning has not been able to start. My error log does not display anything from today, but some logs from yesterday are present. I will let you know if I find the answer...
EDIT: I reinstalled XAMPP and everything seems to work fine now. Not an ideal answer I know...
Maybe u have opned skype at the same time because Apache's port its the same as the skype.So when a conflit exist Apache refuse to respond.

Resources