getsentry / sentry-jira

A Plugin for sentry that lets you create JIRA issues
Other
95 stars 32 forks source link

Unable to connect to JIRA: Bad Response #46

Open davewongillies opened 11 years ago

davewongillies commented 11 years ago

When attempting to configure the plugin I get Unable to connect to JIRA: Bad Response. We're using Atlassian Ondemand Jira, which up until a recently, this plugin worked with. Not sure if there's something on the Ondemand side that broke this.

thurloat commented 11 years ago

Will look into this right away.

thurloat commented 11 years ago

I wasn't able to reproduce this connecting to ondemand from my self-hosted sentry. Are you using hosted sentry / can you confirm which version of the plugin you're using?

davewongillies commented 11 years ago

Yes, I'm using the Atlassian-host Ondemand JIRA. I've got 0.7.1 installed.

We use Google Apps Auth to log in to our JIRA instance so to rule things out, I created a non-Google account within JIRA and it failed to login as well. Also from within JIRA I don't see any login attempts for that account.

davewongillies commented 11 years ago

Here's a list of my currently installed pip packages:

BeautifulSoup==3.2.1
Django==1.4.5
MySQL-python==1.2.4c1
Pygments==1.6
South==0.7.6
amqp==1.0.12
anyjson==0.3.3
argparse==1.2.1
billiard==2.7.3.31
celery==3.0.21
chaussette==0.9
cssutils==0.9.10
distribute==0.6.32
django-appconf==0.5
django-bcrypt==0.9.2
django-celery==3.0.17
django-compressor==1.2
django-crispy-forms==1.2.8
django-indexer==0.3.0
django-openid-auth==0.4
django-paging==0.2.5
django-picklefield==0.3.0
django-pylibmc==0.5.0
django-secure==0.1.2
django-social-auth==0.7.23
django-social-auth-trello==1.0.3
django-static-compiler==0.3.3
django-templatetag-sugar==0.1
flower==0.5.1
greenlet==0.4.0
gunicorn==0.17.4
hiredis==0.1.1
httpagentparser==1.2.2
httplib2==0.8
kombu==2.5.12
logan==0.5.6
meinheld==0.5.5
nagios-sentry==0.3
nydus==0.10.6
oauth2==1.5.211
py-bcrypt==0.2
pylibmc==1.2.3
pynliner==0.4.0
python-dateutil==1.5
python-openid==2.2.5-apps
pytz==2013b
raven==3.4.0
redis==2.7.6
requests==1.2.3
sentry==5.4.5
sentry-apps-openid-auth==1.0.1
sentry-assign==0.1.1
sentry-comments==0.1.0
sentry-extras==0.0.4
sentry-geo==0.0.0
sentry-graphite==0.1.0
sentry-jira==0.7.1
sentry-searchbutton==0.1.0
sentry-subscriptions==0.1.0
setproctitle==1.1.7
simplejson==3.1.3
six==1.3.0
tornado==3.1
wsgiref==0.1.2
stellaservice commented 9 years ago

Hey @thurloat :) unfortunately this is behaviour that we are also seeing. self-hosted sentry, Jira Ondemand, plugin 0.8.0, Sentry 6.4.4. Jira 6.4-OD-09-008

stellaservice commented 9 years ago

Disregard, this was me using an account without necessary privs on the jira side. no more "Bad Response" now.

targaryen commented 8 years ago

As a note to others who have this, there is a blacklist in default sentry configuration (at least for the docker container). If your host falls into one of those ranges this message will return.

The file is at /usr/local/lib/python2.7/site-packages/sentry/conf/server.py

Relevant sections:

SENTRY_DISALLOWED_IPS = (
    '0.0.0.0/8',
    '100.64.0.0/10',
    '127.0.0.0/8',
    '169.254.0.0/16',
    '172.16.0.0/12',
    '192.0.0.0/29',
    '192.0.2.0/24',
    '192.88.99.0/24',
    '192.168.0.0/16',
    '198.18.0.0/15',
    '198.51.100.0/24',
    '224.0.0.0/4',
    '240.0.0.0/4',
    '255.255.255.255/32',
)

(after I removed my 10.0.0.0/8 entry).

In my case, my internal network is a 10.x, so I removed the line. I was using docker so I ran comand with docker exec, but you can remove that:

docker exec my-sentry sed -i.bak '/10.0.0.0\/8/d' /usr/local/lib/python2.7/site-packages/sentry/conf/server.py

I restarted sentry and the the target server could be added and I could choose the JIRA project to associate with my Sentry project. I now have 'create jira issue' under the 'more' tab, as hoped.

I now have a problem when creating a new JIRA issue using that link, but I suspect it's unrelated to the inability to configure the connection to the JIRA instance and isn't relevant to this issue.

targaryen commented 8 years ago

Just to confirm, my secondary issue was indeed unrelated, as I suspected.