iotaledger / one-click-tangle

"One Click Tangle" intends to make lives easier to IOTA adopters by providing pre-configured scripts and recipes that allow to deploy IOTA Networks and Nodes "in one click".
MIT License
55 stars 35 forks source link

Coo not syncing #35

Closed esmaykel closed 3 years ago

esmaykel commented 3 years ago

Bug description

After launching private tangle I can't get the coordinator to sync.

Docker and docker-compose version

Hardware specification

Steps To reproduce the bug

Launching Private Tangle with private-tangle.sh I can see: coo:15600 (Not Connected) spammer:15600 Synced node1 Status Synced

Then I can't get the coordinator to sync

jmcanterafonseca-iota commented 3 years ago

can you/we have a look at the logs of the Coordinator docker logs coo ?

On Tue, May 11, 2021 at 12:14 PM esmaykel @.***> wrote:

Bug description

After launching private tangle I can't get the coordinator to sync. Docker and docker-compose version

  • Docker version: 19.03.12
  • Docker-Compose version: 1.29.1

Hardware specification

  • Operating system:
  • RAM: 16Gb
  • Cores: 24
  • Device: Intel(R) Xeon(R) Silver 4210 CPU @ 2.20GHz

Steps To reproduce the bug

Launching Private Tangle with private-tangle.sh I can see: coo:15600 (Not Connected) spammer:15600 Synced node1 Status Synced

Then I can't get the coordinator to sync

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iotaledger/one-click-tangle/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLVDS46R5G6DZ5FFZHLTND7Q7ANCNFSM44VAD4NQ .

-- IOTA Foundation c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany

Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

esmaykel commented 3 years ago

This is what I get with "docker-compose logs coo":

oo                  |                                                            legacy
coo                  |                                    v0.5.8
coo                  | 
coo                  | 
coo                  | 2021-05-11T11:13:52Z INFO    CLI cli/plugin.go:121   Update to 1.0.1 available on https://github.com/gohornet/hornet/releases/latest
coo                  | 2021-05-11T11:13:52Z INFO    CLI cli/plugin.go:83Profile mode 'auto', Using profile '8gb'
coo                  | 2021-05-11T11:13:52Z INFO    CLI cli/plugin.go:88Loading plugins ...
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: CLI ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Graceful Shutdown ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: Profiling
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Database ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Curl ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: Autopeering
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: WebAPI ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: PoW ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Gossip ... done
coo                  | SnapshotInfo:
coo                  |  CooAddr: 9KARIPBYLDBDHVPG9TCBM9YIHVMZWGUGCPQXCROQGPFRVQCKTYA9HZAL9Q9UNUXPWKIGRSVFKMLJLXUNX
coo                  |  SnapshotIndex: 0 (999999999999999999999999999999999999999999999999999999999999999999999999999999999)
coo                  |  EntryPointIndex: 0
coo                  |  PruningIndex: 0
coo                  |  Timestamp: 1970-01-01 00:00:00 +0000 UTC
coo                  |  SpentAddressesEnabled: true
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Tangle ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Peering ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: WarpSync
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: URTS
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Metrics ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:95Loading Plugin: Snapshot ... done
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: Dashboard
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: ZMQ
coo                  | 2021-05-11T11:13:52Z INFO    Node    node/node.go:86Skipping Plugin: MQTT
coo                  | 2021-05-11T11:13:52Z PANIC   Coordinator coordinator/plugin.go:78    environment variable 'COO_SEED' not set
coo                  | github.com/gohornet/hornet/plugins/coordinator.configure
coo                  |  /__w/hornet/hornet/plugins/coordinator/plugin.go:78
coo                  | github.com/iotaledger/hive.go/node.pluginCaller
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/events.go:14
coo                  | github.com/iotaledger/hive.go/events.(*Event).Trigger
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/events/event.go:32
coo                  | github.com/iotaledger/hive.go/node.(*Node).configure
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:93
coo                  | github.com/iotaledger/hive.go/node.New
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:38
coo                  | github.com/iotaledger/hive.go/node.Run
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:51
coo                  | main.main
coo                  |  /__w/hornet/hornet/main.go:65
coo                  | runtime.main
coo                  |  /usr/local/go/src/runtime/proc.go:204
coo                  | panic: environment variable 'COO_SEED' not set
coo                  | 
coo                  | goroutine 1 [running]:
coo                  | go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0007ac210, 0x0, 0x0, 0x0)
coo                  |  /github/home/go/pkg/mod/go.uber.org/zap@v1.15.0/zapcore/entry.go:230 +0x55f
coo                  | go.uber.org/zap.(*SugaredLogger).log(0xc00028a138, 0x4, 0x0, 0x0, 0xc0007ffc98, 0x1, 0x1, 0x0, 0x0, 0x0)
coo                  |  /github/home/go/pkg/mod/go.uber.org/zap@v1.15.0/sugar.go:234 +0xf6
coo                  | go.uber.org/zap.(*SugaredLogger).Panic(...)
coo                  |  /github/home/go/pkg/mod/go.uber.org/zap@v1.15.0/sugar.go:123
coo                  | github.com/gohornet/hornet/plugins/coordinator.configure(0xc000071680)
coo                  |  /__w/hornet/hornet/plugins/coordinator/plugin.go:78 +0x11b
coo                  | github.com/iotaledger/hive.go/node.pluginCaller(0x1110840, 0x214b5f0, 0xc0006b6a50, 0x1, 0x1)
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/events.go:14 +0x62
coo                  | github.com/iotaledger/hive.go/events.(*Event).Trigger(0xc00019f7a0, 0xc0006b6a50, 0x1, 0x1)
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/events/event.go:32 +0x10b
coo                  | github.com/iotaledger/hive.go/node.(*Node).configure(0xc00019e6c0, 0xc0002a4aa0, 0x14, 0x14)
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:93 +0xf6
coo                  | github.com/iotaledger/hive.go/node.New(0xc00047bf00, 0x1, 0x1, 0x11c69e0)
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:38 +0x153
coo                  | github.com/iotaledger/hive.go/node.Run(0xc00047bf00, 0x1, 0x1, 0xc0005847c0)
coo                  |  /github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:51 +0x3f
coo                  | main.main()
coo                  |  /__w/hornet/hornet/main.go:65 +0x190
jmcanterafonseca-iota commented 3 years ago

I think you are missing to export the coordinator seed when starting the Coo. Please try:

Stop your coordinator :

docker-compose stop coo docker-compose rm coo

Then run your coordinator:

export COO_SEED=$(cat coordinator.seed) docker-compose --log-level ERROR up -d coo

On Tue, May 11, 2021 at 1:18 PM esmaykel @.***> wrote:

This is what I get with "docker-compose logs coo":

oo | legacy coo | v0.5.8 coo | coo | coo | 2021-05-11T11:13:52Z INFO CLI cli/plugin.go:121 Update to 1.0.1 available on https://github.com/gohornet/hornet/releases/latest coo | 2021-05-11T11:13:52Z INFO CLI cli/plugin.go:83Profile mode 'auto', Using profile '8gb' coo | 2021-05-11T11:13:52Z INFO CLI cli/plugin.go:88Loading plugins ... coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: CLI ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Graceful Shutdown ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: Profiling coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Database ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Curl ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: Autopeering coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: WebAPI ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: PoW ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Gossip ... done coo | SnapshotInfo: coo | CooAddr: 9KARIPBYLDBDHVPG9TCBM9YIHVMZWGUGCPQXCROQGPFRVQCKTYA9HZAL9Q9UNUXPWKIGRSVFKMLJLXUNX coo | SnapshotIndex: 0 (999999999999999999999999999999999999999999999999999999999999999999999999999999999) coo | EntryPointIndex: 0 coo | PruningIndex: 0 coo | Timestamp: 1970-01-01 00:00:00 +0000 UTC coo | SpentAddressesEnabled: true coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Tangle ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Peering ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: WarpSync coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: URTS coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Metrics ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:95Loading Plugin: Snapshot ... done coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: Dashboard coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: ZMQ coo | 2021-05-11T11:13:52Z INFO Node node/node.go:86Skipping Plugin: MQTT coo | 2021-05-11T11:13:52Z PANIC Coordinator coordinator/plugin.go:78 environment variable 'COO_SEED' not set coo | github.com/gohornet/hornet/plugins/coordinator.configure coo | /w/hornet/hornet/plugins/coordinator/plugin.go:78 coo | github.com/iotaledger/hive.go/node.pluginCaller coo | @./node/events.go:14 coo | github.com/iotaledger/hive.go/events.(Event).Trigger coo | **@./events/event.go:32 coo | github.com/iotaledger/hive.go/node.(Node).configure coo | **@./node/node.go:93 coo | github.com/iotaledger/hive.go/node.New coo | @./node/node.go:38 coo | github.com/iotaledger/hive.go/node.Run coo | @.***/node/node.go:51 coo | main.main coo | /w/hornet/hornet/main.go:65 coo | runtime.main coo | /usr/local/go/src/runtime/proc.go:204 coo | panic: environment variable 'COO_SEED' not set coo | coo | goroutine 1 [running]: coo | go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0007ac210, 0x0, 0x0, 0x0) coo | @./zapcore/entry.go:230 +0x55f coo | go.uber.org/zap.(SugaredLogger).log(0xc00028a138, 0x4, 0x0, 0x0, 0xc0007ffc98, 0x1, 0x1, 0x0, 0x0, 0x0) coo | **@./sugar.go:234 +0xf6 coo | go.uber.org/zap.(SugaredLogger).Panic(...) coo | **@./sugar.go:123 coo | github.com/gohornet/hornet/plugins/coordinator.configure(0xc000071680) coo | /__w/hornet/hornet/plugins/coordinator/plugin.go:78 +0x11b coo | github.com/iotaledger/hive.go/node.pluginCaller(0x1110840, 0x214b5f0, 0xc0006b6a50, 0x1, 0x1) coo | @./node/events.go:14 +0x62 coo | github.com/iotaledger/hive.go/events.(*Event).Trigger(0xc00019f7a0, 0xc0006b6a50, 0x1, 0x1) coo | @./events/event.go:32 +0x10b coo | github.com/iotaledger/hive.go/node.(Node).configure(0xc00019e6c0, 0xc0002a4aa0, 0x14, 0x14) coo | **@./node/node.go:93 +0xf6 coo | github.com/iotaledger/hive.go/node.New(0xc00047bf00, 0x1, 0x1, 0x11c69e0) coo | @./node/node.go:38 +0x153 coo | github.com/iotaledger/hive.go/node.Run(0xc00047bf00, 0x1, 0x1, 0xc0005847c0) coo | @.***/node/node.go:51 +0x3f coo | main.main() coo | /__w/hornet/hornet/main.go:65 +0x190

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iotaledger/one-click-tangle/issues/35#issuecomment-838296261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLU4CLTANH7G2GF3O7TTNEHBRANCNFSM44VAD4NQ .

-- IOTA Foundation c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany

Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

esmaykel commented 3 years ago

I have managed to synchronize the coordinator by exporting the variable that you have told me, but the Latest Solid Milestone Index does not increase from 0. After a few minutes the coo is disconnected and in the log it appears:

coo | 2021-05-11T14:10:08Z PANIC Coordinator coordinator/plugin.go:78 database is tainted. delete the coordinator database and start again with a local snapsh

jmcanterafonseca-iota commented 3 years ago

can you try to re-install your Private Tangle?

On Tue, May 11, 2021 at 4:14 PM esmaykel @.***> wrote:

I have managed to synchronize the coordinator by exporting the variable that you have told me, but the Latest Solid Milestone Index does not increase from 0. After a few minutes the coo is disconnected and in the log it appears:

coo | 2021-05-11T14:10:08Z PANIC Coordinator coordinator/plugin.go:78 database is tainted. delete the coordinator database and start again with a local snapsh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iotaledger/one-click-tangle/issues/35#issuecomment-838548869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLWIPZALJY7QTIUG2MLTNE3TLANCNFSM44VAD4NQ .

-- IOTA Foundation c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany

Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

esmaykel commented 3 years ago

Yes. I have done it and the same result. Can it influence the fact that the computer has blocked the listening ports used by the node?

esmaykel commented 3 years ago

tcp6 0 0 :::15600 ::: LISTEN 30602/docker-proxy tcp6 0 0 :::8081 ::: LISTEN 30630/docker-proxy tcp6 0 0 :::14265 ::: LISTEN 30616/docker-proxy tcp6 0 0 :::9000 ::: LISTEN 29440/docker-proxy

CaixiangFan commented 3 years ago

@esmaykel I met the same problem. It works on hornet v0.5.6, but can't work on legacy-v0.5.8 or higher.

jmcanterafonseca-iota commented 3 years ago

thanks for the feedback. I have bumped the Hornet version on master (pre-chrysalis) docker-compose to be v0.5.6

As we are now adapting all scripts for Chrysalis, there is no point in investigating why in v0.5.8 it does not work, but we welcome ideas or patches from the community.

On Fri, May 14, 2021 at 1:03 AM Stephen Fan @.***> wrote:

@esmaykel https://github.com/esmaykel I met the same problem. It works on hornet v0.5.6, but can't work on legacy-v0.5.8 or higher.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iotaledger/one-click-tangle/issues/35#issuecomment-840883504, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLQHW7JVOCNL64CDBG3TNRLFXANCNFSM44VAD4NQ .

-- IOTA Foundation c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany

Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

jmcanterafonseca-iota commented 3 years ago

@esmaykel you are welcome to test out the new Private Tangle scripts for Chrysalis

esmaykel commented 3 years ago

Hello @jmcanterafonseca , Thanks for your notice.

I must say that I have tested it and it works fine. Now I can deploy the services. However, now I can't get my node/js api to connect to the node.

I use: iota = await iotaLibrary.composeAPI( { provider : 'http://localhost:14265' }) await iota.getNodeInfo() .then(info => { console.log(info); }) .catch(error => { console.log(Request error: ${error.message}); })

And I have the following error message: Request error: undefined

I would appreciate if you could tell me where to look.

jmcanterafonseca-iota commented 3 years ago

are you using iota.js for Chrysalis? See https://github.com/iotaledger/iota.js/

On Wed, May 26, 2021 at 1:12 PM esmaykel @.***> wrote:

Hello @jmcanterafonseca https://github.com/jmcanterafonseca , Thanks for your notice.

I must say that I have tested it and it works fine. Now I can deploy the services. However, now I can't get my node/js api to connect to the node.

I use: iota = await iotaLibrary.composeAPI( { provider : 'http://localhost:14265' }) await iota.getNodeInfo() .then(info => { console.log(info); }) .catch(error => { console.log(Request error: ${error.message}); })

And I have the following error message: Request error: undefined

I would appreciate if you could tell me where to look.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iotaledger/one-click-tangle/issues/35#issuecomment-848681332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLQCPEJXZJXTTSLQULDTPTJP7ANCNFSM44VAD4NQ .

-- IOTA Foundation c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany

Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

esmaykel commented 3 years ago

@jmcanterafonseca-iota no, i use a older version of iota package nodejs. I've been watching some functions change. For example, I use: const Converter = require('@iota/converter'); And this component does not exist anymore. I will change and update my code.
Thank you so much

jmcanterafonseca-iota commented 3 years ago

you no longer needs conversion as Chrysalis deals directly with bytes, no longer trytes :)

On Wed, May 26, 2021 at 2:17 PM esmaykel @.***> wrote:

@jmcanterafonseca-iota https://github.com/jmcanterafonseca-iota no, i use a older version of iota package nodejs. I've been watching some functions change. For example, I use: const Converter = @.***/converter'); And this component does not exist anymore. I will change and update my code. Thank you so much

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iotaledger/one-click-tangle/issues/35#issuecomment-848720577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLSWDQOCOM2VR5WS7CTTPTRF5ANCNFSM44VAD4NQ .

-- IOTA Foundation c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany

Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

peterokwara commented 3 years ago

Yeah that problem also happened (slightly different error message) when we tried to generate a new merkle tree and run the coo with the legacy-v0.5.8, after running out of milestones

And using hornet v0.5.6 as @CaixiangFan suggested worked at that time.

And as @jmcanterafonseca-iota suggested we move to chrysalis

image

thanks for the feedback. I have bumped the Hornet version on master (pre-chrysalis) docker-compose to be v0.5.6 As we are now adapting all scripts for Chrysalis, there is no point in investigating why in v0.5.8 it does not work, but we welcome ideas or patches from the community. On Fri, May 14, 2021 at 1:03 AM Stephen Fan @.**> wrote: @esmaykel https://github.com/esmaykel I met the same problem. It works on hornet v0.5.6, but can't work on legacy-v0.5.8 or higher. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#35 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLQHW7JVOCNL64CDBG3TNRLFXANCNFSM44VAD4NQ . -- IOTA Foundation* c/o Nextland Strassburgerstraße 55 10405 Berlin, Germany Board of Directors: Dominik Schiener, Serguei Popov, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)

jmcanterafonseca-iota commented 3 years ago

closing as this refers to the legacy network ....