APIPark icon indicating copy to clipboard operation
APIPark copied to clipboard

bug: can not log in after restart

Open Xiguaalex opened this issue 8 months ago โ€ข 10 comments

Current Behavior

After installed successfully, I can login the dashboard. But after restart the computer, it always login failed. My system is Ubuntu24.04. And this is the log from terminal: ? Question: Please select the program you want to install: โžœ Point: 1. APIPark Dashboard and Node (API Gateway) โžœ Point: 2. Only APIPark Dashboard โžœ Point: 3. Only APIPark Node (API Gateway) 1 ? Question: Container apipark-mysql already exists. Do you want to reinstall container? (yes/no) NO ? Question: Container apipark-mysql already exists. Do you want to reinstall container? (yes/no) NO ? Question: Container apipark-mysql already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ? Question: Container apipark-redis already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ? Question: Container apipark-influxdb already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ? Question: Container apipark-loki already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ? Question: Container apipark-grafana already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ? Question: Container apipark-nsq already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ? Question: Container apipark already exists. Do you want to reinstall container? (yes/no) no

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ„น Info: Updating apipark openapi address... โ„น Info: curl -s -i -H "Content-Type: application/json" -d "{"name":"admin","password":"ooD7Yoh4"}" http://192.168.3.34:18288/api/v1/account/login/username quick-start.sh: line 1185: [: : integer expression expected โœ˜ Error: login failed:

Expected Behavior

No response

Error Logs

2025-05-06 09:28:43+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.37-1.el9 started. 2025-05-06 09:28:43+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-05-06 09:28:43+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.37-1.el9 started. 2025-05-06 09:28:44+08:00 [Note] [Entrypoint]: Initializing database files 2025-05-06T01:28:44.138659Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-05-06T01:28:44.138746Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.37) initializing of server in progress as process 87 2025-05-06T01:28:44.145702Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-05-06T01:28:44.677984Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-05-06T01:28:46.602123Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2025-05-06 09:28:49+08:00 [Note] [Entrypoint]: Database files initialized 2025-05-06 09:28:49+08:00 [Note] [Entrypoint]: Starting temporary server mysqld will log errors to /var/lib/mysql/49ce7113b05f.err mysqld is running as pid 145 2025-05-06 09:28:50+08:00 [Note] [Entrypoint]: Temporary server started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' 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/leapseconds' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' 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. 2025-05-06 09:28:50+08:00 [Note] [Entrypoint]: Creating database apipark

2025-05-06 09:28:50+08:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/start.sh

2025-05-06 09:28:50+08:00 [Note] [Entrypoint]: Stopping temporary server 2025-05-06 09:28:53+08:00 [Note] [Entrypoint]: Temporary server stopped

2025-05-06 09:28:53+08:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2025-05-06T01:28:53.272057Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-05-06T01:28:53.273707Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.37) starting as process 1 2025-05-06T01:28:53.281436Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-05-06T01:28:53.419573Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-05-06T01:28:53.597779Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-05-06T01:28:53.597809Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-05-06T01:28:53.601441Z 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. 2025-05-06T01:28:53.614600Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.37' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. 2025-05-06T01:28:53.614678Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2025-05-06T01:31:27.837219Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.0.37). 2025-05-06T01:31:29.034092Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.37) MySQL Community Server - GPL. 2025-05-06 09:32:33+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.37-1.el9 started. 2025-05-06 09:32:34+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-05-06 09:32:34+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.37-1.el9 started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' 2025-05-06T01:32:34.493614Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-05-06T01:32:34.496237Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.37) starting as process 1 2025-05-06T01:32:34.512789Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-05-06T01:32:34.809470Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-05-06T01:32:35.109070Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-05-06T01:32:35.109103Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-05-06T01:32:35.116154Z 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. 2025-05-06T01:32:35.148895Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.37' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. 2025-05-06T01:32:35.148975Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

Steps to Reproduce

No response

Environment

  • ApiPark version:v1.7.2-beta
  • Operating system (run uname -a): 6.11.0-24-generic #24~24.04.1-Ubuntu

Xiguaalex avatar May 06 '25 01:05 Xiguaalex

Okay, let's investigate quick-start.sh to see if the issue exists You can start the container directly through Docker start first. First, to obtain the container list,you can execute a command:

docker ps

then execute

docker start <container name>

Dot-Liu avatar May 06 '25 02:05 Dot-Liu

Okay, let's investigate quick-start.sh to see if the issue exists You can start the container directly through Docker start first. First, to obtain the container list,you can execute a command:

docker ps

then execute

docker start <container name>

I start all the containers, docker start apipark-apinto docker start apipark-nsq docker start apipark-grafana docker start apipark-loki docker start apipark-influxdb docker start apipark-redis docker start apipark-mysql, but when visiting http://127.0.0.1:18288, the page still shows 'The connection was reset'

Xiguaalex avatar May 06 '25 02:05 Xiguaalex

You also need to start the apipark container

docker start apipark

Dot-Liu avatar May 06 '25 02:05 Dot-Liu

You also need to start the apipark container

docker start apipark

thanks, but after running docker start apipark, the error still exists. I can visit the dashboard only by reinstalling all the containers...

Xiguaalex avatar May 06 '25 03:05 Xiguaalex

May I ask what is the version number of apipark you originally installed?

Dot-Liu avatar May 06 '25 03:05 Dot-Liu

May I ask what is the version number of apipark you originally installed?

v1.7.2-beta I installed by quick-start.sh

Xiguaalex avatar May 06 '25 03:05 Xiguaalex

May I ask what is the version number of apipark you originally installed?

v1.7.2-beta I installed by quick-start.sh

And when installing mysql container, there is the error:โณ Waiting: Waiting for MySQL to start... mysqladmin: [Warning] Using a password on the command line interface can be insecure. mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' but mysql container still installed successfully. Will this leads to the bug? and how to fix it.

Xiguaalex avatar May 06 '25 05:05 Xiguaalex

Sorry, we couldn't reproduce it You can try uninstalling Apipark first and then reinstalling it.

Image

Dot-Liu avatar May 06 '25 06:05 Dot-Liu

Image The issue has been reproduced and we will handle it immediately.

Dot-Liu avatar May 07 '25 02:05 Dot-Liu

The issue has been fixed and quick-start.sh has been modified.

Dot-Liu avatar May 07 '25 05:05 Dot-Liu