Hi Patrick,
thanks per documentation.
I solved the previous problem, a -e was missing in front of DB_PASS ...
I also found port 80 busy, so I provided 8080
[ec2-user@ip-10-0-0-70 tt-rss]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ginkel/ttrss latest d2769464cecd 2 years ago 190MB
[ec2-user@ip-10-0-0-70 tt-rss]$ docker run -d <run like a daemon>
-e DB_HOST=10.0.0.70 <myprivate DNS, where is the database >
-e DB_PORT=3306
-e DB_NAME=<my database name>
-e DB_USER=<my database username>
-e DB_PASS=<my database password>
-e DB_TYPE=mysql <the database type>
-p 8080:80 <the port, because the 80 is occupied by Apache>
ginkel/ttrss <the image name>
845446b9ca54a7d411ecdf6ff553ecb093a096bc80a59794c226f87a9ea8ab83
[ec2-user@ip-10-0-0-70 tt-rss]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[ec2-user@ip-10-0-0-70 tt-rss]
Why i can not find anythings?
So i tried without the damon flag:
[ec2-user@ip-10-0-0-70 tt-rss]$ sudo service mysqld start
Starting mysqld: [ OK ]
[ec2-user@ip-10-0-0-70 tt-rss]$ docker run -e DB_HOST=10.0.0.70 -e DB_PORT=3306 -e DB_NAME=<dbname> -e DB_USER=<db user> -e DB_PASS=<db pwd> -e DB_TYPE=mysql -e SELF_URL_PATH=
http://3.65.53.160/ttrss -p 8080:80 ginkel/ttrss
Failed to connect to mysql:host=10.0.0.70;port=3306;dbname=<dbname>; (user = <dbuser>, pw = <db pwd>)
Database login failed, trying to create...
Failed to connect to mysql:host=10.0.0.70;port=3306; (user = <db user>, pw = <db pwd>)
PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user '<db user>'@'ip-172-17-0-2.eu-central-1.compute.internal' (using password: YES) in /configure-db.php:137
Stack trace:
#0 /configure-db.php(137): PDO->__construct('mysql:host=10.0...', '<db user>', '<db pwd>')
#1 /configure-db.php(68): dbconnect(Array)
#2 {main}
thrown in /configure-db.php on line 137
so i view the mysql server status:
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.62, for Linux (x86_64) using readline 5.1
Connection id: 4
Current database:
Current user: <db name>@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.62 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 8 min 54 sec
Threads: 1 Questions: 7 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.013
--------------
mysql>
Now i have changed the IP connecton for MySQL:
mysql> GRANT ALL ON <db name>.* TO '<db user>'@'10.0.0.70' IDENTIFIED BY '<db user password>';
retyped the command:
[ec2-user@ip-10-0-0-70 tt-rss]$ docker run -e DB_HOST=10.0.0.70 -e DB_PORT=3306 -e DB_NAME=<db name> -e DB_USER=<db user> -e DB_PASS=<db pwd> -e DB_TYPE=mysql -e SELF_URL_PATH=
http://3.65.53.160/ttrss -p 8080:80 ginkel/ttrss Failed to connect to mysql:host=10.0.0.70;port=3306;dbname=<db name>; (user = <db user>, pw = <db pwd>)
Failed to connect to mysql:host=10.0.0.70;port=3306;dbname=<db name>; (user = <db user>, pw = <db pwd>)
/var/tmp
2021-03-06 14:52:54,951 CRIT Supervisor running as root (no user in config file)
2021-03-06 14:52:54,951 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf.d/ttrss-update-daemon.conf" during parsing
2021-03-06 14:52:54,952 INFO supervisord started with pid 1
2021-03-06 14:52:55,955 INFO spawned: 'nginx' with pid 10
2021-03-06 14:52:55,956 INFO spawned: 'php-fpm' with pid 11
2021-03-06 14:52:55,957 INFO spawned: 'ttrss-update-daemon' with pid 12
[14:52:56/12] Spawn interval: 120 sec
Schema version is wrong, please upgrade the database. [so the database is running and it is connected?]
2021-03-06 14:52:56,042 INFO exited: ttrss-update-daemon (exit status 0; not expected)
[06-Mar-2021 14:52:56] NOTICE: fpm is running, pid 11
[06-Mar-2021 14:52:56] NOTICE: ready to handle connections
[06-Mar-2021 14:52:56] NOTICE: systemd monitor interval set to 10000ms
2021-03-06 14:52:57,055 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-06 14:52:57,056 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-06 14:52:57,057 INFO spawned: 'ttrss-update-daemon' with pid 16
[14:52:57/16] Spawn interval: 120 sec
Schema version is wrong, please upgrade the database.
2021-03-06 14:52:57,094 INFO exited: ttrss-update-daemon (exit status 0; not expected)
2021-03-06 14:52:59,097 INFO spawned: 'ttrss-update-daemon' with pid 17
[14:52:59/17] Spawn interval: 120 sec
Schema version is wrong, please upgrade the database.
2021-03-06 14:52:59,133 INFO exited: ttrss-update-daemon (exit status 0; not expected)
2021-03-06 14:53:02,138 INFO spawned: 'ttrss-update-daemon' with pid 18
[14:53:02/18] Spawn interval: 120 sec
Schema version is wrong, please upgrade the database.
2021-03-06 14:53:02,175 INFO exited: ttrss-update-daemon (exit status 0; not expected)
2021-03-06 14:53:03,177 INFO gave up: ttrss-update-daemon entered FATAL state, too many start retries too quickly
So, where coud be the error?
Thnaks
Massimo