0

I am currently having troubles with connecting my function trigger to an IoT-Hub, overnight it broke somehow. Function version 4. Node.js version 14 LTS.

First I got an error saying I have to use web.jobs version 4.3.0, I changed the host.json to include this

host.json

Then it has started giving me a runtime error which I don't know how to fix, the error:

"[Error in the azure portal(EntityPath)][2]

I defined connection string in the portal which has the format

"Endpoint=sb//{iothub-ns-"somename"-"somenumber".servicebus.windows.net/}; SharedAccessKeyName={NameOfAccessKey};SharedAccessKey={TheKey};EntityPath={Name};

Lastly I tried removing the EntityPath which removed the error but then nothing came to the function anymore

Edit: I got it fixed by changing function version to 3 and reverting the original Host.json to be "version": "[2.*, 3.0.0)".

I have no idea how the runtime version got changed, even when I made new functions they would also get this error. It is probably just something I have done within my workspace that is causing this.

2 Answers2

0

while defining the connection string give the entity path as even hub compatible name

Endpoint=sb://<Event hub-compatible endpoint>.servicebus.windows.net/;EntityPath=<Event Hub compatible name>;SharedAccessKeyName=<keyName>;SharedAccessKey=<key>"
SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15
  • I should probably have made anew comment instead of making an edit to my post, but I did figure out a fix. I got it fixed by changing function version to 3 and reverting the original Host.json to be "version": "[2.*, 3.0.0)". I have no idea how the runtime version got changed, even when I made new functions they would also get this error. It is probably just something I have done within my workspace that is causing this. – Christoffer Mar 08 '22 at 12:29
0

It's an open bug, reported here - https://github.com/Azure/azure-functions-core-tools/issues/3034

Daniel Smolka
  • 176
  • 1
  • 5