MultiChain / multichain-explorer

Web-based explorer for MultiChain blockchains
GNU Affero General Public License v3.0
177 stars 140 forks source link

Can't connect to multichainbrowser #6

Closed moshere closed 8 years ago

moshere commented 8 years ago

Hi, I installed multichainbroswer on Linux CentOS. Everything went fine and it's written that server is listening on the correct port (see status below). However I can't connect and load browser for this address. I checked and this is not port or blocking issue. I disabled IPtables and also loaded static page on this port successfully.

Any other option? Is there any log I can check to see what's the issue?

Thank you Moshe

[root@il-kmslinux2 multichain-explorer]# python -m Mce.abe --config chain1.conf block_tx 39 40 commit block_tx 40 41 commit block_tx 41 42 commit block_tx 42 43 commit block_tx 43 44 commit block_tx 44 45 commit block_tx 45 46 commit block_tx 46 47 commit block_tx 47 48 commit block_tx 48 49 commit block_tx 49 50 commit Abe initialized. Listening on http://il-kmslinux2.kms.local:401

bitcartel commented 8 years ago

It seems you are launching the explorer as root, to listen on port 401 which is privileged. Is this the correct behaviour you are seeking?

What is your host setting in chain1.conf? Did you set it to 0.0.0.0 so you can serve web pages to other computers on your local network?

moshere commented 8 years ago

Hi, Yes I'm running as root. I changed the chain1.conf file to enable host 0.0.0.0 but it didn't help. Any other option?

Thank you. Moshe

bitcartel commented 8 years ago

Do you see any error messages in the terminal when you try to connect using your browser? What version of CentOS are you running?

I ran a test serving the explorer over port 401 as root and it works fine (although this was on Ubuntu). Did you restart the explorer after changing host to 0.0.0.0 ?

If things still don't work, try changing the port from 401 to the default 2750, set host to 0.0.0.0, and launch the explorer as a normal user. Can you connect? What happens?

moshere commented 8 years ago

Hi, I created new user and installed multichain from scratch. Still it's not working and I don't have any log on console.

Please assist.

Thank you Moshe

^CTraceback (most recent call last): File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/home/multichain/multichain-explorer/Mce/abe.py", line 3368, in sys.exit(main(sys.argv[1:])) File "/home/multichain/multichain-explorer/Mce/abe.py", line 3364, in main serve(store) File "/home/multichain/multichain-explorer/Mce/abe.py", line 3167, in serve httpd.serve_forever() File "/usr/lib64/python2.6/SocketServer.py", line 234, in serve_forever r, w, e = _eintr_retry(select.select, [self], [], [], poll_interval) File "/usr/lib64/python2.6/SocketServer.py", line 155, in _eintr_retry return func(*args) KeyboardInterrupt [multichain@il-kmslinux2 multichain-explorer]$ python -m Mce.abe --config chain1.conf Abe initialized. Listening on http://il-kmslinux2.kms.local:2750

moshere commented 8 years ago

Hi, I'm still blocking on this issue? How I can proceed?

bitcartel commented 8 years ago

Which version of CentOS are you using? If you look at params.dat, what value do you have for "protocol-version" ? What version of multichaind and multichain-cli are you running? From the command line enter "multichaind -version" and "multichain-cli -version" and you should see something like "build 1.0 alpha 19 protocol 10005".

moshere commented 8 years ago

Hi, CentOS release 6.7 (Final). I'm on alpha 19 see below.

Regards, Moshe

protocol-version = 10005 # Protocol version at the moment of blockchain genesis. [multichain@il-kmslinux2 multichain-explorer]$ multichaind -version

MultiChain Core Daemon build 1.0 alpha 19 protocol 10005

Copyright (c) Coin Sciences Ltd - www.multichain.com

You are granted a non-exclusive license to use this software for any legal purpose, and to redistribute it unmodified.

The software product under this license is provided free of charge.

Full terms are shown at: http://www.multichain.com/terms-of-service/

[multichain@il-kmslinux2 multichain-explorer]$ multichaind -version

MultiChain Core Daemon build 1.0 alpha 19 protocol 10005

Copyright (c) Coin Sciences Ltd - www.multichain.com

You are granted a non-exclusive license to use this software for any legal purpose, and to redistribute it unmodified.

The software product under this license is provided free of charge.

Full terms are shown at: http://www.multichain.com/terms-of-service/ [multichain@il-kmslinux2 multichain-explorer]$ ^C [multichain@il-kmslinux2 multichain-explorer]$ multichain-cli -version

MultiChain Core RPC client build 1.0 alpha 19 protocol 10005

bitcartel commented 8 years ago

Are you using Python 2.6 which is bundled by default with CentOS 6.7? The explorer has now been updated so that it should run fine on this version of Python. I ran successful tests on CentOS 6.7 with Python 2.6.6 - on both ports 401 and 2750.

moshere commented 8 years ago

I'm running bundled Python 2.6 with latest explorer code without success.

bitcartel commented 8 years ago

Can you give me remote access to the server so I can see what's going on? If this is a machine on your local network or intranet, and you don't want to provide access, can you replicate the blockchain set-up on a cloud server / VPS somewhere? Please email me the details at simon@coinsciences.com. Thanks.

bitcartel commented 8 years ago

Resolved.

jarmanizc commented 8 years ago

But what was the resolution? I'm having the same issue.

j-mccloskey commented 8 years ago

+1 Would like to know what is the resolution.

jarmanizc commented 8 years ago

I think I solved it. In the .conf file where you specify 0.0.0.0 instead of localhost, there was another line a couple down below it that had "host=localhost." Apparently, if both are active in that file, the localhost (or lower one?) takes precedence. Deleting that is the answer.

j-mccloskey commented 8 years ago

Thanks. Doesn't look like thats the case for me, just the one host entry set to 0.0.0.0 - must be something else. It initially did work ok, I left it for a few hours running and when I checked back it was inaccessible. Nothing obvious in the logs and tried deleting it and restarting which didn't help.

The log below shows my request from the browser and a 200 response but browser said took too long to respond. Not sure if the 6241 code is significant.

block_tx 4584 4648
commit
block_tx 4585 4649
commit
127.0.0.1 - - [13/Jul/2016 20:04:50] "GET / HTTP/1.1" 200 6241
block_tx 4586 4650
commit
block_tx 4587 4651
commit

The log gets flurries of these block_tx and commit messages intermittently.

Will write back if I get to the bottom of it.

j-mccloskey commented 8 years ago

Turned out to be a missing security group rule in AWS to allow 2750. It's working fine.

moshere commented 8 years ago

Hi, At the end the issue was duplicate host line in the configuration. Once it was removed and one line set to 0.0.0.0 everything works like a charm.

bitcartel commented 8 years ago

I have updated the README to mention that there should only be a single host entry and that you should check your host's firewall.