issues
search
iotaledger
/
node-docker-setup
Docker setup files to spin up IOTA/Shimmer nodes with a breeze.
12
stars
16
forks
source link
Unable to deploy a new chain using this repository
#8
Open
jo-al-ra
opened
1 year ago
jo-al-ra
commented
1 year ago
**Describe the bug** Creating a new chain using this repository is not possible Wasp: 404 error "panic: error while fetching chain state output: not found: url inx:///api/indexer/v1/outputs/alias/0xa256efcd646e02954edf3282f5bd62337502c192e093142764707f59ffa2657e" **To Reproduce** Steps to reproduce the behavior: The bug can be recreated using an EC2 instance from AWS - install docker using the script below: ``` sudo apt-get update -y sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release -y #Add docker GPG key sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg #Setup docker repository echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null #Install docker engine sudo apt-get update -y sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y #Enable docker without sudo sudo groupadd docker sudo usermod -aG docker $USER #Restart VM and try docker #newgrp docker #docker run hello-world ``` - Start the node-docker-setup ``` git clone https://github.com/iotaledger/node-docker-setup.git cd node-docker-setup/docker echo "COMPOSE_FILE=docker-compose.yml" >> .env echo "ACME_EMAIL=
" >> .env echo "NODE_HOST=
" >> .env echo "HTTP_PORT=9000" >> .env sudo ./prepare_docker.sh #Set admin as password echo "DASHBOARD_PASSWORD=6d386723b3d573458548e20f37f1a556ec653f49e9c2c5133070126f2b7a897d" >> .env echo "DASHBOARD_SALT=76299b26accd3d4d755be98a898476db47934ff49d63c7f2e06d337ae755df03" >> .env echo "COMPOSE_PROFILES=monitoring,wasp" >> .env docker compose up -d ``` - install wasp-cli ``` #Install Prerequirements sudo apt update -y sudo apt install golang-go -y sudo add-apt-repository ppa:ethereum/ethereum -y sudo apt-get update -y sudo apt-get install solc -y sudo apt install make -y #Install wasp git clone https://github.com/iotaledger/wasp.git cd wasp git checkout v0.3.8 make install #Add wasp-cli to path echo "export PATH=$PATH:$(go env GOPATH)/bin" >> ~/.bashrc source ~/.bashrc #Initialize wasp-cli cd .. wasp-cli init wasp-cli set l1.apiaddress https://api.testnet.shimmer.network wasp-cli set l1.faucetaddress https://faucet.testnet.shimmer.network wasp-cli set wasp.0.api http://
:9000/wasp/api wasp-cli set wasp.0.nanomsg http://localhost:5550 wasp-cli set wasp.0.peering http://localhost:4000 wasp-cli request-funds ``` - deploy new chain using wasp-cli ``` wasp-cli cain deploy ``` **Expected behavior** A new chain gets deployed and added to the wasp-cli.json **Actual behavior** ``` wasp-cli chain deploy creating new chain. Owner address: 0x49ff1e8a1c1f4da1930355bedf2f4703dc2792bd81558ee447ca6e5f518d4652. State controller: 0x5dd23c3a2611855287f8d74cb2663fb1c3f3aeaa52b299589f60280450bec500, N = 1, T = 1 2022-12-07T08:08:12Z INFO nc Posted blockID 0x39b8787a38c1cba9fb6df5d139f092a411343a6877221073432411d80ffb6ef6 2022-12-07T08:08:12Z INFO nc Posted transaction id 9e31f32bba5c139d4cb960cb16702e93e2a5a3392365340bf72ec95f791d3f69 2022-12-07T08:08:17Z INFO nc Posted blockID 0xce6c5ac7607343c6a494a3e360cdb507a7a66c93c0f54fbe9a09f611bbb062d6 2022-12-07T08:08:17Z INFO nc Posted transaction id b01a2253005a7b6e13480c6d7bd49485aabc756e44e50b89bcbbe67663f2e900 creating chain origin and init transaction 0xb01a2253005a7b6e13480c6d7bd49485aabc756e44e50b89bcbbe67663f2e900.. OK sending committee record to nodes.. OK activating chain 0xf934d631f0822600dfd6509eabe200d156d659ec2a87885371d26970286fd2af.. OK. waiting root init request transaction.. FAILED: #0: GET http://
.eu-central-1.compute.amazonaws.com:9000/wasp/api/chain/rms1prunf4337zpzvqxl6egfa2lzqrg4d4jeas4g0zznw8fxjupgdlf27c5fvec/request/0-b01a2253005a7b6e13480c6d7bd49485aabc756e44e50b89bcbbe67663f2e900/wait: 502: Bad Gateway error: DeployChain: #0: GET http://
.eu-central-1.compute.amazonaws.com:9000/wasp/api/chain/rms1prunf4337zpzvqxl6egfa2lzqrg4d4jeas4g0zznw8fxjupgdlf27c5fvec/request/0-b01a2253005a7b6e13480c6d7bd49485aabc756e44e50b89bcbbe67663f2e900/wait: 502: Bad Gateway ``` **Environment information:** - OS: Ubuntu 22.04 - RAM: 8GB - Cores: 4 Cores - Type: AWS EC2 t3a.xlarge - node-docker-setup version: v1.0.0-rc.1 **Additional context** Full logs of the wasp container: ``` >>>>> Starting Wasp v0.3.8 <<<<< Parameters loaded: { "app": { "checkforupdates": true, "shutdown": { "log": { "enabled": true, "filepath": "shutdown.log" }, "stopgraceperiod": 300000000000 } }, "chains": { "apicachettl": 300000000000, "broadcastinterval": 5000000000, "broadcastuptonpeers": 2, "pullmissingrequestsfromcommittee": true }, "dashboard": { "auth": { "basic": { "username": "wasp" }, "ip": { "whitelist": [ "0.0.0.0" ] }, "jwt": { "duration": 86400000000000 }, "scheme": "basic" }, "bindaddress": "wasp:7000", "enabled": true, "exploreaddressurl": "" }, "database": { "directory": "/app/waspdb", "inmemory": false }, "inx": { "address": "hornet:9029", "maxconnectionattempts": 30 }, "logger": { "disablecaller": true, "disableevents": true, "disablestacktrace": false, "encoding": "console", "level": "info", "outputpaths": [ "stdout" ], "stacktracelevel": "panic" }, "metrics": { "bindaddress": "wasp:9312", "enabled": false }, "nanomsg": { "enabled": true, "port": 5550 }, "peering": { "netid": "0.0.0.0:4000", "port": 4000 }, "profiling": { "bindaddress": "localhost:6060", "enabled": false }, "rawblocks": { "directory": "blocks", "enabled": false }, "registry": { "filename": "chain-registry.json", "usetext": false }, "users": { "users": { "wasp": { "Password": "wasp", "Permissions": [ "dashboard", "api", "chain.read", "chain.write" ] } } }, "wal": { "directory": "wal", "enabled": true }, "webapi": { "auth": { "basic": { "username": "wasp" }, "ip": { "whitelist": [ "0.0.0.0" ] }, "jwt": { "duration": 86400000000000 }, "scheme": "none" }, "bindaddress": "wasp:9090", "enabled": true, "nodeowneraddresses": [] } } The following plugins are enabled: - Dashboard - PublisherNano - WAL - WebAPI The following plugins are disabled: - Metrics - Profiling 2022-12-07T08:09:19Z INFO INX Connecting to node and reading node configuration ... 2022-12-07T08:09:19Z INFO INX Reading node status ... 2022-12-07T08:09:19Z INFO App Loading core components ... 2022-12-07T08:09:19Z INFO App Loading core components: INX ... done 2022-12-07T08:09:19Z INFO App Loading core components: Shutdown ... done 2022-12-07T08:09:19Z INFO App Loading core components: NodeConn ... done 2022-12-07T08:09:19Z INFO App Loading core components: Users ... done 2022-12-07T08:09:19Z INFO App Loading core components: Logger ... done 2022-12-07T08:09:19Z INFO dbmanager using existing database for: CHAIN_REGISTRY. 2022-12-07T08:09:19Z INFO App Loading core components: Database ... done 2022-12-07T08:09:19Z INFO App Loading core components: Registry ... done 2022/12/07 08:09:19 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details. 2022-12-07T08:09:19Z INFO Peering ------------- NetID is 0.0.0.0:4000 ------------------ 2022-12-07T08:09:19Z INFO App Loading core components: Peering ... done 2022-12-07T08:09:19Z INFO App Loading core components: DKG ... done 2022-12-07T08:09:19Z INFO Processors Registering native contracts... 2022-12-07T08:09:19Z INFO App Loading core components: Processors ... done 2022-12-07T08:09:19Z INFO WasmTimeVM registered VM type: 'wasmtime' 2022-12-07T08:09:19Z INFO App Loading core components: WasmTimeVM ... done 2022-12-07T08:09:19Z INFO App Loading core components: Chains ... done 2022-12-07T08:09:19Z INFO App Loading plugins ... 2022-12-07T08:09:19Z INFO App Loading plugin: WAL ... done 2022-12-07T08:09:19Z INFO App Loading plugin: WebAPI ... done 2022-12-07T08:09:19Z INFO App Loading plugin: PublisherNano ... done 2022-12-07T08:09:19Z INFO App Loading plugin: Dashboard ... done 2022-12-07T08:09:19Z INFO App Executing core components ... 2022-12-07T08:09:19Z INFO App Starting core component: INX ... done 2022-12-07T08:09:19Z INFO App Starting core component: Shutdown ... done 2022-12-07T08:09:19Z INFO App Starting core component: NodeConn ... done 2022-12-07T08:09:19Z INFO App Starting core component: Users ... done 2022-12-07T08:09:19Z INFO App Starting core component: Logger ... done 2022-12-07T08:09:19Z INFO App Starting core component: Database ... done 2022-12-07T08:09:19Z INFO App Starting core component: Registry ... done 2022-12-07T08:09:19Z INFO App Starting core component: Peering ... done 2022-12-07T08:09:19Z INFO App Starting core component: DKG ... done 2022-12-07T08:09:19Z INFO App Starting core component: Processors ... done 2022-12-07T08:09:19Z INFO App Starting core component: WasmTimeVM ... done 2022-12-07T08:09:19Z INFO App Starting core component: Chains ... done 2022-12-07T08:09:19Z INFO App Executing plugins ... 2022-12-07T08:09:19Z INFO App Starting plugin: WAL ... done 2022-12-07T08:09:19Z INFO WebAPI Starting WebAPI ... 2022-12-07T08:09:19Z INFO App Starting plugin: WebAPI ... done 2022-12-07T08:09:19Z INFO PublisherNano nanomsg publisher is running on port 5550 2022-12-07T08:09:19Z INFO App Starting plugin: PublisherNano ... done {"time":"2022-12-07T08:09:19.674071124Z","level":"INFO","prefix":"-","file":"component.go","line":"75","message":"Starting Dashboard ..."} 2022-12-07T08:09:19Z INFO App Starting plugin: Dashboard ... done 2022-12-07T08:09:19Z INFO App Starting background workers ... 2022-12-07T08:09:19Z INFO INX Starting NodeBridge ... 2022-12-07T08:09:19Z INFO dbmanager using existing database for: smr1prunf4337zpzvqxl6egfa2lzqrg4d4jeas4g0zznw8fxjupgdlf27vnzkzp. {"time":"2022-12-07T08:09:19.676850077Z","level":"INFO","prefix":"-","file":"component.go","line":"205","message":"Dashboard started, bind address=wasp:7000"} 2022-12-07T08:09:19Z INFO WebAPI added web api endpoints 2022-12-07T08:09:19Z INFO WebAPI WebAPI started, bind-address=wasp:9090 2022-12-07T08:09:19Z INFO NodeConn.nc.smr1pr Subscribing to ledger updates 2022-12-07T08:09:19Z INFO Chains activated chain: smr1prunf4337zpzvqxl6egfa2lzqrg4d4jeas4g0zznw8fxjupgdlf27vnzkzp 2022-12-07T08:09:19Z INFO Chains.c-f934d6 Dismiss chain. Reason: 'StateManager.initLoadState: LoadSolidState: expected chainID: smr1prunf4337zpzvqxl6egfa2lzqrg4d4jeas4g0zznw8fxjupgdlf27vnzkzp, got: smr1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmve2j5' 2022-12-07T08:09:19Z PANIC NodeConn.nc.smr1pr error while fetching chain state output: not found: url inx:///api/indexer/v1/outputs/alias/0xf934d631f0822600dfd6509eabe200d156d659ec2a87885371d26970286fd2af, error message: Not Found, error: record not found: code=404, message=Not Found github.com/iotaledger/wasp/packages/nodeconn.(*ncChain).queryLatestChainStateUTXO /scratch/packages/nodeconn/nc_chain.go:197 panic: error while fetching chain state output: not found: url inx:///api/indexer/v1/outputs/alias/0xf934d631f0822600dfd6509eabe200d156d659ec2a87885371d26970286fd2af, error message: Not Found, error: record not found: code=404, message=Not Found goroutine 194 [running]: go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x0?, 0x0?, {0x0?, 0x0?, 0xc000a7a020?}) /go/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/entry.go:198 +0x65 go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00020d6c0, {0x0, 0x0, 0x0}) /go/pkg/mod/go.uber.org/zap@v1.23.0/zapcore/entry.go:264 +0x3ec go.uber.org/zap.(*SugaredLogger).log(0xc000207770, 0x4, {0x2c8ed88?, 0xc0016ab5c0?}, {0xc0016f7fa8?, 0x0?, 0x0?}, {0x0, 0x0, 0x0}) /go/pkg/mod/go.uber.org/zap@v1.23.0/sugar.go:287 +0xee go.uber.org/zap.(*SugaredLogger).Panicf(...) /go/pkg/mod/go.uber.org/zap@v1.23.0/sugar.go:181 github.com/iotaledger/wasp/packages/nodeconn.(*ncChain).queryLatestChainStateUTXO(0xc0016d1ad0) /scratch/packages/nodeconn/nc_chain.go:197 +0x165 created by github.com/iotaledger/wasp/packages/nodeconn.(*ncChain).run /scratch/packages/nodeconn/nc_chain.go:217 +0x8a ```