I’m having a bit of an issue with my test install of sg-jira-bridge. I’m running both it and the daemon locally, against our company’s Shotgrid instance and a cloud-hosted Jira instance. The bridge connects to Jira (through a dedicated user’s API key), but throws an error in the bridge’s running console whenever something tries to connect to it, image pasted below. I’ve determined that this happens when it’s the daemon and also when I manually navigate to the bridge in a browser.
I’ve followed the Quickstart guide on setting up fields for both Shotgrid and Jira, set up environment variables, have created a JIRA web hook to point to https://localhost/sg2jira/default, pointed a project at the same address, and ran both. The daemon seems to run fine.
I do recognize that I am running everything locally against cloud services, and this might be the entire problem. Is it as simple as just needing external routing to the bridge? What other steps would I take to diagnose this? The “self” in the error refers to the RequestHandler, which I’ve never seen initiated without a path value. I’m running both of these in Python 2.7.16 on Windows 10. I’ve included the command line I’m running this with in the screenshot.
I’m getting the same errors in console while navigating to https://localhost.
I’m running ngrok, and the web response is giving me gateway errors that I’m assuming are related:
ngrok gateway error
The server returned an invalid or incomplete HTTP response.
ERR_NGROK_3004
I’m pointing the webhook on the JIRA end to the ngrok endpoint. I’m forwarding port 443 in Windows Firewall. On the Shotgrid side I’ve tried it both with Jira Sync URL pointing to localhost and to the ngrok gateway URL.
When running the daemon, I also get the following error:
(devenv) C:\dev\shotgunEvents\src>python shotgunEventDaemon.py foreground
INFO:engine:Using SG Python API version 3.3.2
INFO:engine:Loading plugin at C:/dev/sg-jira-bridge/triggers\sg_jira_event_trigger.py
INFO:engine:Loading plugin at C:/dev/sg-jira-bridge/triggers\__init__.py
Traceback (most recent call last):
File "shotgunEventDaemon.py", line 1222, in emit
smtp = smtplib.SMTP(self.mailhost, port)
File "c:\python27\lib\smtplib.py", line 256, in __init__
(code, msg) = self.connect(host, port)
File "c:\python27\lib\smtplib.py", line 317, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "c:\python27\lib\smtplib.py", line 292, in _get_socket
return socket.create_connection((host, port), timeout)
File "c:\python27\lib\socket.py", line 575, in create_connection
raise err
error: [Errno 10061] No connection could be made because the target machine actively refused it
Logged from file shotgunEventDaemon.py, line 861
All of this looks like the bridge is refusing connections, or that there’s some sort of issue there.
I did figure out my path issues (ngrok did fix it), but the SMTP issue in the daemon still affects me. I’ve worked around it for now by overriding the daemon’s CustomSMTPHandler class, but if I don’t have an SMTP server defined it stops running with a warning. Can I run the Event Daemon without an SMTP server defined, and if so, how do I set the .conf file to reflect this?