-
Notifications
You must be signed in to change notification settings - Fork 695
Unable to reach ganache-cli in a docker container from docker compose #780
Comments
it seems that I can't reproduce this as there is missing configuration. What do your various config files look like (i.e. |
I have this in memento configuration file: # api-related fields
api:
# The port on which the API will be exposed (default:3001)
port: 3001
# Enable/disable development CORS
dev-cors: true
# Allowed hosts for HTTP API development CORS
dev-cors-host: "*"
# Dashboard-related fields
dashboard:
# The port on which the Dashboard will be exposed (default:3000)
# WARNING: it must not be the same as api.port!
port: 3000
config-management:
enabled: true
# database fields
db:
# Database host
host: "memento-postgres"
# Database port
port: 5432
# Database sslmode
sslmode: "disable"
# Database name
dbname: "memento"
# Database user (also allowed via PG_USER env var)
user: "memento"
# ethereum-related fields
eth:
client:
# HTTP endpoint of a web3-compatible node (mandatory)
http: "http://127.0.0.1:8545"
# Websockets endpoint of JSON-RPC enabled node (optional)
# if this is present, the task manager will use a newHeads subscription to watch for new blocks
# if not present, the task manager will use polling to get the highest block
ws: "ws://127.0.0.1:8546"
# The interval at which the task manager will poll the node for best block (default:"15s")
# optional, only used if `ws` url is not specified
poll-interval: "15s"
# feature flags
feature:
# Backfilling
backfill:
# Enable/disable the backfilling feature
enabled: false
# Lag feature
lag:
# Enable/disable the lag feature
enabled: true
# The amount of blocks to lag behind the tip of the chain if the lag feature is enabled
value: 10
# Automatic migrations
automigrate:
# Enable/disable the automatic migrations
enabled: true
# Uncles scraping
uncles:
# Enable/disabled the uncles scraping
enabled: false
# Control what to be logged using format "module=level,module=level"; `*` means all other modules
logging: "*=info"
# redis-related fields
redis:
# URL of redis server (default:"localhost:6379")
server: "memento-redis:6379"
# The name of the redis list the scraper will use for task management (default: "todo")
list: "todo"
|
And this in the explorer configuration file: {
"GOOGLE_ANALYTICS_ID": null,
"HOTJAR_ID": null,
"SENTRY_ENABLED": false,
// "nodeUrl": "http://127.0.0.1:8545",
// "APP_NODE_URL": "http://localhost:8545",
"pluginsUrl": "plugins",
"plugins": [
{
"uri": "plugin://aleth.io/eth-common?v=4.0.0"
},
{
"uri": "plugin://aleth.io/3box?v=1.1.1",
"config": {
"ipfsUrlMask": "https://ipfs.infura.io/ipfs/%s"
}
},
{
"uri": "plugin://aleth.io/eth-memento?v=2.0.2",
"config": {
"apiBasePath": "http://localhost:3001/api/explorer"
}
}
],
"pages": [
{
"def": "page://aleth.io/block",
"children": {
"sidebar": [
{
"def": "context://aleth.io/block/list",
"children": [{ "def": "module://aleth.io/block/list" }]
}
],
"content": [
{
"def": "module://aleth.io/memento/block/basic",
"pageCritical": true,
"children": {
"confirmations": [
{ "def": "module://aleth.io/block/confirmations" }
]
}
},
{
"def": "module://aleth.io/memento/block/txs",
"pageCritical": true
},
{
"def": "module://aleth.io/memento/block/advanced",
"pageCritical": true
},
{
"def": "module://aleth.io/memento/block/logs-bloom",
"pageCritical": true
}
]
}
},
{
"def": "page://aleth.io/uncle",
"children": {
"content": [
{
"def": "module://aleth.io/memento/uncle/details",
"pageCritical": true
}
]
}
},
{
"def": "page://aleth.io/tx",
"children": {
"sidebar": [
{
"def": "context://aleth.io/memento/tx/parentBlock",
"children": [
{
"def": "module://aleth.io/tx/list"
}
]
}
],
"content": [
{
"def": "context://aleth.io/memento/tx/parentBlock",
"pageCritical": true,
"children": [
{
"def": "module://aleth.io/memento/tx/basic",
"children": {
"blockConfirmations": [
{
"def": "context://aleth.io/memento/tx/parentBlock",
"children": [
{
"def": "module://aleth.io/block/confirmations"
}
]
}
]
}
},
{
"def": "module://aleth.io/memento/tx/advanced"
},
{
"def": "module://aleth.io/memento/tx/summary"
},
{
"def": "module://aleth.io/memento/tx/payload"
}
]
}
]
}
},
{
"def": "page://aleth.io/account",
"children": {
"identicon": [
{
"def": "module://aleth.io/3box/profile",
"children": {
"fallback": [{ "def": "module://aleth.io/account/identicon" }]
}
}
],
"top": [
{
"def": "module://aleth.io/memento/account/details",
"pageCritical": true
}
],
"bottom": [
{ "def": "module://aleth.io/memento/account/txs" },
{ "def": "module://aleth.io/memento/account/contract" }
]
}
},
{
"def": "page://aleth.io/dashboard",
"children": {
"content": [
{ "def": "module://aleth.io/search" },
{
"def": "context://aleth.io/dashboard/latestBlockRange",
"children": [
{
"def": "module://aleth.io/dashboard/charts",
"children": {
"content": [
{
"def": "module://aleth.io/dashboard/blocksChart",
"children": {
"children": [
{
"def": "context://aleth.io/block/latest",
"children": [
{
"def": "module://aleth.io/dashboard/latestBlockInfo"
}
]
}
]
}
}
]
}
}
]
}
]
}
}
],
"rootModules": {
"toolbarTop": [
{
"def": "module://aleth.io/toolbar/search"
}
],
"toolbarBottom": [
{
"def": "module://aleth.io/toolbar/feedback"
}
],
"topbar": [
{
"def": "module://aleth.io/topbar/search"
},
{
"def": "module://aleth.io/topbar/feedback"
}
]
}
} I followed the tutorials, i copied the default's configuration and I changed just what i need to. |
Ganache listens only on a single port at a time ( |
@SalahAdDin In addition to the 8545/8546 port stuff @davidmurdoch mentioned, it looks like the core of your issues circulates around incorrect docker configuration/misunderstanding how docker works rather than issues with ganache or memento In both the Docker lets you refer to them by name, so you just need to change Further, the error that you receive in the webapp:
Is happening because your After removing those lines, I do end up getting an error Hope this helps! |
@seesemichaelj don't close this yet, please. I made the changes you said and even so:
Connection refused by the ganache-cli. So, i can't see any track in memento and also at explorer. |
@SalahAdDin Unfortunately this isn't an issue with ganache-cli, so I'm going to keep this issue closed. The issue lies in either your memento or docker configuration. However, I did publish my full configuration at https://github.com/seesemichaelj/memento-docker-compose in hopes that you can figure out what it is that you have configured wrong. This configuration works perfectly for me. Hope it helps! |
@SalahAdDin man, yours does not work for me hahahahaha |
Ah, truthfully, I didn't test it after I added those .gitignore files 😬 Also, I changed the exposed port for
|
If you wanted to get past the 10 block thing you can disable lag altogether or change the number of blocks here https://github.com/seesemichaelj/memento-docker-compose/blob/master/.volumes/memento/config.yml#L61-L66 |
@seesemichaelj i tested your configuration and i got that bug, with your own configuration, i didn't touch it. |
I don't know what bug you're talking about. If you're talking about the |
THis is really very tricky, now i have a problem with the explorer:
Unfortunately, they are not answering issues in the main repo, It's sad that ganache-cli doesn't offer its own web interface. |
Expected Behavior
Both memento and explorer must be connected to ganache-cli.
Current Behavior
For Memento(docker logs):
For Explorer(in-browser console):
It means they cannot connect properly to ganache-cli.
Steps to Reproduce (for bugs)
docker-compose -f docker-compose-explorer.yml up
Context
This is my docker compose file:
Also, i opened an issue in memento repository and i found the next issue.
Your Environment
The text was updated successfully, but these errors were encountered: