bloxbean / yaci-cli

A CLI tool aims to help developers building on Cardano
MIT License
5 stars 1 forks source link

Kupo stopped working after updating Docker Desktop on macos to 4.29.0 (145265) #14

Open ilap opened 6 months ago

ilap commented 6 months ago

I did not have time to dig deep on the docker config, but I observed after the update that kupo and ogmios has some cross-dependent connnection somehow after the update:

tcp        0      0 127.0.0.1:1337          127.0.0.1:39562         ESTABLISHED
tcp        0      0 127.0.0.1:39562         127.0.0.1:1337          ESTABLISHED

A quick dirty solution is to replace localhost to 0.0.0.0 in the yaci-cli's template file.

/app/kupo/bin/kupo \
  --ogmios-host localhost \
  --ogmios-port 1337 \
  --host 0.0.0.0 \
  --port 1442 \
  --since origin \
  --match "*" \
  --workdir /clusters/default/kupo_db

What I did to get it working again. In the container:

cd /app
mkdir tmp && cd tmp
cp -pr ../yaci-cli.jar .

jar xf ../yaci-cli.jar BOOT-INF/classes/localcluster.zip
jar xf BOOT-INF/classes/localcluster.zip localcluster/templates/babbage/kupo.sh

sed -i 's/localhost/0.0.0.0/' localcluster/templates/babbage/kupo.sh

jar uf BOOT-INF/classes/localcluster.zip localcluster/templates/babbage/kupo.sh
jar uf ../yaci-cli.jar BOOT-INF/classes/localcluster.zip
cd .. && rm -rf ./tmp
satran004 commented 6 months ago

Thank you @ilap for highlighting this issue and the workaround.

Feel free to create a PR. Here's the file: https://github.com/bloxbean/yaci-cli/blob/main/src/main/resources/localcluster/templates/babbage/kupo.sh.

Alternatively, I will try to make the changes and create a release soon.