Failed to establish local tunnel in Jira Activity Tutorial

Relatively new dev here, and very new to Jira addons. I’ve gone through the Hello World tutorial fine, but now on the Jira Activity tutorial: https://developer.atlassian.com/cloud/jira/platform/project-activity/

When I run npm start, I get the following log with the error at the bottom:

Failed to establish local tunnel
err = Error: connect ECONNREFUSED 127.0.0.1:4041
Error: connect ECONNREFUSED 127.0.0.1:4041
Error: connect ECONNREFUSED 127.0.0.1:4041
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)

I’ve tried following some fixed on this thread: Error: ngrok is not yet ready to start tunnels, but the issue is still there. I’ve also checked that my firewalls are off. I’m wondering if the problem is on my end or if its an ACE configuration issue.

Any tips are welcome!

Thanks,
Jason

@JasonFu - can’t recreate the problem. I followed the tutorial from scratch. Do you have any other issues running local services on localhost? (i.e. nginx or Apache) What OS are you running?

I honestly wish I had tried this before posting, but I did the classic turn it off then back on, then npm rebuild. Now I can’t recreate the issue either. Just to answer the questions for posterity, I have a MBP on Mojave and I was running Apache and Nginx on 8080 and 8888 fine, but it was just that 4041 port that gave me errors. Thanks for following up!

Jason

Woot. Glad that you’re unblocked.

1 Like

I am having this exact same problem right now. Just following the tutorial, I get this “Failed to establish local tunnel” error constantly… and then suddenly I don’t?.. and then it comes back again with literally no code change.

I’ve turned it on and off again, to no avail.
I’ve done the tutorial last week without any issues. It just started today, doing the tutorial again from scratch.

This is a MBP running Mojave. I’m not running Apache or any other services.
Usually it manifests as

Failed to establish local tunnel
err = Error: [object Object]

but sometimes it is

Failed to establish local tunnel
err = Error: connect ECONNREFUSED 127.0.0.1:4041
Error: connect ECONNREFUSED 127.0.0.1:4041
Error: connect ECONNREFUSED 127.0.0.1:4041
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)

and for a short time I added some logging lines to register-jira-conf.js and the problem went away? Then I removed the logging lines and the problem reappeared. I added back the logging lines and… problem persisted? So I don’t know what’s happening here.