sfx101 / deck

DECK is a powerful and high performant local web development studio, an open source alternative to Docker desktop
https://github.com/deck-app
GNU Affero General Public License v3.0
1.51k stars 71 forks source link

Cannot connect to database server #130

Closed Vandaahl closed 1 year ago

Vandaahl commented 1 year ago

I'm on a new MacBook Pro (2023) with macOS Ventura 13.2.1. I installed only 1 app and that is Deck. Installation went fine. I'm trying the LAMP and LEMP stacks from the marketplace. The projects will start and I can visit the secure *.stacks.run domain as long as the page I visit is a static HTML or PHP file. However, as soon as the page tries to connect to a database, it times out. When I open the build-in phpmyadmin, enter the correct details and press the Log In button, after about a minute of loading it shows the errors:

"Cannot log in to the MySQL server" "mysqli::real_connect(): Error while reading greeting packet. PID=27" "mysqli::real_connect(): (HY000/2006): MySQL server has gone away"

The Mariadb log is as follows:


lamp-mariadb-1  | 2023-03-01 19:29:55+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.12+maria~ubu2004 started.
lamp-mariadb-1  | 2023-03-01 19:29:55+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
lamp-mariadb-1  | 2023-03-01 19:29:55+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.12+maria~ubu2004 started.
lamp-mariadb-1  | 2023-03-01 19:29:55+00:00 [Note] [Entrypoint]: Initializing database files
lamp-mariadb-1  | 
lamp-mariadb-1  | 
lamp-mariadb-1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
lamp-mariadb-1  | To do so, start the server, then issue the following command:
lamp-mariadb-1  | 
lamp-mariadb-1  | '/usr/bin/mariadb-secure-installation'
lamp-mariadb-1  | 
lamp-mariadb-1  | which will also give you the option of removing the test
lamp-mariadb-1  | databases and anonymous user created by default.  This is
lamp-mariadb-1  | strongly recommended for production servers.
lamp-mariadb-1  | 
lamp-mariadb-1  | See the MariaDB Knowledgebase at https://mariadb.com/kb
lamp-mariadb-1  | 
lamp-mariadb-1  | Please report any problems at https://mariadb.org/jira
lamp-mariadb-1  | 
lamp-mariadb-1  | The latest information about MariaDB is available at https://mariadb.org/.
lamp-mariadb-1  | 
lamp-mariadb-1  | Consider joining MariaDB's strong and vibrant community:
lamp-mariadb-1  | https://mariadb.org/get-involved/
lamp-mariadb-1  | 
lamp-mariadb-1  | 2023-03-01 19:29:56+00:00 [Note] [Entrypoint]: Database files initialized
lamp-mariadb-1  | 2023-03-01 19:29:56+00:00 [Note] [Entrypoint]: Starting temporary server
lamp-mariadb-1  | 2023-03-01 19:29:56+00:00 [Note] [Entrypoint]: Waiting for server startup
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] Starting MariaDB 10.6.12-MariaDB-1:10.6.12+maria~ubu2004 source revision 4c79e15cc3716f69c044d4287ad2160da8101cdc as process 94
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Number of pools: 1
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Using Linux native AIO
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Completed initialization of buffer pool
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: 128 rollback segments are active.
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Creating shared tablespace for temporary tables
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] InnoDB: 10.6.12 started; log sequence number 41296; transaction id 14
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] Plugin 'FEEDBACK' is disabled.
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Warning] 'user' entry 'root@mariadb-lamp' ignored in --skip-name-resolve mode.
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Warning] 'proxies_priv' entry '@% root@mariadb-lamp' ignored in --skip-name-resolve mode.
lamp-mariadb-1  | 2023-03-01 19:29:56 0 [Note] mariadbd: ready for connections.
lamp-mariadb-1  | Version: '10.6.12-MariaDB-1:10.6.12+maria~ubu2004'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
lamp-mariadb-1  | 2023-03-01 19:29:57+00:00 [Note] [Entrypoint]: Temporary server started.
lamp-mariadb-1  | 2023-03-01 19:29:58+00:00 [Note] [Entrypoint]: Creating database lamp
lamp-mariadb-1  | 2023-03-01 19:29:58+00:00 [Note] [Entrypoint]: Creating user lamp
lamp-mariadb-1  | 2023-03-01 19:29:58+00:00 [Note] [Entrypoint]: Giving user lamp access to schema lamp
lamp-mariadb-1  | 2023-03-01 19:29:58+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
lamp-mariadb-1  | 
lamp-mariadb-1  | 2023-03-01 19:29:58+00:00 [Note] [Entrypoint]: Stopping temporary server
lamp-mariadb-1  | 2023-03-01 19:29:58 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
lamp-mariadb-1  | 2023-03-01 19:29:58 0 [Note] InnoDB: FTS optimize thread exiting.
lamp-mariadb-1  | 2023-03-01 19:29:58 0 [Note] InnoDB: Starting shutdown...
lamp-mariadb-1  | 2023-03-01 19:29:58 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
lamp-mariadb-1  | 2023-03-01 19:29:58 0 [Note] InnoDB: Buffer pool(s) dump completed at 230301 19:29:58
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Shutdown completed; log sequence number 42270; transaction id 15
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] mariadbd: Shutdown complete
lamp-mariadb-1  | 
lamp-mariadb-1  | 2023-03-01 19:29:59+00:00 [Note] [Entrypoint]: Temporary server stopped
lamp-mariadb-1  | 
lamp-mariadb-1  | 2023-03-01 19:29:59+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
lamp-mariadb-1  | 
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] Starting MariaDB 10.6.12-MariaDB-1:10.6.12+maria~ubu2004 source revision 4c79e15cc3716f69c044d4287ad2160da8101cdc as process 1
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Number of pools: 1
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Using Linux native AIO
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Completed initialization of buffer pool
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: 128 rollback segments are active.
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Creating shared tablespace for temporary tables
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: 10.6.12 started; log sequence number 42270; transaction id 14
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] Plugin 'FEEDBACK' is disabled.
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] InnoDB: Buffer pool(s) load completed at 230301 19:29:59
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] Server socket created on IP: '0.0.0.0'.
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] Server socket created on IP: '::'.
lamp-mariadb-1  | 2023-03-01 19:29:59 0 [Note] mariadbd: ready for connections.
lamp-mariadb-1  | Version: '10.6.12-MariaDB-1:10.6.12+maria~ubu2004'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
lamp-mariadb-1  | 2023-03-01 19:30:09 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '192.168.64.1' (This connection closed normally without authentication)
lamp-mariadb-1  | 2023-03-01 19:30:16 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: '192.168.64.1' (This connection closed normally without authentication)
lamp-mariadb-1  | 2023-03-01 19:40:19 5 [Warning] Aborted connection 5 to db: 'unconnected' user: 'unauthenticated' host: '192.168.64.1' (This connection closed normally without authentication)
$ multipass list
Name                    State             IPv4             Image
deck-app                Running           192.168.64.2     Ubuntu 22.04 LTS
                                          172.17.0.1
                                          172.18.0.1
$ sudo lsof -PiTCP -sTCP:LISTEN
Password:
COMMAND    PID           USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
launchd      1           root   24u  IPv6 0xc7c9f228709a3bb7      0t0  TCP *:50051 (LISTEN)
launchd      1           root   25u  IPv4 0xc7c9f22d3b5c1d3f      0t0  TCP *:50051 (LISTEN)
launchd      1           root   33u  IPv6 0xc7c9f228709a4ab7      0t0  TCP localhost:8021 (LISTEN)
launchd      1           root   46u  IPv4 0xc7c9f22d3b5be5ef      0t0  TCP localhost:8021 (LISTEN)
launchd      1           root   47u  IPv6 0xc7c9f228709a4ab7      0t0  TCP localhost:8021 (LISTEN)
launchd      1           root   48u  IPv4 0xc7c9f22d3b5be5ef      0t0  TCP localhost:8021 (LISTEN)
mDNSRespo  151 _mdnsresponder   52u  IPv4 0xc7c9f22d3b5b65ef      0t0  TCP *:53 (LISTEN)
mDNSRespo  151 _mdnsresponder   53u  IPv6 0xc7c9f228709a5237      0t0  TCP *:53 (LISTEN)
ControlCe 1023    me    7u  IPv4 0xc7c9f22d3b5bb9af      0t0  TCP *:7000 (LISTEN)
ControlCe 1023    me    8u  IPv6 0xc7c9f228709a2cb7      0t0  TCP *:7000 (LISTEN)
ControlCe 1023    me    9u  IPv4 0xc7c9f22d3b5bc4bf      0t0  TCP *:5000 (LISTEN)
ControlCe 1023    me   10u  IPv6 0xc7c9f228709a3437      0t0  TCP *:5000 (LISTEN)
rapportd  1033    me    7u  IPv4 0xc7c9f22d3b5bdadf      0t0  TCP *:49154 (LISTEN)
rapportd  1033    me    8u  IPv6 0xc7c9f228709a4337      0t0  TCP *:49154 (LISTEN)
DECK      1660    me   57u  IPv6 0xc7c9f228709a68b7      0t0  TCP *:443 (LISTEN)
DECK      1660    me   58u  IPv6 0xc7c9f228709a7037      0t0  TCP *:80 (LISTEN)
nfsd      2022           root   10u  IPv4 0xc7c9f22d3b5b39af      0t0  TCP *:1023 (LISTEN)
nfsd      2022           root   11u  IPv6 0xc7c9f228709a59b7      0t0  TCP *:1022 (LISTEN)
nfsd      2022           root   13u  IPv4 0xc7c9f22d3b5b44bf      0t0  TCP *:2049 (LISTEN)
nfsd      2022           root   14u  IPv6 0xc7c9f228709a6137      0t0  TCP *:2049 (LISTEN)
rpc.statd 2025           root   10u  IPv4 0xc7c9f22d3b5b7c0f      0t0  TCP *:1021 (LISTEN)
rpc.statd 2025           root   11u  IPv6 0xc7c9f228709a7f37      0t0  TCP *:1019 (LISTEN)
rpcbind   2026         daemon    7u  IPv4 0xc7c9f22d3b5b5adf      0t0  TCP *:111 (LISTEN)
rpcbind   2026         daemon    9u  IPv6 0xc7c9f228709a77b7      0t0  TCP *:111 (LISTEN)
rpc.lockd 2027           root    9u  IPv4 0xc7c9f22d3b5b922f      0t0  TCP *:1017 (LISTEN)
rpc.lockd 2027           root   10u  IPv6 0xc7c9f228709a95b7      0t0  TCP *:1012 (LISTEN)
rpc.rquot 2029           root    9u  IPv4 0xc7c9f22d3b5a3c0f      0t0  TCP *:999 (LISTEN)
rpc.rquot 2029           root   10u  IPv6 0xc7c9f2287099e8b7      0t0  TCP *:996 (LISTEN)

Do you have any tips for me so I can troubleshoot?

nabad600 commented 1 year ago

Hi @Vandaahl, Thank you so much for sharing your feedback, please find the details for your reference

  1. Database information image
    1. PHPMyAdmin image
  2. connection status through php image https://www.loom.com/share/3a6c1796018e473b8ba45932a3e2df2b Appreciate your feedback here. Let us know of any issues, we'd be happy to help.
Vandaahl commented 1 year ago

Thank you for trying to help. I solved the phpmyadmin issue by entering the correct details as you showed. I was using the 'external' host instead of the internal one. Silly mistake.

I also duplicated your php script and can confirm it works on my end as well.

However, I tried several open source PHP applications like Wordpress (brand new installation) with the LAMP stack and they do not work. The requests are timing out. I also tried Wordpress with the Wordpress stack from the marketplace and it times out as well.

nabad600 commented 1 year ago

@Vandaahl, We tried several open-source PHP applications like WordPress(brand new installation) with the LAMP stack and it's working and also tried WordPress with the WordPress stack from the marketplace also it's working correctly for reference please below mentions the snapshot.

WordPress With LAMP image WordPress from the marketplace image

Appreciate your feedback here. Let us know of any issues, we'd be happy to help.

nabad600 commented 1 year ago

Hi @Vandaahl, We may need to close this ticket in the next 24 hours. So, I request you to inform us about the status of your query. Let us know of any issues, we'd be happy to help.