mixpost icon indicating copy to clipboard operation
mixpost copied to clipboard

Unable to login after fresh install - Internal error An internal error has occurred.

Open chrisbehectik opened this issue 1 year ago • 4 comments

Steps to reproduce the problem

  1. Create docker compose file and .env file as per documentation.
  2. Start containers running docker compose up -d.
  3. Access APP_URL and enter default credentials.
  4. Get error page. ...

Expected behaviour

Logged in to application

Actual behaviour

Internal error

Detailed description

Docker compose:

services:
  socials-NAME-app:
    image: inovector/mixpost:v1.6.0
    container_name: socials-NAME-app
    environment:
      APP_NAME: ${SOCIALS_NAME_APP_NAME}
      APP_KEY: ${SOCIALS_NAME_APP_KEY}
      APP_DEBUG: ${SOCIALS_NAME_APP_DEBUG}
      APP_DOMAIN: ${SOCIALS_NAME_APP_DOMAIN}
      APP_URL: ${SOCIALS_NAME_APP_URL}
      DB_DATABASE: ${SOCIALS_NAME_DB}
      DB_USERNAME: ${SOCIALS_NAME_USER}
      DB_PASSWORD: ${SOCIALS_NAME_PASSWORD}
      DB_HOST: socials-NAME-db
      DB_PORT: 3306
      REDIS_HOST: socials-NAME-redis
      REDIS_PORT: 6379
    volumes:
      - socials-NAME-app-storage:/var/www/html/storage/app
      - socials-NAME-app-logs:/var/www/html/storage/logs
    depends_on:
      - socials-NAME-db
      - socials-NAME-redis
    restart: unless-stopped
    networks:
      - socials-NAME-net
      - nginx-proxy-manager 

  socials-NAME-db:
    image: mysql/mysql-server:8.0
    container_name: socials-NAME-db
    environment:
      MYSQL_DATABASE: ${SOCIALS_NAME_DB}
      MYSQL_USER: ${SOCIALS_NAME_USER}
      MYSQL_PASSWORD: ${SOCIALS_NAME_PASSWORD}
      MYSQL_RANDOM_ROOT_PASSWORD: ${SOCIALS_NAME_ROOT_PASSWORD}
    volumes:
      - socials-NAME-db-data:/var/lib/mysql
    healthcheck:
        test: ["CMD", "mysqladmin", "ping", "-p ${SOCIALS_NAME_PASSWORD}"]
        retries: 3
        timeout: 5s
    restart: unless-stopped
    networks:
      - socials-NAME-net

  socials-NAME-redis:
    image: redis:latest
    container_name: socials-NAME-redis
    command: redis-server --appendonly yes --replica-read-only no
    volumes:
      - ./socials.NAME.com/redis:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      retries: 3
      timeout: 5s
    restart: unless-stopped
    networks:
      - socials-NAME-net

volumes:
  socials-NAME-app-storage:
    driver: local
  socials-NAME-app-logs:
    driver: local
  socials-NAME-db-data:
    driver: local

networks:
  socials-NAME-net:
    driver: bridge
  nginx-proxy-manager:
    external: true

I accessed url set in environment APP_URL and logged in with default credentials:

I get the following error: image

mixpost container logs:

   INFO  Configuration cached successfully.  
   INFO  Application cache cleared successfully.  
   INFO  Routes cached successfully.  
 * Starting periodic command scheduler cron
   ...done.
Mixpost has started!
2024-06-13 15:41:48,532 INFO Set uid to user 0 succeeded
2024-06-13 15:41:48,554 INFO supervisord started with pid 22
2024-06-13 15:41:49,558 INFO spawned: 'mixpost_horizon_00' with pid 24
2024-06-13 15:41:49,561 INFO spawned: 'nginx' with pid 25
2024-06-13 15:41:49,564 INFO spawned: 'php-fpm' with pid 26
2024-06-13 15:41:50,566 INFO success: mixpost_horizon_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-13 15:41:50,566 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-13 15:41:50,567 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

mysql container logs:

[Entrypoint] MySQL Docker Image 8.0.32-1.2.11-server
[Entrypoint] Starting MySQL 8.0.32-1.2.11-server
2024-06-13T15:41:47.590664Z 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.
2024-06-13T15:41:47.592421Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
2024-06-13T15:41:47.646569Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-06-13T15:41:51.426896Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-06-13T15:41:51.957875Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2024-06-13T15:41:51.972409Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2024-06-13T15:41:52.216521Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-06-13T15:41:52.216554Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-06-13T15:41:52.294951Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-06-13T15:41:52.295009Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2024-06-13T16:27:41.022596Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.32).
2024-06-13T16:27:42.574337Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.
[Entrypoint] MySQL Docker Image 8.0.32-1.2.11-server
[Entrypoint] Starting MySQL 8.0.32-1.2.11-server
2024-06-13T16:27:44.084333Z 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.
2024-06-13T16:27:44.085598Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
2024-06-13T16:27:44.093829Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-06-13T16:27:57.327978Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-06-13T16:27:57.865792Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-06-13T16:27:57.865833Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-06-13T16:27:57.959799Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-06-13T16:27:57.959873Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.

Redis container logs:

1:C 13 Jun 2024 16:27:40.872 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 13 Jun 2024 16:27:40.872 * Redis version=7.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 13 Jun 2024 16:27:40.872 * Configuration loaded
1:M 13 Jun 2024 16:27:40.872 * monotonic clock: POSIX clock_gettime
1:M 13 Jun 2024 16:27:40.873 * Running mode=standalone, port=6379.
1:M 13 Jun 2024 16:27:40.873 * Server initialized
1:M 13 Jun 2024 16:27:40.875 * Reading RDB base file on AOF loading...
1:M 13 Jun 2024 16:27:40.875 * Loading RDB produced by version 7.2.5
1:M 13 Jun 2024 16:27:40.875 * RDB age 2755 seconds
1:M 13 Jun 2024 16:27:40.875 * RDB memory usage when created 0.86 Mb
1:M 13 Jun 2024 16:27:40.875 * RDB is base AOF
1:M 13 Jun 2024 16:27:40.875 * Done loading RDB, keys loaded: 0, keys expired: 0.
1:M 13 Jun 2024 16:27:40.875 * DB loaded from base file appendonly.aof.1.base.rdb: 0.001 seconds
1:M 13 Jun 2024 16:27:41.050 * DB loaded from incr file appendonly.aof.1.incr.aof: 0.175 seconds
1:M 13 Jun 2024 16:27:41.050 * DB loaded from append only file: 0.176 seconds
1:M 13 Jun 2024 16:27:41.050 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
1:M 13 Jun 2024 16:27:41.050 * Ready to accept connections tcp
1:M 13 Jun 2024 16:27:52.022 * Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.
1:M 13 Jun 2024 16:27:54.027 * Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.
1:M 13 Jun 2024 16:28:03.070 * Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.
1:M 13 Jun 2024 16:28:41.015 * 10000 changes in 60 seconds. Saving...
1:M 13 Jun 2024 16:28:41.015 * Background saving started by pid 34
34:C 13 Jun 2024 16:28:41.041 * DB saved on disk
34:C 13 Jun 2024 16:28:41.041 * Fork CoW for RDB: current 1 MB, peak 1 MB, average 1 MB
1:M 13 Jun 2024 16:28:41.116 * Background saving terminated with success

Specifications

Host: Raspberry Pi 5 4GB Debian Bookworm

chrisbehectik avatar Jun 13 '24 16:06 chrisbehectik

Having the same issue running mixpost on AWS Ubuntu 24 (ubuntu-noble-24.04-amd64-server-20240423)

MadhavShroff avatar Jun 13 '24 20:06 MadhavShroff

same issue i cannot login, debian 12 docker fresh install

tried to add a user : sudo docker compose exec -it mixpost bash
gives :

WARN[0000] /home/mixpost/docker-compose.yml: `version` is obsolete
root@27374c2ecb4b:/var/www/html# php artisan mixpost-auth:create

 What is the name of the new user?:
 > xxxx

 What is the email address of the new user?:
 > [email protected]

 What is the password for the new user?:
 >


In Connection.php line 829:

  SQLSTATE[HY000] [1130] Host '172.20.0.4' is not allowed to connect to this MySQL server (Connection: mysql, SQL: select exists(select * from `users` where `email` = contact@jardi
  nsdesvertiges.fr) as `exists`)


In Connector.php line 65:

  SQLSTATE[HY000] [1130] Host '172.20.0.4' is not allowed to connect to this MySQL server

Germwalker avatar Jun 18 '24 07:06 Germwalker

The mysql password for root is auto generated so you need to first grab that using:

docker logs mixpost-mysql-1 2>&1 | grep GENERATED

then you can login:

docker exec -it mixpost-mysql-1 mysql -uroot -p

once this is done you need to create a user:

CREATE USER 'mixpost_user'@'%' IDENTIFIED BY '';

and give him privileges:

grant all privileges on mixpost_db.* to 'mixpost_user'@'%' WITH GRANT OPTION;

then you need to rerun all migrations, and finally create the account:

docker exec -it mixpost-mixpost-1 bash
php artisan migrate
php artisan mixpost-auth:create

Subtixx avatar Jun 21 '24 12:06 Subtixx

Hello, same error on fresh docker install on ubuntu

Internal error An internal error has occurred. GO HOME

config and .env default

docker logs e2197ec361e9 [Entrypoint] MySQL Docker Image 8.0.32-1.2.11-server [Entrypoint] Starting MySQL 8.0.32-1.2.11-server 2024-06-22T06:36:46.818630Z 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. 2024-06-22T06:36:46.820787Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1 2024-06-22T06:36:46.829273Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2024-06-22T06:36:46.964365Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2024-06-22T06:36:47.207422Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2024-06-22T06:36:47.207461Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2024-06-22T06:36:47.239699Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2024-06-22T06:36:47.239761Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL.

'docker logs aa5bb34c6619

INFO Configuration cached successfully.

INFO Application cache cleared successfully.

INFO Routes cached successfully.

  • Starting periodic command scheduler cron ...done. Mixpost has started! 2024-06-22 06:36:47,665 INFO Set uid to user 0 succeeded 2024-06-22 06:36:47,667 INFO supervisord started with pid 21 2024-06-22 06:36:48,672 INFO spawned: 'mixpost_horizon_00' with pid 23 2024-06-22 06:36:48,679 INFO spawned: 'nginx' with pid 24 2024-06-22 06:36:48,687 INFO spawned: 'php-fpm' with pid 25 2024-06-22 06:36:49,946 INFO success: mixpost_horizon_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2024-06-22 06:36:49,947 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2024-06-22 06:36:49,947 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) `

simplemice avatar Jun 22 '24 06:06 simplemice

Just installed Mixpost Lite on a fresh Ubuntu server and everything is ok. Please, use our docker-compose.yml example: https://docs.mixpost.app/lite/installation/docker#3-create-docker-compose-file

lao9s avatar Aug 01 '24 09:08 lao9s

Solved by setting a DB_PASSWORD. This comment helped me

raphaklaus avatar Aug 23 '24 15:08 raphaklaus

but whats the DB password for sql unable to login into mysql container only

abhigyan17 avatar Jan 08 '25 06:01 abhigyan17

but whats the DB password for sql unable to login into mysql container only

You will set the DB_PASSWORD.

lao9s avatar Jan 18 '25 21:01 lao9s