Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
silkaj
silkaj
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 153
    • Issues 153
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 5
    • Merge Requests 5
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • clients
  • python
  • silkajsilkaj
  • Issues
  • #3

Closed
Open
Opened Sep 23, 2016 by Cédric Moreau@c-geekContributor

Specifing a local node lead to HTTP error with issuers cmd

When I use the command:

./src/silkaj.py issuers 50

I successfully get the result:

### Issuers for last 50 blocks from block n° 41087 to block n° 41137
| uid       |   blocks |   percent |
|-----------+----------+-----------|
| cgeek     |        7 |      14.0 |
| moul      |        6 |      12.0 |
| nay4      |        6 |      12.0 |
| cler53    |        5 |      10.0 |
| simille   |        4 |       8.0 |
| pafzedog  |        4 |       8.0 |
| inso      |        4 |       8.0 |
| kimamila  |        3 |       6.0 |
| gege53    |        2 |       4.0 |
| hacky     |        2 |       4.0 |
| Jean-F    |        2 |       4.0 |
| charles   |        1 |       2.0 |
| gnu-tux   |        1 |       2.0 |
| vincentux |        1 |       2.0 |
| modulix   |        1 |       2.0 |
| mmpio     |        1 |       2.0 |

But if select a particular peer which is very close to me (same network) then I get a 503 HTTP error:

./src/silkaj.py issuers 50 --peer cgeek.fr:9330
Traceback (most recent call last):
  File "./src/silkaj.py", line 54, in <module>
    manage_cmd(ep, c)
  File "./src/silkaj.py", line 32, in manage_cmd
    list_issuers(ep, int(c.subsubcmd), c.contains_switches('last'))
  File "/home/cgeek/dev/silkaj/src/commands.py", line 91, in list_issuers
    issuer["pubkey"] = request(ep, "blockchain/block/" + str(blk_nbr))["issuer"]
  File "/home/cgeek/dev/silkaj/src/network_tools.py", line 62, in request
    response = urllib.request.urlopen(request)
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable

This is most probably because of Duniter HTTP limiter, which returns an error if a particular URL is called too many times in a second.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Future
Milestone
Future
Assign milestone
Time tracking
None
Due date
None
Reference: clients/python/silkaj#3