Git Product home page Git Product logo

Comments (19)

liudonghua123 avatar liudonghua123 commented on June 12, 2024

I encountered record not found [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'ext-app' and is_enable = 2 LIMIT 1` problems when starting apinto-dashboard, but I find the data is exists acturally.

Details
[root@localhost apinto_dashboard]# docker compose stop
[+] Running 2/2
 ✔ Container mysql          Stopped                                                                                                                                                                                                    1.7s 
 ✔ Container cluster-redis  Stopped                                                                                                                                                                                                   10.8s 
[root@localhost apinto_dashboard]# docker compose rm
[cluster-redis mysql]
? Going to remove cluster-redis, mysql Yes
[+] Running 2/0
 ✔ Container cluster-redis  Removed                                                                                                                                                                                                    0.0s 
 ✔ Container mysql          Removed                                                                                                                                                                                                    0.0s 
 [root@localhost apinto_dashboard]#
[root@localhost apinto_dashboard]# rm -rf mysql/* redis-cluster/data/*
[root@localhost apinto_dashboard]#
[root@localhost apinto_dashboard]# docker compose up -d mysql cluster-redis
[+] Running 2/2
 ✔ Container mysql          Started                                                                                                                                                                                                    1.3s 
 ✔ Container cluster-redis  Started                                                                                                                                                                                                    2.1s 
[root@localhost apinto_dashboard]# docker compose exec mysql mysql -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@localhost apinto_dashboard]# docker compose exec mysql mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.34 MySQL Community Server (GPL)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use apinto;
mysql> SELECT * FROM `module_plugin_enable` WHERE name = 'ext-app' and is_enable = 2 LIMIT 1;
ERROR 1146 (42S02): Table 'apinto.module_plugin_enable' doesn't exist
mysql> show tables;
Empty set (0.01 sec)

mysql> exit
Bye
[root@localhost apinto_dashboard]# docker compose up -d 
[+] Running 4/4
 ✔ Container apinto-gateway    Started                                                                                                                                                                                                 1.3s 
 ✔ Container mysql             Running                                                                                                                                                                                                 0.0s 
 ✔ Container cluster-redis     Running                                                                                                                                                                                                 0.0s 
 ✔ Container apinto-dashboard  Started                                                                                                                                                                                                 1.2s 
[root@localhost apinto_dashboard]# docker compose logs
cluster-redis  | Starting 7201
cluster-redis  | /usr/local/bin/redis-server --port 7201 --cluster-enabled yes --cluster-node-timeout 2000 --cluster-config-file nodes-redis-7201.conf --appendonly yes --appendfilename appendonly-7201.aof --dbfilename dump-7201.rdb --logfile 7201.log --daemonize yes --requirepass 123456 --masterauth 123456 --maxmemory 1073741824
cluster-redis  | Starting 7202
cluster-redis  | /usr/local/bin/redis-server --port 7202 --cluster-enabled yes --cluster-node-timeout 2000 --cluster-config-file nodes-redis-7202.conf --appendonly yes --appendfilename appendonly-7202.aof --dbfilename dump-7202.rdb --logfile 7202.log --daemonize yes --requirepass 123456 --masterauth 123456 --maxmemory 1073741824
cluster-redis  | Starting 7203
cluster-redis  | /usr/local/bin/redis-server --port 7203 --cluster-enabled yes --cluster-node-timeout 2000 --cluster-config-file nodes-redis-7203.conf --appendonly yes --appendfilename appendonly-7203.aof --dbfilename dump-7203.rdb --logfile 7203.log --daemonize yes --requirepass 123456 --masterauth 123456 --maxmemory 1073741824
cluster-redis  | Starting 7204
cluster-redis     | /usr/local/bin/redis-server --port 7204 --cluster-enabled yes --cluster-node-timeout 2000 --cluster-config-file nodes-redis-7204.conf --appendonly yes --appendfilename appendonly-7204.aof --dbfilename dump-7204.rdb --logfile 7204.log --daemonize yes --requirepass 123456 --masterauth 123456 --maxmemory 1073741824
cluster-redis     | Starting 7205
cluster-redis     | /usr/local/bin/redis-server --port 7205 --cluster-enabled yes --cluster-node-timeout 2000 --cluster-config-file nodes-redis-7205.conf --appendonly yes --appendfilename appendonly-7205.aof --dbfilename dump-7205.rdb --logfile 7205.log --daemonize yes --requirepass 123456 --masterauth 123456 --maxmemory 1073741824
cluster-redis     | Starting 7206
cluster-redis     | /usr/local/bin/redis-server --port 7206 --cluster-enabled yes --cluster-node-timeout 2000 --cluster-config-file nodes-redis-7206.conf --appendonly yes --appendfilename appendonly-7206.aof --dbfilename dump-7206.rdb --logfile 7206.log --daemonize yes --requirepass 123456 --masterauth 123456 --maxmemory 1073741824
cluster-redis     | hosts: localhost:7201 localhost:7202 localhost:7203 localhost:7204 localhost:7205 localhost:7206
cluster-redis     | 集群已加入无需重复加入
mysql             | 2023-12-06 04:26:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.34-1debian10 started.
mysql             | 2023-12-06 04:26:08+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql             | 2023-12-06 04:26:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.34-1debian10 started.
mysql             | 2023-12-06 04:26:08+00:00 [Note] [Entrypoint]: Initializing database files
mysql             | 2023-12-06T04:26:08.729593Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql             | 2023-12-06T04:26:09.307557Z 0 [Warning] InnoDB: New log files created, LSN=45790
mysql             | 2023-12-06T04:26:09.391046Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
mysql             | 2023-12-06T04:26:09.415908Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 94927c23-93ef-11ee-8594-0242c0a82002.
mysql             | 2023-12-06T04:26:09.418985Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
mysql             | 2023-12-06T04:26:10.844122Z 0 [Warning] CA certificate ca.pem is self signed.
mysql             | 2023-12-06T04:26:10.999118Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mysql             | 2023-12-06 04:26:13+00:00 [Note] [Entrypoint]: Database files initialized
mysql             | 2023-12-06 04:26:13+00:00 [Note] [Entrypoint]: Starting temporary server
mysql             | 2023-12-06 04:26:13+00:00 [Note] [Entrypoint]: Waiting for server startup
mysql             | 2023-12-06T04:26:13.956442Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql             | 2023-12-06T04:26:13.958950Z 0 [Note] mysqld (mysqld 5.7.34) starting as process 79 ...
mysql             | 2023-12-06T04:26:13.964098Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql             | 2023-12-06T04:26:13.964264Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql             | 2023-12-06T04:26:13.964397Z 0 [Note] InnoDB: Uses event mutexes
mysql             | 2023-12-06T04:26:13.964523Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql             | 2023-12-06T04:26:13.964642Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql             | 2023-12-06T04:26:13.964791Z 0 [Note] InnoDB: Using Linux native AIO
mysql             | 2023-12-06T04:26:13.965323Z 0 [Note] InnoDB: Number of pools: 1
mysql             | 2023-12-06T04:26:13.965607Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql             | 2023-12-06T04:26:13.968981Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql             | 2023-12-06T04:26:13.981657Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql             | 2023-12-06T04:26:13.986720Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql             | 2023-12-06T04:26:13.999655Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql             | 2023-12-06T04:26:14.010091Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql             | 2023-12-06T04:26:14.010260Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql             | 2023-12-06T04:26:14.059352Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql             | 2023-12-06T04:26:14.060155Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql             | 2023-12-06T04:26:14.060175Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql             | 2023-12-06T04:26:14.061426Z 0 [Note] InnoDB: 5.7.34 started; log sequence number 2748019
mysql             | 2023-12-06T04:26:14.062941Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql             | 2023-12-06T04:26:14.064256Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql             | 2023-12-06T04:26:14.067889Z 0 [Note] InnoDB: Buffer pool(s) load completed at 231206  4:26:14
mysql             | 2023-12-06T04:26:14.069290Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql             | 2023-12-06T04:26:14.069310Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
mysql             | 2023-12-06T04:26:14.069984Z 0 [Warning] CA certificate ca.pem is self signed.
mysql             | 2023-12-06T04:26:14.070033Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
mysql             | 2023-12-06T04:26:14.071838Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql             | 2023-12-06T04:26:14.084419Z 0 [Note] Event Scheduler: Loaded 0 events
mysql             | 2023-12-06T04:26:14.084824Z 0 [Note] mysqld: ready for connections.
mysql             | Version: '5.7.34'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
mysql             | 2023-12-06 04:26:14+00:00 [Note] [Entrypoint]: Temporary server started.
mysql             | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql             | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mysql             | 2023-12-06T04:26:16.498296Z 4 [Note] Access denied for user 'root'@'localhost' (using password: YES)
mysql             | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql             | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
mysql             | 2023-12-06 04:26:17+00:00 [Note] [Entrypoint]: Creating database apinto
mysql             | 
mysql             | 2023-12-06 04:26:17+00:00 [Note] [Entrypoint]: Stopping temporary server
mysql             | 2023-12-06T04:26:17.495342Z 0 [Note] Giving 0 client threads a chance to die gracefully
mysql             | 2023-12-06T04:26:17.495383Z 0 [Note] Shutting down slave threads
mysql             | 2023-12-06T04:26:17.495390Z 0 [Note] Forcefully disconnecting 0 remaining clients
mysql             | 2023-12-06T04:26:17.495397Z 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql             | 2023-12-06T04:26:17.495461Z 0 [Note] Binlog end
mysql             | 2023-12-06T04:26:17.496209Z 0 [Note] Shutting down plugin 'ngram'
mysql             | 2023-12-06T04:26:17.496226Z 0 [Note] Shutting down plugin 'partition'
mysql             | 2023-12-06T04:26:17.496231Z 0 [Note] Shutting down plugin 'BLACKHOLE'
mysql             | 2023-12-06T04:26:17.496236Z 0 [Note] Shutting down plugin 'ARCHIVE'
mysql             | 2023-12-06T04:26:17.496239Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
mysql             | 2023-12-06T04:26:17.496273Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
mysql             | 2023-12-06T04:26:17.496278Z 0 [Note] Shutting down plugin 'MyISAM'
mysql             | 2023-12-06T04:26:17.496288Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
mysql             | 2023-12-06T04:26:17.496293Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
mysql             | 2023-12-06T04:26:17.496297Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
mysql             | 2023-12-06T04:26:17.496300Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
mysql             | 2023-12-06T04:26:17.496303Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
mysql             | 2023-12-06T04:26:17.496307Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
mysql             | 2023-12-06T04:26:17.496310Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
mysql             | 2023-12-06T04:26:17.496314Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
mysql             | 2023-12-06T04:26:17.496317Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
mysql             | 2023-12-06T04:26:17.496320Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
mysql             | 2023-12-06T04:26:17.496324Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
mysql             | 2023-12-06T04:26:17.496327Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
mysql             | 2023-12-06T04:26:17.496330Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
mysql             | 2023-12-06T04:26:17.496334Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
mysql             | 2023-12-06T04:26:17.496337Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
mysql             | 2023-12-06T04:26:17.496340Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
mysql             | 2023-12-06T04:26:17.496343Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
mysql             | 2023-12-06T04:26:17.496347Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
mysql             | 2023-12-06T04:26:17.496351Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
mysql             | 2023-12-06T04:26:17.496354Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
mysql             | 2023-12-06T04:26:17.496357Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
mysql             | 2023-12-06T04:26:17.496361Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
mysql             | 2023-12-06T04:26:17.496364Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
mysql             | 2023-12-06T04:26:17.496367Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
mysql             | 2023-12-06T04:26:17.496370Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
mysql             | 2023-12-06T04:26:17.496373Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
mysql             | 2023-12-06T04:26:17.496377Z 0 [Note] Shutting down plugin 'INNODB_CMP'
mysql             | 2023-12-06T04:26:17.496380Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
mysql             | 2023-12-06T04:26:17.496383Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
mysql             | 2023-12-06T04:26:17.496386Z 0 [Note] Shutting down plugin 'INNODB_TRX'
mysql             | 2023-12-06T04:26:17.496390Z 0 [Note] Shutting down plugin 'InnoDB'
mysql             | 2023-12-06T04:26:17.496554Z 0 [Note] InnoDB: FTS optimize thread exiting.
mysql             | 2023-12-06T04:26:17.496743Z 0 [Note] InnoDB: Starting shutdown...
mysql             | 2023-12-06T04:26:17.597105Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql             | 2023-12-06T04:26:17.597974Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 231206  4:26:17
mysql             | 2023-12-06T04:26:19.006413Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12665301
mysql             | 2023-12-06T04:26:19.007869Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql             | 2023-12-06T04:26:19.007898Z 0 [Note] Shutting down plugin 'MEMORY'
mysql             | 2023-12-06T04:26:19.007906Z 0 [Note] Shutting down plugin 'CSV'
mysql             | 2023-12-06T04:26:19.007912Z 0 [Note] Shutting down plugin 'sha256_password'
mysql             | 2023-12-06T04:26:19.007916Z 0 [Note] Shutting down plugin 'mysql_native_password'
mysql             | 2023-12-06T04:26:19.008057Z 0 [Note] Shutting down plugin 'binlog'
mysql             | 2023-12-06T04:26:19.008729Z 0 [Note] mysqld: Shutdown complete
mysql             | 
mysql             | 2023-12-06 04:26:19+00:00 [Note] [Entrypoint]: Temporary server stopped
mysql             | 
mysql             | 2023-12-06 04:26:19+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
mysql             | 
mysql             | 2023-12-06T04:26:19.684570Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql             | 2023-12-06T04:26:19.686051Z 0 [Note] mysqld (mysqld 5.7.34) starting as process 1 ...
mysql             | 2023-12-06T04:26:19.690539Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql             | 2023-12-06T04:26:19.690591Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql             | 2023-12-06T04:26:19.690604Z 0 [Note] InnoDB: Uses event mutexes
mysql             | 2023-12-06T04:26:19.690614Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql             | 2023-12-06T04:26:19.690645Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql             | 2023-12-06T04:26:19.690658Z 0 [Note] InnoDB: Using Linux native AIO
mysql             | 2023-12-06T04:26:19.691117Z 0 [Note] InnoDB: Number of pools: 1
mysql             | 2023-12-06T04:26:19.691338Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql             | 2023-12-06T04:26:19.694392Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql             | 2023-12-06T04:26:19.705235Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql             | 2023-12-06T04:26:19.709183Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql             | 2023-12-06T04:26:19.722072Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql             | 2023-12-06T04:26:19.731830Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql             | 2023-12-06T04:26:19.732001Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql             | 2023-12-06T04:26:19.783099Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql             | 2023-12-06T04:26:19.783948Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql             | 2023-12-06T04:26:19.783967Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql             | 2023-12-06T04:26:19.785124Z 0 [Note] InnoDB: Waiting for purge to start
mysql             | 2023-12-06T04:26:19.835426Z 0 [Note] InnoDB: 5.7.34 started; log sequence number 12665301
mysql             | 2023-12-06T04:26:19.836376Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql             | 2023-12-06T04:26:19.836712Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql             | 2023-12-06T04:26:19.841282Z 0 [Note] InnoDB: Buffer pool(s) load completed at 231206  4:26:19
mysql             | 2023-12-06T04:26:19.844869Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql             | 2023-12-06T04:26:19.844891Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
mysql             | 2023-12-06T04:26:19.845620Z 0 [Warning] CA certificate ca.pem is self signed.
mysql             | 2023-12-06T04:26:19.845759Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
mysql             | 2023-12-06T04:26:19.846455Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql             | 2023-12-06T04:26:19.846509Z 0 [Note] IPv6 is available.
mysql             | 2023-12-06T04:26:19.846560Z 0 [Note]   - '::' resolves to '::';
mysql             | 2023-12-06T04:26:19.846600Z 0 [Note] Server socket created on IP: '::'.
mysql             | 2023-12-06T04:26:19.854006Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql             | 2023-12-06T04:26:19.867511Z 0 [Note] Event Scheduler: Loaded 0 events
mysql             | 2023-12-06T04:26:19.868084Z 0 [Note] mysqld: ready for connections.
mysql             | Version: '5.7.34'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
apinto-dashboard  | mysql:
apinto-dashboard  |   user_name: root
apinto-dashboard  |   password: 123456
apinto-dashboard  |   ip: mysql
apinto-dashboard  |   port: 3306
apinto-dashboard  |   db: apinto
apinto-dashboard  | redis:
apinto-dashboard  |   user_name: 
apinto-dashboard  |   password: 123456
apinto-dashboard  |   addr: 
apinto-dashboard  |     - cluster-redis:7201
apinto-dashboard  |     - cluster-redis:7202
apinto-dashboard  |     - cluster-redis:7203
apinto-dashboard  |     - cluster-redis:7204
apinto-dashboard  |     - cluster-redis:7205
apinto-dashboard  |     - cluster-redis:7206
apinto-dashboard  | port: 8080
apinto-dashboard  | error_log:
apinto-dashboard  |   dir: /apinto-dashboard/work/logs
apinto-dashboard  |   file_name: error.log
apinto-dashboard  |   log_level: info
apinto-dashboard  |   log_expire: 7d
apinto-dashboard  |   log_period: day
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:18 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.951ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'api' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:18] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:18 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.604ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'apispace' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:18] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:18 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.683ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'app' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:18] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:19 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.817ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'audit-log' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:19] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:19 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [1.498ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'cluster' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:19] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:19 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.716ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'discovery' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:19] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:19 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.522ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'email' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:20] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:20 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.906ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'ext-app' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:20] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:20 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.509ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'log' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:20] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:20 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.711ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'module-plugin' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:20] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:21 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.603ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'open_api' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:21] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:21 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.702ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'plugin' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:21] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:21 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.565ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'plugin-template' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:21] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:21 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.682ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'cache' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:22] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:22 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.629ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'fuse' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:22] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:22 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.655ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'grey' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:22] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:22 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.619ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'traffic' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:22] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:23 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.681ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'visit' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:23] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 14:12:23 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 record not found
apinto-dashboard  | [0.589ms] [rows:0] SELECT * FROM `module_plugin_enable` WHERE name = 'upstream' and is_enable = 2 LIMIT 1
apinto-dashboard  | [2023-12-06 14:12:23] [ERRO] set module config version:CLUSTERDOWN Hash slot not served
[root@localhost apinto_dashboard]# docker compose exec mysql mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.34 MySQL Community Server (GPL)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use apinto;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT * FROM `module_plugin_enable` WHERE name = 'api' and is_enable = 2 LIMIT 1;
+----+------+----------------+-----------+------------+------------------------------------------------------+----------+---------------------+
| id | name | navigation     | is_enable | frontend   | config                                               | operator | update_time         |
+----+------+----------------+-----------+------------+------------------------------------------------------+----------+---------------------+
|  1 | api  | navigation.api |         2 | router/api | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:18 |
+----+------+----------------+-----------+------------+------------------------------------------------------+----------+---------------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM `module_plugin_enable`;
+----+-----------------+---------------------------+-----------+-------------------------+------------------------------------------------------+----------+---------------------+
| id | name            | navigation                | is_enable | frontend                | config                                               | operator | update_time         |
+----+-----------------+---------------------------+-----------+-------------------------+------------------------------------------------------+----------+---------------------+
|  1 | api             | navigation.api            |         2 | router/api              | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:18 |
|  2 | apispace        | navigation.api_market     |         2 | remote/apispace         | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:18 |
|  3 | app             | navigation.application    |         2 | application             | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:19 |
|  4 | audit-log       | navigation.system         |         2 | audit-log               | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:19 |
|  5 | cluster         | navigation.infrastructure |         2 | deploy/cluster          | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:19 |
|  6 | discovery       | navigation.infrastructure |         2 | template/discovery      | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:20 |
|  7 | email           | navigation.system         |         2 | system/email            | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:20 |
|  8 | ext-app         | navigation.system         |         2 | system/ext-app          | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:20 |
|  9 | log             | navigation.system         |         2 | /log                    | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:21 |
| 10 | module-plugin   | navigation.module_plugin  |         2 | module-plugin           | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:21 |
| 11 | open_api        |                           |         2 |                         | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:21 |
| 12 | plugin          | navigation.infrastructure |         2 | deploy/plugin           | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:21 |
| 13 | plugin-template | navigation.public_config  |         2 | router/plugin-template  | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:22 |
| 14 | cache           | navigation.strategy       |         2 | serv-governance/cache   | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:22 |
| 15 | fuse            | navigation.strategy       |         2 | serv-governance/fuse    | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:22 |
| 16 | grey            | navigation.strategy       |         2 | serv-governance/grey    | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:23 |
| 17 | traffic         | navigation.strategy       |         2 | serv-governance/traffic | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:23 |
| 18 | visit           | navigation.strategy       |         2 | serv-governance/visit   | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:23 |
| 19 | upstream        | navigation.upstream       |         2 | template/upstream       | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:24 |
| 20 | variable        | navigation.infrastructure |         2 | deploy/variable         | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:24 |
| 21 | webhook         | navigation.system         |         2 | system/webhook          | {"server":"","header":[],"query":[],"initialize":[]} |        0 | 2023-12-06 14:12:24 |
+----+-----------------+---------------------------+-----------+-------------------------+------------------------------------------------------+----------+---------------------+
21 rows in set (0.00 sec)

mysql> exit
Bye
[root@localhost apinto_dashboard]#

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

The problem here is caused by Redis, which failed to establish the cluster. It may be due to an issue with the Host set by Redis.
image

The local area network IP of the host should be filled in here.
image

After you complete the modifications, follow the steps below to proceed

  1. Delete Redis mounting directory
rm - rf ./redis-cluster/data
  1. Restart the Docker container
docker-compose down

docker-compose up - d

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

@Dot-Liu Thanks, I also noticed that error CLUSTERDOWN Hash slot not served is related to cluster of redis, see also https://cloud.tencent.com/developer/article/1919678. And I tested with HOST=localhost and HOST=cluster-redis, neither of them worked.

I have to hard-coded the actual IP of HOST, But the IP of cluster-redis is allocated when the container started. This is a circular loop problem.

And I also have to manually fix the redis cluster problems via use cluster meet 192.168.32.3 720x and redis-cli --pass 123456 --cluster fix 192.168.32.3:7201.

If the HOST accepts hostname, then it would work for HOST=cluster-redis.

  cluster-redis:
    container_name: cluster-redis
    image: eolinker/cluster-redis:6.2.7
    hostname: cluster-redis
    privileged: true
    restart: always
    networks:
      - apinto
    ports:
      - 7201
      - 7202
      - 7203
      - 7204
      - 7205
      - 7206
    environment:
      - REDIS_PWD=123456
      - PORT=7201
      # - HOST=localhost
      # - HOST=cluster-redis
      - HOST=192.168.32.3
    volumes: 
      - ./redis-cluster/data:/usr/local/cluster_redis/data
[root@localhost apinto_dashboard]# # update HOST=192.168.32.3 in compose.yml
[root@localhost apinto_dashboard]# docker compose logs -f
...... 
apinto-dashboard  | [2023-12-06 15:42:00] [WARN] lockKey=updateExtender_1701848520 error=dial tcp :7201: connect: connection refused
apinto-dashboard  | [2023-12-06 15:42:02] [ERRO] get module config version:dial tcp :7201: connect: connection refused
apinto-dashboard  | [2023-12-06 15:42:12] [ERRO] get module config version:dial tcp :7201: connect: connection refused
apinto-dashboard  | [2023-12-06 15:42:22] [ERRO] get module config version:dial tcp :7201: connect: connection refused
apinto-dashboard  | [2023-12-06 15:42:32] [ERRO] get module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | [2023-12-06 15:42:42] [ERRO] get module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | mysql:
apinto-dashboard  |   user_name: root
apinto-dashboard  |   password: 123456
apinto-dashboard  |   addr: 
apinto-dashboard  |     - cluster-redis:7201
apinto-dashboard  |     - cluster-redis:7202
apinto-dashboard  |     - cluster-redis:7203
apinto-dashboard  |     - cluster-redis:7204
apinto-dashboard  |     - cluster-redis:7205
apinto-dashboard  |     - cluster-redis:7206
apinto-dashboard  | port: 8080
apinto-dashboard  | error_log:
apinto-dashboard  |   dir: /apinto-dashboard/work/logs
apinto-dashboard  |   file_name: error.log
apinto-dashboard  |   log_level: info
apinto-dashboard  |   log_expire: 7d
apinto-dashboard  |   log_period: day
apinto-dashboard  | 
apinto-dashboard  | 2023/12/06 15:42:52 /home/runner/go/pkg/mod/gorm.io/[email protected]/callbacks.go:134 Error 1062: Duplicate entry '1' for key 'PRIMARY'
apinto-dashboard  | [1.024ms] [rows:0] INSERT INTO `namespace` (`name`,`create_time`,`id`) VALUES ('default','2023-12-06 15:42:52.51',1)
apinto-dashboard  | [2023-12-06 15:42:53] [ERRO] get module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | [2023-12-06 15:42:53] [WARN] lockKey=updateExtender_1701848573 error=CLUSTERDOWN The cluster is down
apinto-dashboard  | [2023-12-06 15:43:00] [WARN] lockKey=updateExtender_1701848580 error=CLUSTERDOWN The cluster is down
apinto-dashboard  | [2023-12-06 15:43:03] [ERRO] get module config version:dial tcp :7201: connect: connection refused
apinto-dashboard  | [2023-12-06 15:43:13] [ERRO] get module config version:CLUSTERDOWN Hash slot not served
apinto-dashboard  | [2023-12-06 15:43:22] [ERRO] get module config version:CLUSTERDOWN Hash slot not served
^Ccanceled
[root@localhost apinto_dashboard]# docker compose exec cluster-redis bash
root@cluster-redis:/usr/local/cluster_redis# redis-cli -p 7201 --pass 123456
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:7201> cluster info
cluster_state:fail
cluster_slots_assigned:5461
cluster_slots_ok:5461
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:1
cluster_size:1
cluster_current_epoch:1
cluster_my_epoch:1
cluster_stats_messages_sent:0
cluster_stats_messages_received:0
127.0.0.1:7201> cluster nodes
384bb4c7b27be5220e980e9b61ee1d75aed418bd :7201@17201 myself,master - 0 0 1 connected 0-5460
127.0.0.1:7201> cluster meet 192.168.32.3 7202
OK
127.0.0.1:7201> cluster meet 192.168.32.3 7203
OK
127.0.0.1:7201> cluster meet 192.168.32.3 7204
OK
127.0.0.1:7201> cluster meet 192.168.32.3 7205
OK
127.0.0.1:7201> cluster meet 192.168.32.3 7206
OK
127.0.0.1:7201> cluster nodes
384bb4c7b27be5220e980e9b61ee1d75aed418bd 192.168.32.3:7201@17201 myself,master - 0 1701848690000 1 connected 0-5460
178476419653061454ca8815c00ae7cdf574002b 192.168.32.3:7206@17206 master - 0 1701848691356 6 connected
0b4b3523ca3b650421a33df8c6f260712303513f 192.168.32.3:7202@17202 master - 0 1701848691356 2 connected 5461-10922
4958b4669968a4d2f982f4161fdc18fee4aa87e5 192.168.32.3:7205@17205 master - 0 1701848691054 5 connected
add4c8260772281a31941dae3f9da56fdb1c0118 192.168.32.3:7203@17203 master - 0 1701848691356 3 connected 10923-16383
36ac51c5229d974b6de31644c1cce612d5ac8871 192.168.32.3:7204@17204 master - 0 1701848691255 4 connected
127.0.0.1:7201> cluster info
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_ping_sent:80
cluster_stats_messages_pong_sent:85
cluster_stats_messages_meet_sent:6
cluster_stats_messages_sent:171
cluster_stats_messages_ping_received:85
cluster_stats_messages_pong_received:86
cluster_stats_messages_received:171
127.0.0.1:7201> set test test
(error) MOVED 6918 192.168.32.3:7202
127.0.0.1:7201> exit
root@cluster-redis:/usr/local/cluster_redis# exit
exit
[root@localhost apinto_dashboard]# 
[root@localhost apinto_dashboard]# docker compose restart apinto-dashboard
[root@localhost apinto_dashboard]# docker compose logs -f # The CLUSTERDOWN Hash slot not served error disappeared now!

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

Except for the Host configuration of Redis, it is not recommended to change the default configuration in the docker-compose.yml file unless you understand its meaning.

All other configurations are set by default.

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

I am new to apinto, and from docs https://help.eolink.com/tutorial/Apinto/c-1406, it seems eolinker/apinto-gateway is not necessary for the apinto-dashboard, does it means eolinker/apinto-dashboard is included eolinker/apinto-gateway already?

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

image

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

The apinto-gateway needs to be deployed separately. We suggest deploying it on two servers to avoid resource contention and performance degradation.

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

The apinto-gateway needs to be deployed separately. We suggest deploying it on two servers to avoid resource contention and performance degradation.

Then how to connect apinto-gateway and apinto-dashboard? Is there a fully functional docker-compose.yml for all the services in one with only expose necessary ports of apinto.

There are some limitation or shortcomings for the example docker-compose.yml on https://help.eolink.com/tutorial/Apinto/c-1406 IMO.

  • the REDIS_ADDR is hard-coded, and is known after the cluster-redis container started.
  • the network mode of cluster-redis is host, and the HOST need to hard-coded.
  • apinto-gateway service is not involved, need to started separated.

And I also noticed the image of redis cluster is named eolinker/cluster-redis which means it's built by eolinker, maybe the HOST environment could accept hostname. If the name changed to eolinker/redis-cluster, it would be more fine and readable.

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

You can refer to this tutorial: https://help.eolink.com/tutorial/Apinto/c-1365.
For containers launched by the Docker container, cluster-redis cannot be used as an alias to access the Redis container's network for the following reasons:

  1. The alias for the Redis container in the configuration is redis_cluster is not a cluster-redis

  2. The redis container and apinto-dashboard container are not in the same network segment and cannot be directly accessed using aliases.

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

I found the cluster-announce-ip configuration for redis cluster now supports hostname, see also redis/redis#2186 (comment), redis/redis#12508, redis/redis#9530.

Update eolinker/cluster-redis to use redis 7 maybe a good solution for using default docker network instead of HOST mode.

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

This requires the Redis version to be 7. x, and we have not conducted compatibility testing on the 7. x version of Redis yet, so it should not work now.

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

@Dot-Liu Hi, I build a redis-cluster image which support hostname as cluster-announce-ip configuration. But when I tried to integrated with apinto-dashboard, I got "ClusterClient.Ping().Result() error: got 4 elements in cluster info address, expected 2 or 3", see redis/go-redis#2085.

Could you update the go-redis?

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

I have reviewed the issue you mentioned and it is indeed a good suggestion, but we need to take some time to verify and avoid compatibility issues with old users due to upgrades. This will take some time, and we will schedule a replacement. Thank you for your suggestion.

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

This requires the Redis version to be 7. x, and we have not conducted compatibility testing on the 7. x version of Redis yet, so it should not work now.

Hi, it's about 2 years of redis 7 release. Could we update apinto/apinto-dashboard to support redis 7 which is compatible backward with old redis like 5.x or 6.x.

It should be easy and not a lot of changes.

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

Okay, we will process and verify it within this week. If there are no issues, we will deploy the tutorial together this week.

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

The issue has been resolved, please update to version v3.3.3
The tutorial is also updated synchronously. For details, please refer to: https://help.eolink.com/tutorial/Apinto/c-1406#tip2
@liudonghua123

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

@Dot-Liu Thanks, I tried the following docker-compose.yml and config.yml. And it seems ok, except sometimes the apinto-dashboard logged out unexpected and I have to re-login. I need to do more deep analysis.

docker-compose.yml:

version: '3'
services:
  apinto-gateway:
    image: eolinker/apinto-gateway:latest
    tty: true
    privileged: true
    restart: unless-stopped
    ports:
      - 8099:8099
      - 9400:9400
      - 9401:9401
    volumes:
      - ./data:/var/lib/apinto
      - ./log:/var/log/apinto
      - ./config.yml:/etc/apinto/config.yml
  apinto-dashboard:
    image: eolinker/apinto-dashboard:latest
    privileged: true
    restart: unless-stopped
    ports:
      - "38080:8080"
    depends_on:
      - mysql
      - redis_cluster
    environment:
      - MYSQL_USER_NAME=root
      - MYSQL_PWD=123456
      - MYSQL_IP=apinto_mysql
      - MYSQL_PORT=3306
      - MYSQL_DB="apinto"
      - ERROR_DIR=/apinto-dashboard/work/logs
      - ERROR_FILE_NAME=error.log
      - ERROR_LOG_LEVEL=info
      - ERROR_EXPIRE=7d
      - ERROR_PERIOD=day
      - REDIS_ADDR=redis_cluster:7201,redis_cluster:7202,redis_cluster:7203,redis_cluster:7204,redis_cluster:7205,redis_cluster:7206
      - REDIS_PWD=123456
    volumes:
      - ./work:/apinto-dashboard/work
  mysql:
    image: mysql:5.7.34
    privileged: true
    restart: unless-stopped
    container_name: apinto_mysql
    hostname: apinto_mysql
    command:
      - "--character-set-server=utf8mb4"
      - "--collation-server=utf8mb4_unicode_ci"
    ports:
      - "3306"
    environment:
      - MYSQL_ROOT_PASSWORD=123456
      - MYSQL_DATABASE=apinto
    volumes:
      - ./mysql:/var/lib/mysql
  redis_cluster:
    image: eolinker/cluster-redis:7.2.4
    hostname: redis_cluster
    privileged: true
    restart: unless-stopped
    container_name: redis_cluster
    ports:
      - 7201-7206
      - 17201-17206
    environment:
      - REDIS_PWD=123456
      - PORT=7201
      - HOST=redis_cluster
    volumes: 
      - ./redis:/usr/local/cluster_redis/data

config.yml

version: 2

client:
  advertise_urls: 
    - http://apinto-gateway:9400
  listen_urls: 
    - http://0.0.0.0:9400
gateway:
  advertise_urls: 
    - http://apinto-gateway:8099
  listen_urls: 
    - http://0.0.0.0:8099
peer: 
  listen_urls: 
    - http://0.0.0.0:9401
  advertise_urls: 
    - http://apinto-gateway:9401

from apinto-dashboard.

liudonghua123 avatar liudonghua123 commented on June 12, 2024

@Dot-Liu Thanks, I tried the following docker-compose.yml and config.yml. And it seems ok, except sometimes the apinto-dashboard logged out unexpected and I have to re-login. I need to do more deep analysis.

docker-compose.yml:

version: '3'
services:
  apinto-gateway:
    image: eolinker/apinto-gateway:latest
    tty: true
    privileged: true
    restart: unless-stopped
    ports:
      - 8099:8099
      - 9400:9400
      - 9401:9401
    volumes:
      - ./data:/var/lib/apinto
      - ./log:/var/log/apinto
      - ./config.yml:/etc/apinto/config.yml
  apinto-dashboard:
    image: eolinker/apinto-dashboard:latest
    privileged: true
    restart: unless-stopped
    ports:
      - "38080:8080"
    depends_on:
      - mysql
      - redis_cluster
    environment:
      - MYSQL_USER_NAME=root
      - MYSQL_PWD=123456
      - MYSQL_IP=apinto_mysql
      - MYSQL_PORT=3306
      - MYSQL_DB="apinto"
      - ERROR_DIR=/apinto-dashboard/work/logs
      - ERROR_FILE_NAME=error.log
      - ERROR_LOG_LEVEL=info
      - ERROR_EXPIRE=7d
      - ERROR_PERIOD=day
      - REDIS_ADDR=redis_cluster:7201,redis_cluster:7202,redis_cluster:7203,redis_cluster:7204,redis_cluster:7205,redis_cluster:7206
      - REDIS_PWD=123456
    volumes:
      - ./work:/apinto-dashboard/work
  mysql:
    image: mysql:5.7.34
    privileged: true
    restart: unless-stopped
    container_name: apinto_mysql
    hostname: apinto_mysql
    command:
      - "--character-set-server=utf8mb4"
      - "--collation-server=utf8mb4_unicode_ci"
    ports:
      - "3306"
    environment:
      - MYSQL_ROOT_PASSWORD=123456
      - MYSQL_DATABASE=apinto
    volumes:
      - ./mysql:/var/lib/mysql
  redis_cluster:
    image: eolinker/cluster-redis:7.2.4
    hostname: redis_cluster
    privileged: true
    restart: unless-stopped
    container_name: redis_cluster
    ports:
      - 7201-7206
      - 17201-17206
    environment:
      - REDIS_PWD=123456
      - PORT=7201
      - HOST=redis_cluster
    volumes: 
      - ./redis:/usr/local/cluster_redis/data

config.yml

version: 2

client:
  advertise_urls: 
    - http://apinto-gateway:9400
  listen_urls: 
    - http://0.0.0.0:9400
gateway:
  advertise_urls: 
    - http://apinto-gateway:8099
  listen_urls: 
    - http://0.0.0.0:8099
peer: 
  listen_urls: 
    - http://0.0.0.0:9401
  advertise_urls: 
    - http://apinto-gateway:9401

I found the privileged: true is not needed for all the services and tty: true is required for eolinker/apinto-gateway due to the cmd of the image is CMD ["/bin/sh" "-c" "sh start.sh"] which is different to CMD ["/bin/sh" "-c" "./docker_run.sh"] of eolinker/apinto-dashboard.

If I changed the cmd using entrypoint: ["/bin/sh", "-c", "./start.sh"], then tty: true is not needed.

Use the default cmd/entrypoint without tty: true will failed to start apinto-gateway.

[root@localhost apinto]# docker compose up apinto-gateway
[+] Running 2/1
 ✔ Network apinto_default             Created                                                                                                                                                                                          0.4s 
 ✔ Container apinto-apinto-gateway-1  Created                                                                                                                                                                                          0.1s 
Attaching to apinto-gateway-1
apinto-gateway-1 exited with code 0
[root@localhost apinto]#

Then the final docker-compose.yml file I used is the following.

docker-compose.yml
version: '3'
services:
  apinto-gateway:
    image: eolinker/apinto-gateway:latest
    # tty: true
    restart: unless-stopped
    ports:
      - 8099:8099
      - 9400:9400
      - 9401:9401
    volumes:
      - ./data:/var/lib/apinto
      - ./log:/var/log/apinto
      - ./config.yml:/etc/apinto/config.yml
    entrypoint: ["/bin/sh", "-c", "./start.sh"]
  apinto-dashboard:
    image: eolinker/apinto-dashboard:latest
    restart: unless-stopped
    ports:
      - "38080:8080"
    depends_on:
      - mysql
      - redis_cluster
    environment:
      - MYSQL_USER_NAME=root
      - MYSQL_PWD=123456
      - MYSQL_IP=mysql
      - MYSQL_PORT=3306
      - MYSQL_DB="apinto"
      - ERROR_DIR=/apinto-dashboard/work/logs
      - ERROR_FILE_NAME=error.log
      - ERROR_LOG_LEVEL=info
      - ERROR_EXPIRE=7d
      - ERROR_PERIOD=day
      - REDIS_ADDR=redis_cluster:7201,redis_cluster:7202,redis_cluster:7203,redis_cluster:7204,redis_cluster:7205,redis_cluster:7206
      - REDIS_PWD=123456
    volumes:
      - ./work:/apinto-dashboard/work
  mysql:
    image: mysql:5.7.34
    restart: unless-stopped
    command:
      - "--character-set-server=utf8mb4"
      - "--collation-server=utf8mb4_unicode_ci"
    ports:
      - "3306"
    environment:
      - MYSQL_ROOT_PASSWORD=123456
      - MYSQL_DATABASE=apinto
    volumes:
      - ./mysql:/var/lib/mysql
  redis_cluster:
    image: eolinker/cluster-redis:7.2.4
    restart: unless-stopped
    ports:
      - 7201-7206
      - 17201-17206
    environment:
      - REDIS_PWD=123456
      - PORT=7201
      - HOST=redis_cluster
    volumes: 
      - ./redis:/usr/local/cluster_redis/data

from apinto-dashboard.

Dot-Liu avatar Dot-Liu commented on June 12, 2024

Yes, versions of Apintos above 0.15 require the addition of ./start.sh, I have updated the tutorial. Thank you for your feedback

from apinto-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.