Bitcoin Forum
December 06, 2016, 06:21:11 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [40] 41 42 43 44 45 46 47 48 49 50 51 »
  Print  
Author Topic: [ANNOUNCE] Abe 0.7: Open Source Block Explorer Knockoff  (Read 175686 times)
unick
Sr. Member
****
Offline Offline

Activity: 378


View Profile
May 09, 2014, 08:56:39 AM
 #781

I'm trying to set a new block explorer... Abe reads the blockchain fine and loaded the database without a itch.

I get an error when I try to access the block details page.  Any other page loads fine. I use FastCGI

here's the error (last call)

Code:
is_stake_block undefined, is_stake_chain = True, b = {'chain_candidates': [{'chain': <Abe.Chain.AsiaCoin object>, 'in_longest': Decimal('1')}], 'chain_satoshi_seconds': 2517292340726300000000L, 'chain_satoshis': 3342705000000000, 'chain_work': 13618916087790469, 'fees': 57000, 'generated': 5000000000, 'hash': '00000000001930548377e3e15c927d8d79278cb8ba53b1d015468609e3085b13', 'hashMerkleRoot': '36f8065b8c6c95b37c426fbf95bb0bcf98dc04817de8257ffd624d8311cb2603', 'hashPrev': '000000000141a8721757560bb837c6d7be9aa85cf5333bfeaff2602c9d9a1d7a', 'height': Decimal('12441'), ...}
<type 'exceptions.KeyError'>: 'is_proof_of_stake'
      args = ('is_proof_of_stake',)
      message = 'is_proof_of_stake'


Never saw this message before, what does it mean?

Thanks

EDIT: from what I understand, Abe test for the block to see if it's proof-of-stake...

EDIT: I used an older version of abe.py and the error went away. Still any clues on why I get this error would be appreciated Smiley

Awesome Explorers for Awesome Coins | Show some BTC love here: 1AAYAZgaz2me7hyumexUZzcyGRZEYtCx5C
HoboNickels: hbn.blockx.info | BottleCaps: cap.blockx.info | GrowthCoin: grw.blockx.info
1481048471
Hero Member
*
Offline Offline

Posts: 1481048471

View Profile Personal Message (Offline)

Ignore
1481048471
Reply with quote  #2

1481048471
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481048471
Hero Member
*
Offline Offline

Posts: 1481048471

View Profile Personal Message (Offline)

Ignore
1481048471
Reply with quote  #2

1481048471
Report to moderator
1481048471
Hero Member
*
Offline Offline

Posts: 1481048471

View Profile Personal Message (Offline)

Ignore
1481048471
Reply with quote  #2

1481048471
Report to moderator
1481048471
Hero Member
*
Offline Offline

Posts: 1481048471

View Profile Personal Message (Offline)

Ignore
1481048471
Reply with quote  #2

1481048471
Report to moderator
natecv8
Newbie
*
Offline Offline

Activity: 2


View Profile
May 10, 2014, 09:25:56 AM
 #782

Hi John,

Thanks for all your work on ABE, it's a great piece of software. I have loaded in a few blockchains now, but there's one in particular I am having issues with and I see some strange behaviour that I haven't been able to understand. I am trying to load in the Datacoin blockchain which is a primecoin based chain with additional data structures for storing data in the blockchain.

I understand Abe won't be able to parse the data component which I am going to do separately with Datacoin tools, I am looking to import the transaction information via RPC however ABE is making a strange RPC call that the daemon doesn't like causing it to fail.

I have defined the coin details in abe.conf and specified the genesis block transaction:

Code:
import-tx += 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff350002e7033068747470733a2f2f626974636f696e74616c6b2e6f72672f696e6465782e7068703f746f7069633d3332353733352e30ffffffff0100e1f50500000000000000000000

datadir += [{
        "dirname": "/usr/src/dev/bitcoin/blockchain/datacoin/",
        "chain": "Datacoin",
        "code3": "DTC",
        "address_version": "\u001e",
        "loader": "rpc",
        "conf": "/usr/src/dev/bitcoin/blockchain/datacoin/datacoin.conf"
      }]

However when I run abe, it throws an error from the RPC call to get the next block:

Code:
python -m Abe.abe --config abe.conf

Falling back to default (Bitcoin) policy.
RPC failed: ('http protocol error', 0, 'got a bad status line', None)
Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 1, 'chain_id': 11, 'loader': u'rpc', 'conf': u'/usr/src/dev/bitcoin/blockchain/datacoin/datacoin.conf', 'dirname': u'/usr/src/dev/bitcoin/blockchain/datacoin/', 'id': 18L}
Traceback (most recent call last):
  File "Abe/DataStore.py", line 2511, in catch_up
    raise Exception("RPC load failed")
Exception: RPC load failed

I did a tcpdump of the RPC request and I can see that for some reason, Abe is requesting block height 'x' which is causing the daemon to immediately drop the connection. The same command from the command line also throws an error:

Code:
POST http://127.0.0.1:11777 HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 70
Authorization: Basic [...]
Host: 127.0.0.1:11777
User-Agent: Python-urllib/1.17

{"params": [0], "jsonrpc": "2.0", "method": "getblockhash", "id": "x"}

Any idea where the x is coming from? I looked all through DataStore.py at where get_blockhash is used and from what I can see it's meant to be requsting block height 0.
unick
Sr. Member
****
Offline Offline

Activity: 378


View Profile
May 13, 2014, 02:36:54 PM
 #783

Did you update the source recently?

Another odd behaviour I get is when I try to read the pubkey_hash from the database, I get gibberish characters, so my script fails since it can't recognize the actual public key.

I'm trying to pinpoint the issue, any ideas?

All my databases are configured the same so that's why I wonder if there was a code change influencing this.

EDIT: ok, I think I found it, the column type for pubkey_hash is now binary(20), previously it was char(40).  The first question that comes into mind is why this was changed ?

Awesome Explorers for Awesome Coins | Show some BTC love here: 1AAYAZgaz2me7hyumexUZzcyGRZEYtCx5C
HoboNickels: hbn.blockx.info | BottleCaps: cap.blockx.info | GrowthCoin: grw.blockx.info
noodle_dam
Full Member
***
Offline Offline

Activity: 128



View Profile
May 16, 2014, 07:15:33 AM
 #784

Would anyone be interested in creating a block explorer/rich list for XLB (LibertyCoin). We have a 3000 XLB balance and I'm willing to add a lil more if needed. Please PM me if interested, or irc.freenode.net #libertycoin

Thanks Smiley
cryptomass
Sr. Member
****
Offline Offline

Activity: 246



View Profile
May 16, 2014, 09:42:52 AM
 #785

Hi.
Tracking down a premine I want to understand better, I found this thing I think is anomalous:

cryptoblox.com/address/1JxY6A5jgjGysUFFpkYwA6g3ZVkDCyPjdM
cryptoblox.com/address/8xNzoDkDBA5dQhtuHiszNUqzX5e8kLqUiy

they belong to 2 different addresses but have same amount, TXID etc.

I'm kind of new to this blockchain things and I'm probabily missing something.

Anyone would care to clarify it for me please?

Thanks.
mass

ky_storm
Member
**
Offline Offline

Activity: 105

@ky_storm


View Profile
May 17, 2014, 06:20:11 AM
 #786

hi, I checkout the branch "geekz-patch-1".

It work fine except the block list(/chain/xxx). The browser shows
Code:
DataTables warning (table id = 'chain'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

It happened when enter a chian or changed the display number of per page. It just always display 10 blocks data and couldn't changed.

Can you tell me how to fix it?

I know it use the new API: /q/get_blocks_data

But when i directly browser this api with some json parameters, it shows error info like this:
Code:
<type 'exceptions.AttributeError'> Python 2.7.6: /usr/bin/python
Sat May 17 14:03:00 2014
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
    556         """Runs the handler, flushes the streams, and ends the request."""
    557         try:
=>  558             protocolStatus, appStatus = self.server.handler(self)
    559         except:
    560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>>
 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>)
   1116         try:
   1117             try:
=> 1118                 result = self.application(environ, start_response)
   1119                 try:
   1120                     for data in result:
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <__main__.Abe instance>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, start_response = <function start_response>
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in __call__(abe=<__main__.Abe instance>, env={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, start_response=<function start_response>)
    291                 abe.store.catch_up()
    292
=>  293             handler(page)
    294         except PageNotFound:
    295             status = '404 Not Found'
handler = <bound method Abe.handle_q of <__main__.Abe instance>>, page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in handle_q(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']})
   1348             raise PageNotFound()
   1349
=> 1350         abe.do_raw(page, func)
   1351
   1352         if page['content_type'] == 'text/plain':
abe = <__main__.Abe instance>, abe.do_raw = <bound method Abe.do_raw of <__main__.Abe instance>>, page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func = <bound method Abe.q_get_blocks_data of <__main__.Abe instance>>
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in do_raw(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func=<bound method Abe.q_get_blocks_data of <__main__.Abe instance>>)
   1337         page['content_type'] = 'text/plain'
   1338         page['template'] = '%(body)s'
=> 1339         page['body'] = func(page, page['chain'])
   1340
   1341     def handle_q(abe, page):
page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func = <bound method Abe.q_get_blocks_data of <__main__.Abe instance>>
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in q_get_blocks_data(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, chain=None)
   1392         page['content_type'] = 'application/json'
   1393         latest_blocks = []
=> 1394         total_number_of_blocks = abe.get_max_block_height(chain)
   1395         post_data = get_post_data(page)
   1396         if chain is None:
total_number_of_blocks undefined, abe = <__main__.Abe instance>, abe.get_max_block_height = <bound method Abe.get_max_block_height of <__main__.Abe instance>>, chain = None
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in get_max_block_height(abe=<__main__.Abe instance>, chain=None)
   1379         # "getblockcount" traditionally returns max(block_height),
   1380         # which is one less than the actual block count.
=> 1381         return abe.store.get_block_number(chain.id)
   1382
   1383     def q_getblockcount(abe, page, chain):
abe = <__main__.Abe instance>, abe.store = <Abe.DataStore.DataStore object>, abe.store.get_block_number = <bound method DataStore.get_block_number of <Abe.DataStore.DataStore object>>, chain = None, chain.id undefined
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'id'
      args = ("'NoneType' object has no attribute 'id'",)
      message = "'NoneType' object has no attribute 'id'"



I also find someone's block chain worked fine while the error exist.
Juse like:
http://magichain.info/q/get_blocks_data

His pages are OK without json errors. Why?
ky_storm
Member
**
Offline Offline

Activity: 105

@ky_storm


View Profile
May 17, 2014, 03:42:01 PM
 #787

hi, I checkout the branch "geekz-patch-1".

It work fine except the block list(/chain/xxx). The browser shows
Code:
DataTables warning (table id = 'chain'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

It happened when enter a chian or changed the display number of per page. It just always display 10 blocks data and couldn't changed.

Can you tell me how to fix it?

I know it use the new API: /q/get_blocks_data

But when i directly browser this api with some json parameters, it shows error info like this:
Code:
<type 'exceptions.AttributeError'> Python 2.7.6: /usr/bin/python
Sat May 17 14:03:00 2014
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
    556         """Runs the handler, flushes the streams, and ends the request."""
    557         try:
=>  558             protocolStatus, appStatus = self.server.handler(self)
    559         except:
    560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>>
 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>)
   1116         try:
   1117             try:
=> 1118                 result = self.application(environ, start_response)
   1119                 try:
   1120                     for data in result:
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <__main__.Abe instance>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, start_response = <function start_response>
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in __call__(abe=<__main__.Abe instance>, env={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, start_response=<function start_response>)
    291                 abe.store.catch_up()
    292
=>  293             handler(page)
    294         except PageNotFound:
    295             status = '404 Not Found'
handler = <bound method Abe.handle_q of <__main__.Abe instance>>, page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in handle_q(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']})
   1348             raise PageNotFound()
   1349
=> 1350         abe.do_raw(page, func)
   1351
   1352         if page['content_type'] == 'text/plain':
abe = <__main__.Abe instance>, abe.do_raw = <bound method Abe.do_raw of <__main__.Abe instance>>, page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func = <bound method Abe.q_get_blocks_data of <__main__.Abe instance>>
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in do_raw(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func=<bound method Abe.q_get_blocks_data of <__main__.Abe instance>>)
   1337         page['content_type'] = 'text/plain'
   1338         page['template'] = '%(body)s'
=> 1339         page['body'] = func(page, page['chain'])
   1340
   1341     def handle_q(abe, page):
page = {'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, func = <bound method Abe.q_get_blocks_data of <__main__.Abe instance>>
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in q_get_blocks_data(abe=<__main__.Abe instance>, page={'body': [], 'chain': None, 'content_type': 'application/json', 'dotdot': '../', 'env': {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/lib/cgi-bin/abe.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': '192.168.1.110', ...}, 'params': {}, 'start_response': <function start_response>, 'template': '%(body)s', 'template_vars': {'ABE_URL': 'https://github.com/bitcoin-abe/bitcoin-abe', 'APPNAME': 'Abe', 'CONTENT_TYPE': 'text/html; charset=utf-8', 'COPYRIGHT': 'Abe developers', 'COPYRIGHT_URL': 'https://github.com/bitcoin-abe', 'COPYRIGHT_YEARS': '2011', 'DONATIONS_BTC': '1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf', 'DONATIONS_NMC': 'NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK', 'HOMEPAGE': 'chains', 'STATIC_PATH': 'static/', ...}, 'title': ['Abe', ' ', '0.8pre']}, chain=None)
   1392         page['content_type'] = 'application/json'
   1393         latest_blocks = []
=> 1394         total_number_of_blocks = abe.get_max_block_height(chain)
   1395         post_data = get_post_data(page)
   1396         if chain is None:
total_number_of_blocks undefined, abe = <__main__.Abe instance>, abe.get_max_block_height = <bound method Abe.get_max_block_height of <__main__.Abe instance>>, chain = None
 /usr/local/lib/python2.7/dist-packages/Abe/abe.py in get_max_block_height(abe=<__main__.Abe instance>, chain=None)
   1379         # "getblockcount" traditionally returns max(block_height),
   1380         # which is one less than the actual block count.
=> 1381         return abe.store.get_block_number(chain.id)
   1382
   1383     def q_getblockcount(abe, page, chain):
abe = <__main__.Abe instance>, abe.store = <Abe.DataStore.DataStore object>, abe.store.get_block_number = <bound method DataStore.get_block_number of <Abe.DataStore.DataStore object>>, chain = None, chain.id undefined
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'id'
      args = ("'NoneType' object has no attribute 'id'",)
      message = "'NoneType' object has no attribute 'id'"



I also find someone's block chain worked fine while the error exist.
Juse like:
http://magichain.info/q/get_blocks_data

His pages are OK without json errors. Why?




Fixed these by myself.  There is the solution:

First bug is that /q/get_blocks_data shows python error because of the code here:

abe.py:
Code:
def q_get_blocks_data(abe, page, chain):
        """shows the latest blocks data in json format for datatable in chain page"""
        page['content_type'] = 'application/json'
        latest_blocks = []
       total_number_of_blocks = abe.get_max_block_height(chain)
        post_data = get_post_data(page)
        if chain is None:
            return 'Shows latest blocks.\n' \
                '/chain/CHAIN/q/get_latest_blocks[/INTERVAL[/START[/STOP]]]\n'

total_number_of_blocks = abe.get_max_block_height(chain)
chain is none before be checked:if chain is None

fix with code:
Code:
def q_get_blocks_data(abe, page, chain):
        """shows the latest blocks data in json format for datatable in chain page"""
        page['content_type'] = 'application/json'
        latest_blocks = []
       #total_number_of_blocks = abe.get_max_block_height(chain)
        post_data = get_post_data(page)
        if chain is None:
            return 'Shows latest blocks.\n' \
                '/chain/CHAIN/q/get_latest_blocks[/INTERVAL[/START[/STOP]]]\n'
       total_number_of_blocks = abe.get_max_block_height(chain)


Second bug is caused by mysql with the default abe.conf.
Code:
# To use MySQL binary types, set binary-type=binary. This may become the
# default on databases that support it.
#
# The binary-type setting affects only the first run, where Abe
# creates its tables.
#binary-type hex

The conf set binary-type=binary.

But abe.py created json like this code in:
def q_get_blocks_data(abe, page, chain)

Code:
latest_blocks.append([int(height), hash, format_time(int(nTime)), int(num_tx), format_satoshis(value_out, chain),
                                      util.calculate_difficulty(int(nBits)),format_satoshis(satoshis, chain), avg_age, '%5g' % (seconds / 86400.0), percent_destroyed])


The "hash" is binary. Json couldn't decode it.
So, replaced with abe.store.hashout_hex(hash)

Code:
latest_blocks.append([int(height), abe.store.hashout_hex(hash), format_time(int(nTime)), int(num_tx), format_satoshis(value_out, chain),
                                      util.calculate_difficulty(int(nBits)),format_satoshis(satoshis, chain), avg_age, '%5g' % (seconds / 86400.0), percent_destroyed])


scrypto
Full Member
***
Offline Offline

Activity: 121


View Profile
May 18, 2014, 12:25:01 AM
 #788

Hi Smiley

I'm attempting to run a forked Abe (for ultracoin) using fastcgi on my server. I have root access and for the time being everything everything is setup as root.

I have downloaded the UTC blockchain data files and all my other files seem to be in the correct place but I still can't get Abe to run on my domain on port 80

I've spent a couple of days changing permissions, reinstalling etc but cannot get anywhere.

Instead when I view Abe @ http://mydomain.com  I am confronted with 'internal server error' - a look at the log says 'premature end of scripts headers on abe.fcgi

Code:
[Sun May 18 01:34:03 2014] [warn] [client ***.***.***.***] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun May 18 01:34:03 2014] [error] [client ***.***.***.***] Premature end of script headers: abe.fcgi

I don't understand why this is as I have followed the be fastcgi instructions to the letter, creating the necessary files and directories, making them executable.  

I have repeated the process numerous times and am nearly ready to throw in the towel Sad  and i'm no quitter.


My abe.conf file @ /home/ultra/abe-utc/abe.conf

Code:
dbtype MySQLdb
connect-args {"user":"abe","db":"abe","passwd":"mypass"}
datadir += [{
        "dirname": "/root/.ultracoin",
        "chain": "Ultracoin",
        "code3": "UTC"}]


and httpd conf file @ /etc/apache2/sites-enabled/abe looks like this:

Code:
<VirtualHost *:80>
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40
</VirtualHost>


/usr/lib/cgi-bin/abe.fcgi (made executable)

Code:
#! /usr/bin/python
import subprocess, sys, os
command=["sudo", "-u", "ultra", "/home/ultra/mydomain.com/cgi-bin/abe", str(os.getpid())]
subprocess.Popen(command, stdin=sys.stdin).wait()


/home/ultra/mydomain.com/cgi-bin/abe  (made executable)

Code:
#! /bin/sh
PYTHONUNBUFFERED=1 exec python -m Abe.abe \
--config /home/ultra/abe-utc/abe.conf --static-path static/ --watch-pid="$1"


I notice when I try and run Abe via the command line it appears there could be a conflict eg. socket.error: [Errno 99] Cannot assign requested address

Code:
root@***:~/.ultracoin# python -m Abe.abe --config /home/ultra/abe-utc/abe.conf

Abe initialized.
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2279, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2275, in main
    serve(store)
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2151, in serve
    httpd = make_server(args.host, port, abe)
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address



If any one can help I'd appreciate it. i'll even hand over some coins in exchange for some sleep Smiley

Cheers

ps. running debian 7 64bit
unick
Sr. Member
****
Offline Offline

Activity: 378


View Profile
May 20, 2014, 02:21:39 PM
 #789

Hi Smiley

I'm attempting to run a forked Abe (for ultracoin) using fastcgi on my server. I have root access and for the time being everything everything is setup as root.

I have downloaded the UTC blockchain data files and all my other files seem to be in the correct place but I still can't get Abe to run on my domain on port 80

I've spent a couple of days changing permissions, reinstalling etc but cannot get anywhere.

Instead when I view Abe @ http://mydomain.com  I am confronted with 'internal server error' - a look at the log says 'premature end of scripts headers on abe.fcgi

Code:
[Sun May 18 01:34:03 2014] [warn] [client ***.***.***.***] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun May 18 01:34:03 2014] [error] [client ***.***.***.***] Premature end of script headers: abe.fcgi

I don't understand why this is as I have followed the be fastcgi instructions to the letter, creating the necessary files and directories, making them executable.  

I have repeated the process numerous times and am nearly ready to throw in the towel Sad  and i'm no quitter.


My abe.conf file @ /home/ultra/abe-utc/abe.conf

Code:
dbtype MySQLdb
connect-args {"user":"abe","db":"abe","passwd":"mypass"}
datadir += [{
        "dirname": "/root/.ultracoin",
        "chain": "Ultracoin",
        "code3": "UTC"}]


and httpd conf file @ /etc/apache2/sites-enabled/abe looks like this:

Code:
<VirtualHost *:80>
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40
</VirtualHost>


/usr/lib/cgi-bin/abe.fcgi (made executable)

Code:
#! /usr/bin/python
import subprocess, sys, os
command=["sudo", "-u", "ultra", "/home/ultra/mydomain.com/cgi-bin/abe", str(os.getpid())]
subprocess.Popen(command, stdin=sys.stdin).wait()


/home/ultra/mydomain.com/cgi-bin/abe  (made executable)

Code:
#! /bin/sh
PYTHONUNBUFFERED=1 exec python -m Abe.abe \
--config /home/ultra/abe-utc/abe.conf --static-path static/ --watch-pid="$1"


I notice when I try and run Abe via the command line it appears there could be a conflict eg. socket.error: [Errno 99] Cannot assign requested address

Code:
root@***:~/.ultracoin# python -m Abe.abe --config /home/ultra/abe-utc/abe.conf

Abe initialized.
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2279, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2275, in main
    serve(store)
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2151, in serve
    httpd = make_server(args.host, port, abe)
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address



If any one can help I'd appreciate it. i'll even hand over some coins in exchange for some sleep Smiley

Cheers

ps. running debian 7 64bit

This looks like a wrong port/server IP or port in use.

If I recall I couldn't make abe work with apaches sites enabled feature. So I used the default config and modify accordingly.

So instead of this in /etc/apache2/sites-enabled/abe

Code:
<VirtualHost *:80>
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40
</VirtualHost>

try instead adding

Code:
       ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40

in /etc/apache2/sites-enabled/default <VirtualHost *:80></VirtualHost> tags.



Awesome Explorers for Awesome Coins | Show some BTC love here: 1AAYAZgaz2me7hyumexUZzcyGRZEYtCx5C
HoboNickels: hbn.blockx.info | BottleCaps: cap.blockx.info | GrowthCoin: grw.blockx.info
with the lemons!
Hero Member
*****
Offline Offline

Activity: 564



View Profile
May 25, 2014, 02:49:31 PM
 #790

Hello, could someone please help me with this issue?
with the lemons!
Hero Member
*****
Offline Offline

Activity: 564



View Profile
May 25, 2014, 03:29:38 PM
 #791

I will give you some bounty if you help me Smiley
scrypto
Full Member
***
Offline Offline

Activity: 121


View Profile
May 27, 2014, 05:34:43 PM
 #792


This looks like a wrong port/server IP or port in use.

If I recall I couldn't make abe work with apaches sites enabled feature. So I used the default config and modify accordingly.

So instead of this in /etc/apache2/sites-enabled/abe

Code:
<VirtualHost *:80>
        ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40
</VirtualHost>

try instead adding

Code:
       ServerName mydomain.com
        Alias /static/ /home/ultra/abe-utc/Abe/htdocs
        Alias /robots.txt /home/ultra/abe-utc/Abe/htdocs/robots.txt
        Alias /favicon.ico /home/ultra/abe-utc/Abe/htdocs/favicon.ico
        Alias / /usr/lib/cgi-bin/abe.fcgi/
        # FcgidIOTimeout 40

in /etc/apache2/sites-enabled/default <VirtualHost *:80></VirtualHost> tags.



Hi Smiley

Thanks!  I tried this but still cant connect using fastcgi.  It's weird. I've tried everything about 5 times and still no luck.  It begins by successfully reading data via rpc but then buckles when it tries to establish a connection to apache2.  It looks like it could be permissions. perhaps python not being able to connect to apache rather than colliding with an existing connection on port 80. I've even disabled the default site so my httpd conf info in 'abe' is the only site running.  

I've removed the port & host data from abe.conf

Code:
sh-4.2$ python -m Abe.abe  --config /home/ultra/abe-utc/abe.conf --static-path /static/
block_tx 322139 763931
commit
block_tx 322140 763932
commit
block_tx 322141 763933
commit
block_tx 322142 763934
commit
block_tx 322143 763935
commit
block_tx 322144 763936
block_tx 322144 763930
commit
Abe initialized.
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2279, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2275, in main
    serve(store)
  File "/usr/local/lib/python2.7/dist-packages/Abe/abe.py", line 2151, in serve
    httpd = make_server(args.host, port, abe)
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied
sh-4.2$

some serious head scratching going on here :/

pnosker
Sr. Member
****
Online Online

Activity: 392


View Profile
May 29, 2014, 08:21:46 PM
 #793

I'm trying to set a new block explorer... Abe reads the blockchain fine and loaded the database without a itch.

I get an error when I try to access the block details page.  Any other page loads fine. I use FastCGI

here's the error (last call)

Code:
is_stake_block undefined, is_stake_chain = True, b = {'chain_candidates': [{'chain': <Abe.Chain.AsiaCoin object>, 'in_longest': Decimal('1')}], 'chain_satoshi_seconds': 2517292340726300000000L, 'chain_satoshis': 3342705000000000, 'chain_work': 13618916087790469, 'fees': 57000, 'generated': 5000000000, 'hash': '00000000001930548377e3e15c927d8d79278cb8ba53b1d015468609e3085b13', 'hashMerkleRoot': '36f8065b8c6c95b37c426fbf95bb0bcf98dc04817de8257ffd624d8311cb2603', 'hashPrev': '000000000141a8721757560bb837c6d7be9aa85cf5333bfeaff2602c9d9a1d7a', 'height': Decimal('12441'), ...}
<type 'exceptions.KeyError'>: 'is_proof_of_stake'
      args = ('is_proof_of_stake',)
      message = 'is_proof_of_stake'


Never saw this message before, what does it mean?

Thanks

EDIT: from what I understand, Abe test for the block to see if it's proof-of-stake...

EDIT: I used an older version of abe.py and the error went away. Still any clues on why I get this error would be appreciated Smiley

I made a VeriCoin block explorer (http://blocks.vericoin.info) which is a NovaCoin deriv. and am getting the same error as you. Could you pastebin your abe.py file? Thanks!

Support the VeriFund Endowment.
VRC: VFEndownxxnHea9mv59kZx8c7TysGbndYx
pnosker
Sr. Member
****
Online Online

Activity: 392


View Profile
May 29, 2014, 11:46:37 PM
 #794

I'm trying to set a new block explorer... Abe reads the blockchain fine and loaded the database without a itch.

I get an error when I try to access the block details page.  Any other page loads fine. I use FastCGI

here's the error (last call)

Code:
is_stake_block undefined, is_stake_chain = True, b = {'chain_candidates': [{'chain': <Abe.Chain.AsiaCoin object>, 'in_longest': Decimal('1')}], 'chain_satoshi_seconds': 2517292340726300000000L, 'chain_satoshis': 3342705000000000, 'chain_work': 13618916087790469, 'fees': 57000, 'generated': 5000000000, 'hash': '00000000001930548377e3e15c927d8d79278cb8ba53b1d015468609e3085b13', 'hashMerkleRoot': '36f8065b8c6c95b37c426fbf95bb0bcf98dc04817de8257ffd624d8311cb2603', 'hashPrev': '000000000141a8721757560bb837c6d7be9aa85cf5333bfeaff2602c9d9a1d7a', 'height': Decimal('12441'), ...}
<type 'exceptions.KeyError'>: 'is_proof_of_stake'
      args = ('is_proof_of_stake',)
      message = 'is_proof_of_stake'


Never saw this message before, what does it mean?

Thanks

EDIT: from what I understand, Abe test for the block to see if it's proof-of-stake...

EDIT: I used an older version of abe.py and the error went away. Still any clues on why I get this error would be appreciated Smiley

I made a VeriCoin block explorer (http://blocks.vericoin.info) which is a NovaCoin deriv. and am getting the same error as you. Could you pastebin your abe.py file? Thanks!

I was able to get around the error by commenting out the following lines of Abe.py:

        is_stake_chain = chain.has_feature('nvc_proof_of_stake')
        is_stake_block = is_stake_chain # and b['is_proof_of_stake']

and

  if tx is b['transactions'][0]:
      assert txout['value'] == 0
      assert len(tx['out']) == 1
      body += [
   #   format_satoshis(b['proof_of_stake_generated'], chain),
  ' included in the following transaction']


I think there's a bug in DataStore.py where the values b['is_proof_of_stake'] and b['proof_of_stake_generated'} are set.

Support the VeriFund Endowment.
VRC: VFEndownxxnHea9mv59kZx8c7TysGbndYx
geekz
Full Member
***
Offline Offline

Activity: 185

जगत् िमत्थया


View Profile WWW
May 31, 2014, 08:00:52 PM
 #795

Hi everyone, Are you facing any instability in your block explorer installation with the new design at https://github.com/bitcoin-abe/bitcoin-abe/tree/geekz-patch-1 ?

I had pushed/published the new design for ABE , you can view it at https://github.com/bitcoin-abe/bitcoin-abe/tree/geekz-patch-1 . But I myself have not been able to get stable performance using it.
Currently i am using digitalocean instance with 2GB RAM for site at http://ancblockchain.com and the site is not stable.  
This can also because of hosting provider.  Can anyone please suggest me a good hosting provider?

Please help me friends.
I would be able to push/publish more new features in Abe Explorer, for the benefit of community. But i need to get it working properly.   Huh Huh

Anoncoin Block Explorer : http://ancblockchain.com , Anoncoin Wiki Page : http://wiki.anoncoin.net
BTC : 1CMXUAbfrxE61z9a1TrRbwZUbaSFmv1FDb   ,  ANC : ASAdJpndrVcuMzfA52XBGzQMhFRQfdCh7k
geekz
Full Member
***
Offline Offline

Activity: 185

जगत् िमत्थया


View Profile WWW
May 31, 2014, 10:17:17 PM
 #796

Important change to be done to display correct address value in transaction pages , for new eXplorer theme design of Abe:

Visit this link to see the change https://github.com/geekz/bitcoin-abe/commit/f2cce3e6ff020b2655195e73e7a72824bf42bf50

In line number 744 , inside the function row_to_transaction function, you have the following.
Code:
                 body += hash_to_address_link(chain.address_version,row['binaddr'], '../')

Change the above mentioned line to

Code:
               body += abe.format_addresses(row, '../', chain)

Anoncoin Block Explorer : http://ancblockchain.com , Anoncoin Wiki Page : http://wiki.anoncoin.net
BTC : 1CMXUAbfrxE61z9a1TrRbwZUbaSFmv1FDb   ,  ANC : ASAdJpndrVcuMzfA52XBGzQMhFRQfdCh7k
OPEC Coin Dev
Newbie
*
Offline Offline

Activity: 28

1 OPC = 1 BARREL OF OIL SOON!


View Profile
June 01, 2014, 08:58:55 AM
 #797

Hello!

OPEC Coin needs a blockexplorer from launch (countdown)

Here's OPEC Coin thread https://bitcointalk.org/index.php?topic=633593

We've got a 2500 OPC bounty for setting up blockexplorer!

Please PM me if interested to reserve this bounty!

Thanks!

OPC: oZVdX2HBpDgXowvBvvVX9QeqCBE3usmNac
geekz
Full Member
***
Offline Offline

Activity: 185

जगत् िमत्थया


View Profile WWW
June 01, 2014, 08:59:57 AM
 #798

Finally , found the issue.
I had created sitemaps for the site , so that google can crawl the site.
But google started sending multiple requests per second to the site. And the site was not able to handle it.
Finally fixed it by requesting google to reduce crawl rate also increased maxconnection in apache configurations.  So, things are looking more stable now.  

Hurrey!  Smiley Smiley

Anoncoin Block Explorer : http://ancblockchain.com , Anoncoin Wiki Page : http://wiki.anoncoin.net
BTC : 1CMXUAbfrxE61z9a1TrRbwZUbaSFmv1FDb   ,  ANC : ASAdJpndrVcuMzfA52XBGzQMhFRQfdCh7k
coinwallet
Newbie
*
Offline Offline

Activity: 3


View Profile
June 02, 2014, 12:07:36 AM
 #799

Hello,

I have three issue's with ABE.
And I will Pay 0.25 btc for solve each.

First:
Code:
Opened /home/adbeloader/.feathercoin/blocks/blk00000.dat
Exception at 8
Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 100000, 'chain_id': 22, 'loader': None, 'conf': u'feathercoin.conf', 'dirname': u'/home/adbeloader/.feathercoin', 'id': 72L}
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2507, in catch_up
store.catch_up_dir(dircfg)
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2773, in catch_up_dir
store.import_blkdat(dircfg, ds, blkfile['name'])
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2894, in import_blkdat
if not store.offer_existing_block(hash, chain.id):
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2389, in offer_existing_block
store.offer_block_to_chains(b, frozenset([chain_id]))
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2271, in offer_block_to_chains
b['top'] = store.adopt_orphans(b, 0, chain_ids, chain_ids)
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 1291, in adopt_orphans
stack.pop()()
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 1296, in doit
store._adopt_orphans_1(stack)
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 1407, in _adopt_orphans_1
store._populate_block_txin(int(next_id))
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 1240, in _populate_block_txin
(block_id, txin_id, oblock_id))
File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 249, in sql
store._sql.sql(stmt, params)
File "/usr/local/lib/python2.7/dist-packages/Abe/SqlAbstraction.py", line 458, in sql
sql._execute(cached, params)
File "/usr/local/lib/python2.7/dist-packages/Abe/SqlAbstraction.py", line 439, in _execute
sql.cursor().execute(stmt, params)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry '1617197-10493495' for key 'PRIMARY'")

My config:

datadir += [{
"dirname": "/home/adbeloader/.feathercoin",
"chain": "FeatherCoin",
"code3": "FTC",
"loader" : "blkfile",
"conf": "feathercoin.conf" }]

Second:

Code:
Exception at 2605896434586747018
Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 1, 'chain_id': 29, 'loader': None, 'conf': u'blackcoin.conf', 'dirname': u'/home/adbeloader/.blackcoin', 'id': 114L}
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2507, in catch_up
    store.catch_up_dir(dircfg)
  File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2773, in catch_up_dir
    store.import_blkdat(dircfg, ds, blkfile['name'])
  File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2895, in import_blkdat
    b = chain.ds_parse_block(ds)
  File "/usr/local/lib/python2.7/dist-packages/Abe/Chain.py", line 93, in ds_parse_block
    d['transactions'].append(chain.ds_parse_transaction(ds))
  File "/usr/local/lib/python2.7/dist-packages/Abe/Chain.py", line 86, in ds_parse_transaction
    return deserialize.parse_Transaction(ds)
  File "/usr/local/lib/python2.7/dist-packages/Abe/deserialize.py", line 90, in parse_Transaction
    d['txIn'].append(parse_TxIn(vds))
  File "/usr/local/lib/python2.7/dist-packages/Abe/deserialize.py", line 46, in parse_TxIn
    d['sequence'] = vds.read_uint32()
  File "/usr/local/lib/python2.7/dist-packages/Abe/BCDataStream.py", line 71, in read_uint32
    def read_uint32 (self): return self._read_num('<I')
  File "/usr/local/lib/python2.7/dist-packages/Abe/BCDataStream.py", line 110, in _read_num
    (i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes

Config
#17 ## BlackCoin
datadir += [{
        "dirname": "/home/adbeloader/.blackcoin",
        "chain": "Blackcoin",
        "conf": "blackcoin.conf" }]

Third:
Code:
Opened /home/adbeloader/.hawaiicoin/blocks/blk00000.dat
incomplete block of length 1016530668 chain 16

#17 ## BlackCoin
datadir += [{
        "dirname": "/home/adbeloader/.hawaiicoin",
        "chain": "Hawaiicoin",
        "conf": "hawaiicoin.conf" }]

Thk & B'rgds
Coinwall

bitcoin-abe.info

Soon New Multi BlockCha
Magicoin
Full Member
***
Offline Offline

Activity: 168


View Profile
June 02, 2014, 02:28:04 PM
 #800

Hi everyone, Are you facing any instability in your block explorer installation with the new design at https://github.com/bitcoin-abe/bitcoin-abe/tree/geekz-patch-1 ?

I had pushed/published the new design for ABE , you can view it at https://github.com/bitcoin-abe/bitcoin-abe/tree/geekz-patch-1 . But I myself have not been able to get stable performance using it.
Currently i am using digitalocean instance with 2GB RAM for site at http://ancblockchain.com and the site is not stable.  
This can also because of hosting provider.  Can anyone please suggest me a good hosting provider?

Please help me friends.
I would be able to push/publish more new features in Abe Explorer, for the benefit of community. But i need to get it working properly.   Huh Huh

Hi geekz,

I am Dev of Magicoin, and we have a dedicated server available. I think you did a very good & nice block explorer. Magicoin's explorer benefits very much from your work too. For this, I will be happy to provid a host for you either for test purpose or for long-term hosting. PM for discussion if you are interested.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [40] 41 42 43 44 45 46 47 48 49 50 51 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!