everstake / cosmoscan-api Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hey folks thanks for building this! Struggling to get it up and running though.
Versions:
# docker version
Client: Docker Engine - Community
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:47:17 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8728dd2
Built: Fri Apr 9 22:45:28 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
And
# docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
First when I follow the instructions I get this on docker-compose build
:
# docker-compose build
ERROR: Couldn't find env file: /root/cosmoscan-api/docker/.env:./.env
If I edit the docker-compose.yml
and change the env file line from ./docker/.env:./.env
to ./.env
then the build works (note that the instructions say to copy the docker/.env.example
to .env
, not to .docker/.env
, but even the latter requires edits to the compose yml).
And then I can run docker-compose up -d
.
But now docker logs cosmoscan-mysql
gives:
2021-05-20 03:39:35+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.25-1debian10 started.
2021-05-20 03:39:36+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-05-20 03:39:36+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.25-1debian10 started.
2021-05-20 03:39:37+00:00 [ERROR] [Entrypoint]: MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user
Remove MYSQL_USER="root" and use one of the following to control the root user password:
- MYSQL_ROOT_PASSWORD
- MYSQL_ALLOW_EMPTY_PASSWORD
- MYSQL_RANDOM_ROOT_PASSWORD
If I then edit the docker-compose.yml, delete the MYSQL_USER line, rebuild and rerun the mysql container seems to start up fine:
# docker logs cosmoscan-mysql
2021-05-20 03:49:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.25-1debian10 started.
2021-05-20 03:49:08+00:00 [Note] [Entrypoint]: Initializing database files
2021-05-20T03:49:08.409825Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.25) initializing of server in progress as process 40
2021-05-20T03:49:08.429032Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-20T03:49:09.431809Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-20T03:49:12.236183Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2021-05-20 03:49:16+00:00 [Note] [Entrypoint]: Database files initialized
2021-05-20 03:49:16+00:00 [Note] [Entrypoint]: Starting temporary server
2021-05-20T03:49:17.474736Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25) starting as process 85
2021-05-20T03:49:17.536448Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-20T03:49:18.011312Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-20T03:49:18.267636Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2021-05-20T03:49:18.591001Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-05-20T03:49:18.592004Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-05-20T03:49:18.596992Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2021-05-20T03:49:18.656960Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.25' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
2021-05-20 03:49:18+00:00 [Note] [Entrypoint]: Temporary server started.
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2021-05-20 03:49:24+00:00 [Note] [Entrypoint]: Creating database cosmos
2021-05-20 03:49:24+00:00 [Note] [Entrypoint]: Stopping temporary server
2021-05-20T03:49:24.599446Z 11 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.25).
2021-05-20T03:49:26.023758Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.25) MySQL Community Server - GPL.
2021-05-20 03:49:26+00:00 [Note] [Entrypoint]: Temporary server stopped
2021-05-20 03:49:26+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
2021-05-20T03:49:27.062732Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25) starting as process 1
2021-05-20T03:49:27.086915Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-20T03:49:27.583426Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-20T03:49:27.847531Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-05-20T03:49:28.034795Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-05-20T03:49:28.035878Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-05-20T03:49:28.043388Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2021-05-20T03:49:28.102636Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.25' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
But the api container can't connect:
# docker logs cosmoscan-api
[error 2021.05.20 03:53:40] cant open connection to mysql: dial tcp 127.0.0.1:3306: connect: connection refused
[error 2021.05.20 03:53:41] cant open connection to mysql: dial tcp 127.0.0.1:3306: connect: connection refused
[error 2021.05.20 03:53:42] cant open connection to mysql: dial tcp 127.0.0.1:3306: connect: connection refused
[error 2021.05.20 03:53:43] cant open connection to mysql: dial tcp 127.0.0.1:3306: connect: connection refused
I've tried a few different things but so far haven't been able to make it work. Any thoughts?
Thanks!
Cosmoscan is stucked at block 7078832.
Following instructions I tried starting up and getting this error:
error 2021.04.10 03:19:40] Parser: fetcher: api.GetBlock: bad status: 500, {"error":"height 3 is not available, lowest height is 5200791"}
[error 2021.04.10 03:19:40] Parser: fetcher: api.GetBlock: bad status: 500, {"error":"height 2 is not available, lowest height is 5200791"}
[error 2021.04.10 03:19:40] Parser: fetcher: api.GetBlock: bad status: 500, {"error":"height 5 is not available, lowest height is 5200791"}
[error 2021.04.10 03:19:40] Parser: fetcher: api.GetBlock: bad status: 500, {"error":"height 4 is not available, lowest height is 5200791"}
[error 2021.04.10 03:19:41] Parser: fetcher: api.GetBlock: bad status: 500, {"error":"height 1 is not available, lowest height is 5200791"}
[error 2021.04.10 03:19:41] Parser: fetcher: api.GetBlock: bad status: 500, {"error":"height 3 is not available, lowest height is 5200791"}
Please advise.
Hey there!
Excellent job on cosmos scan I think it looks gorgeous!
I would love to adapt it to other tender mint blockchains, and I'm wondering if there was an easy way to do so?
Obviously I need to change the node API URL, and the genesis file location, but I guess also the Bech32 prefixes?
I Believe I would have to do that in my own cosmos-sdk repo right?
Anything else I would be missing?
Thanks!
clickhouse
mysql
api
parser
what's the difference between parser & api?
can you guys point me to detailed documentation how how set this up on ubuntu server?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.