one-click-tangle
one-click-tangle copied to clipboard
The explorer-webapp can't connect to the explorer-api on localhost:4000
Bug description
The explorer-webapp can't connect to the explorer-api on localhost:4000.
Docker and docker-compose version
Which version of Docker and docker-compose are you running?
- Docker version: 20.10.12
- Docker-compose version: 1.26.0
Hardware specification
Hetzner CX21
Steps To reproduce the bug
Explain how the maintainer can reproduce the bug.
- Having a running Hornet private node
- Add explorer : ./tangle-explorer.sh install
Expected behaviour
Seeing tangle info on the explorer web ui.
Actual behaviour
The explorer-webapp can't connect the explorer-api On the explorer web ui get this message : Explorer is currently undergoing maintenance, please check back later. On the navigator console (ctrl+F12) : GET http://localhost:4000/networks net::ERR_BLOCKED_BY_CLIENT
But when using external IP (not localhost) it works!
cheking from the explorer-webapp :
docker container exec -it 40ebbde32e44 sh
/usr/src/app # wget http://localhost:4000
Connecting to localhost:4000 (127.0.0.1:4000)
wget: can't connect to remote host (127.0.0.1): Connection refused
/usr/src/app # wget http://node1:4000
Connecting to explorer-api:4000 (172.18.0.5:4000)
saving to 'index.html'
index.html 100% |**************************************************************************| 41 0:00:00 ETA
'index.html' saved
/usr/src/app # wget http://EXTERNAL_IP:4000
Connecting to EXTERNAL_IP:4000 (EXTERNAL_IP:4000)
saving to 'index.html'
index.html 100% |**************************************************************************| 41 0:00:00 ETA
'index.html' saved
Errors
On the explorer web ui get this message : Explorer is currently undergoing maintenance, please check back later. On the navigator console (ctrl+F12) : GET http://localhost:4000/networks net::ERR_BLOCKED_BY_CLIENT
[UPDATE] when setting EXTERNAL_IP in config/webapp.config.local.json, like this:
{
"apiEndpoint": "http://EXTERNAL_IP:4000",
"googleAnalyticsId": "GOOGLE-ANALYTICS-ID",
"identityResolverEnabled": true
}
I get some data on the explorer ui. But still having data update issue on tne navigator console
fetchHelper.ts:41 GET http://88.99.32.163:4000/currencies 400 (Bad Request)
websocket.js:138 WebSocket connection to 'ws://88.99.32.163:4000/socket.io/?EIO=4&transport=websocket' failed: WebSocket is closed before the connection is established.
No firewall or network restriction on the server, neither docker settings.
Thank you in advance.
Can you try and change this line https://github.com/iotaledger/one-click-tangle/blob/9210fada7fb4cfcf5e846f9fd83cc7b7189d9398/explorer/tangle-explorer.sh#L80
change it from localhost to an ip where the explorer api is located, even if it's on the same server, also the port and see if it works