Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function host does not spin up with nonexisting SB subscription #635

Closed
azyl-scnsoft opened this issue Sep 2, 2016 · 10 comments
Closed
Milestone

Comments

@azyl-scnsoft
Copy link

azyl-scnsoft commented Sep 2, 2016

I have SB namespace without topics and subscriptions.
I created simple function with trigger bindings, configured with default values for topic\subscription names.
After restarting the app, Function host doesn't start anymore: 'Function host is not running.'
In host logs I see next log message:

40400: Endpoint not found., Resource:sb://alexzmeetupdashboard.servicebus.windows.net/mytopic/subscriptions/mysubscription. TrackingId:17db49ca-6428-4e23-937f-e39e10b44f62_G9, SystemTracker:alexzmeetupdashboard.servicebus.windows.net:mytopic/Subscriptions/mysubscription, Timestamp:9/2/2016 4:29:21 PM
Stopping Host

From Webjob source code, I see that topics and subscriptions are created only when access rights are set to Manage.

However, not sure if such configuration failure should make the host broken.

@lindydonna
Copy link
Contributor

Can you explain exactly what is going on? Is that connection string invalid? It sounds like you're saying that the misconfiguration caused the host to shut down, which does indeed seem like a poor user experience.

@azyl-scnsoft
Copy link
Author

azyl-scnsoft commented Sep 16, 2016

@lindydonna

Connection string is valid. I mostly use RootManageSharedAccessKey connection string for my functions.
The problem lays in using AccessRights.Listen

Steps to reproduce:

  1. Add new SB connection string (even with Manage permissions)
  2. Create SB subscription trigger function with following configuration:
    1. Set existing\nonexisting topic name
    1. Set nonexisting subscription name
    1. Set AccessRights to Listen

Expected result:
Binding error occured

Actual result:
Entire host became unresponsive.

@mathewc
Copy link
Member

mathewc commented Sep 16, 2016

@azyl-scnsoft I gather that you know that the last repro steps you provided would result in an expected error (i.e. can't listen on non-existent entities if we only have Listen rights and can't create them). The question is whether this should cause host startup failure.

We need to investigate more, but I believe that currently we don't have good support for errors involving the startup of listeners, which require valid connection strings / connectivity to underlying entities. In such cases, I do believe that a host level unhandled exception may occurr, meaning the host cannot start until the error is fixed. We need to verify that is the case, and improve if possible.

The host error you showed above should have been shown to you in the portal in a red bubble window. Can you confirm that is the case? While our current handling for these error paths is not ideal, we need to at least ensure the error is surfaced.

@azyl-scnsoft
Copy link
Author

@mathewc
Yes, I got popup message saying that webhost is in 'Internal Server Error' state.

@mathewc
Copy link
Member

mathewc commented Sep 16, 2016

Did you also get a descriptive error message pointing to the problem? You should have.

@mathewc
Copy link
Member

mathewc commented Oct 12, 2016

Remaining work here is to repro the issue and verify that the red bubble error includes a detailed error message indicating the issue. If it does, we can close this out as by design at this point.

@christopheranderson
Copy link
Contributor

For RC timeframe, can we do a more descriptive error message?

We likely also want to look at, later on, having the host not crash and provide more graceful error messages. Out of scope for now, though.

@christopheranderson christopheranderson added this to the rc milestone Oct 17, 2016
@alex-zyl
Copy link

alex-zyl commented Oct 18, 2016

@mathewc
Sorry for long delay. Yes, I confirm that I'm getting the error popup with the error message that I mentioned previously.

After a while, I also got this error popup

Error:
We are unable to reach your function app (Service Unavailable). Please try again later.
Session Id: fbb6e4a4c33a42cfa70b88c53899e65a
Timestamp: 2016-10-18T15:00:52.689Z

@christopheranderson
Copy link
Contributor

Moving this out as it is more complex than originally designed.

@mathewc
Copy link
Member

mathewc commented Mar 21, 2017

This has now been fixed by @mamaso in the latest release.

@mathewc mathewc closed this as completed Mar 21, 2017
@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants