BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 344 forks source link

HTTPError: HTTP Error 403: Forbidden #121

Closed yield65 closed 8 years ago

yield65 commented 8 years ago

Hi,

I'm having the following error:

Obtaining settings from config file.
Welcome to Poloniex Lending Bot
2016-10-21 00:06:11
Traceback (most recent call last):
  File "./lendingbot.py", line 534, in <module>
    refreshTotalLended()
  File "./lendingbot.py", line 215, in refreshTotalLended
    cryptoLended = bot.returnActiveLoans()
  File "/path/poloniexlendingbot/poloniex.py", line 113, in returnActiveLoans
    return self.api_query('returnActiveLoans')
  File "/path/poloniexlendingbot/poloniex.py", line 67, in api_query
    ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden

Python 2.7.12 linux x64

Any ideas? Thanks!

Evanito commented 8 years ago

403: Forbidden errors mean that Poloniex rejected what the bot said for some reason. This is not a widespread issue, I am unable to reproduce this error as right now my logs say connection has been perfect over the last 30 minutes.

I am going to ask you to do these things for me (in order of likelihood that it is the problem):

  1. Verify you are running the most recent version of the bot
  2. Follow the documentation provided in the repository's readme.md file to double-check that your configuration settings are not malformed.
  3. Restart your machine, then verify that things such as apt-get or your internet browser connect to webpages
  4. Disable any VPNs, Tor proxies, or other tunneling services. These are not confirmed to disrupt the bot but you never know.
  5. Wait it out, since this is error is due to the external server being configured to reject connections, it may be undergoing maintenance.
  6. Change your python version to 2.7.10, the version 100% supported by the bot. (Unlikely to be issue)
  7. Do you live in New Hampshire? They recently ended service there, but I am not sure what form that would take. This is unlikely.

Is this your first time running the bot? If it has worked for you in the past, I recommend step 5.

yield65 commented 8 years ago

I do have a VPN which wasn't in use at the time of the error but first I tried using wireshark to capture the server's response and I saw that it never answered, all I got was some port unreachable errors. Then I did use the VPN and tried from different locations, denmark, canada, mexico and netherlands; only netherlands seems to work, it's very odd. My "real" location is Mexico btw.

Thanks.

Evanito commented 8 years ago

It has been a few days, has the problem been fixed?

yield65 commented 8 years ago

Hi, Yes, the problem persist but I moved the bot to an AWS server and it is running without problem, so I don't know if poloniex has a blacklist for some IPs.

Evanito commented 8 years ago

Closing since issue is unable to be reproduced and is resolved.