Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle docker image is not working on amazon linux (EC2) #41

Open
sriharshach opened this issue May 3, 2020 · 2 comments
Open

Moodle docker image is not working on amazon linux (EC2) #41

sriharshach opened this issue May 3, 2020 · 2 comments

Comments

@sriharshach
Copy link

sriharshach commented May 3, 2020

Describe the issue
Moodle docker image is not working on amazon linux (EC2)
$ uname -a
*********** SMP Wed Apr 1 18:06:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

To Reproduce
Take an EC2(t2.micro) and below the same steps provided in readme file

Expected behavior
After starting docker container, I am unable to access via IP address(public IP of my EC2 instance). Production deployment steps also din't help.

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
874276ba5c6e jhardison/moodle "/etc/apache2/foregr…" 11 minutes ago Up 11 minutes 0.0.0.0:8080->80/tcp, 0.0.0.0:32770->443/tcp moodle
0ded0b425ce1 mysql:5 "docker-entrypoint.s…" 12 minutes ago Up 12 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp DB

Can someone help. Thanks in advance.

@jmhardison
Copy link
Owner

You can check your logs for the two executing containers. My initial theory is the t2.micro (1 core / 1gb) doesn't have enough memory to support both moodle (512mb minimum) and mysql (512mb minimum) while also supporting system services on the node.

But if you look at the log output, it might give you a direction to chase.

@sriharshach
Copy link
Author

sriharshach commented May 4, 2020

$ df -mh Filesystem Size Used Avail Use% Mounted on devtmpfs 475M 0 475M 0% /dev tmpfs 492M 0 492M 0% /dev/shm tmpfs 492M 608K 492M 1% /run tmpfs 492M 0 492M 0% /sys/fs/cgroup /dev/xvda1 8.0G 4.1G 4.0G 52% / tmpfs 99M 0 99M 0% /run/user/1000

I have enough space.

Containers are running:

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3bc592ecc741 jhardison/moodle "/etc/apache2/foregr…" 5 minutes ago Up 5 minutes 0.0.0.0:8080->80/tcp, 0.0.0.0:32772->443/tcp moodle
cd01753479dd mysql:5 "docker-entrypoint.s…" 7 minutes ago Up 7 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp DB

Moodle container logs (I think apache is at fault, do we need to run any steps to access moodle using ipaddress?)

$ docker logs 3bc592ecc741
in bash, checking error.log as below warnings(no other errors)
[Mon May 04 02:37:00.928608 2020] [ssl:warn] [pid 1] AH01909: 172.17.0.3:443:0 server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Mon May 04 02:37:01.225514 2020] [ssl:warn] [pid 1] AH01909: 172.17.0.3:443:0 server certificate does NOT include an ID which matches the server name
[Mon May 04 02:37:01.228007 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Ubuntu) OpenSSL/1.1.1b configured -- resuming normal operations
[Mon May 04 02:37:01.228027 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Mysql Container logs:

$ docker logs cd01753479dd
2020-05-04 02:35:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.30-1debian10 started.
2020-05-04 02:35:02+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-05-04 02:35:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.30-1debian10 started.
2020-05-04 02:35:02+00:00 [Note] [Entrypoint]: Initializing database files
2020-05-04T02:35:02.347599Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2020-05-04T02:35:02.347652Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2020-05-04T02:35:02.347816Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-05-04T02:35:03.306003Z 0 [Warning] InnoDB: New log files created, LSN=45790
2020-05-04T02:35:03.544831Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2020-05-04T02:35:03.609508Z 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: dbe2e609-8daf-11ea-92e7-0242ac110002.
2020-05-04T02:35:03.611467Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-05-04T02:35:04.692279Z 0 [Warning] CA certificate ca.pem is self signed.
2020-05-04T02:35:04.852100Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2020-05-04 02:35:07+00:00 [Note] [Entrypoint]: Database files initialized
2020-05-04 02:35:07+00:00 [Note] [Entrypoint]: Starting temporary server
2020-05-04 02:35:07+00:00 [Note] [Entrypoint]: Waiting for server startup
2020-05-04T02:35:07.538320Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2020-05-04T02:35:07.538374Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2020-05-04T02:35:07.718840Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-05-04T02:35:07.720674Z 0 [Note] mysqld (mysqld 5.7.30) starting as process 77 ...
2020-05-04T02:35:07.724984Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-05-04T02:35:07.725073Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-05-04T02:35:07.725121Z 0 [Note] InnoDB: Uses event mutexes
2020-05-04T02:35:07.725163Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-05-04T02:35:07.725239Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-04T02:35:07.725291Z 0 [Note] InnoDB: Using Linux native AIO
2020-05-04T02:35:07.725602Z 0 [Note] InnoDB: Number of pools: 1
2020-05-04T02:35:07.725791Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-05-04T02:35:07.727617Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-05-04T02:35:07.736767Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-05-04T02:35:07.739391Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-05-04T02:35:07.763021Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-05-04T02:35:07.784381Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-05-04T02:35:07.784589Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-05-04T02:35:07.831576Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-05-04T02:35:07.832480Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-05-04T02:35:07.832560Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-05-04T02:35:07.832929Z 0 [Note] InnoDB: Waiting for purge to start
2020-05-04T02:35:07.883239Z 0 [Note] InnoDB: 5.7.30 started; log sequence number 2630576
2020-05-04T02:35:07.883762Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-05-04T02:35:07.890158Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2020-05-04T02:35:07.890336Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2020-05-04T02:35:07.890327Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-05-04T02:35:07.892158Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200504 2:35:07
2020-05-04T02:35:07.892688Z 0 [Warning] CA certificate ca.pem is self signed.
2020-05-04T02:35:07.892802Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2020-05-04T02:35:07.894775Z 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.
2020-05-04T02:35:07.902994Z 0 [Note] Event Scheduler: Loaded 0 events
2020-05-04T02:35:07.903319Z 0 [Note] mysqld: ready for connections.
Version: '5.7.30' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server (GPL)
2020-05-04 02:35:08+00:00 [Note] [Entrypoint]: Temporary server started.
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/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2020-05-04 02:35:10+00:00 [Note] [Entrypoint]: Creating database moodle
2020-05-04 02:35:10+00:00 [Note] [Entrypoint]: Creating user moodle
2020-05-04 02:35:10+00:00 [Note] [Entrypoint]: Giving user moodle access to schema moodle
2020-05-04 02:35:10+00:00 [Note] [Entrypoint]: Stopping temporary server
2020-05-04T02:35:10.476310Z 0 [Note] Giving 0 client threads a chance to die gracefully
2020-05-04T02:35:10.476449Z 0 [Note] Shutting down slave threads
2020-05-04T02:35:10.476494Z 0 [Note] Forcefully disconnecting 0 remaining clients
2020-05-04T02:35:10.476580Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-05-04T02:35:10.476667Z 0 [Note] Binlog end
2020-05-04T02:35:10.477184Z 0 [Note] Shutting down plugin 'ngram'
2020-05-04T02:35:10.477264Z 0 [Note] Shutting down plugin 'partition'
2020-05-04T02:35:10.477304Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2020-05-04T02:35:10.477342Z 0 [Note] Shutting down plugin 'ARCHIVE'
2020-05-04T02:35:10.477403Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2020-05-04T02:35:10.477465Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2020-05-04T02:35:10.477505Z 0 [Note] Shutting down plugin 'MyISAM'
2020-05-04T02:35:10.477592Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2020-05-04T02:35:10.477632Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2020-05-04T02:35:10.477670Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2020-05-04T02:35:10.477731Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2020-05-04T02:35:10.477778Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2020-05-04T02:35:10.477817Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2020-05-04T02:35:10.477889Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2020-05-04T02:35:10.477930Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2020-05-04T02:35:10.477967Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2020-05-04T02:35:10.478005Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2020-05-04T02:35:10.478076Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2020-05-04T02:35:10.478116Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2020-05-04T02:35:10.478153Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2020-05-04T02:35:10.478190Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2020-05-04T02:35:10.478289Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2020-05-04T02:35:10.478327Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2020-05-04T02:35:10.478364Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2020-05-04T02:35:10.478423Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2020-05-04T02:35:10.478461Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2020-05-04T02:35:10.478497Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2020-05-04T02:35:10.478533Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2020-05-04T02:35:10.478601Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2020-05-04T02:35:10.478639Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2020-05-04T02:35:10.478675Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2020-05-04T02:35:10.478731Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2020-05-04T02:35:10.478791Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2020-05-04T02:35:10.478829Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2020-05-04T02:35:10.478882Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2020-05-04T02:35:10.478968Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2020-05-04T02:35:10.479007Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2020-05-04T02:35:10.479043Z 0 [Note] Shutting down plugin 'InnoDB'
2020-05-04T02:35:10.479137Z 0 [Note] InnoDB: FTS optimize thread exiting.
2020-05-04T02:35:10.479332Z 0 [Note] InnoDB: Starting shutdown...
2020-05-04T02:35:10.579709Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2020-05-04T02:35:10.580281Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 200504 2:35:10
2020-05-04T02:35:11.689486Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12481183
2020-05-04T02:35:11.691311Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-05-04T02:35:11.691413Z 0 [Note] Shutting down plugin 'MEMORY'
2020-05-04T02:35:11.691460Z 0 [Note] Shutting down plugin 'CSV'
2020-05-04T02:35:11.691524Z 0 [Note] Shutting down plugin 'sha256_password'
2020-05-04T02:35:11.691565Z 0 [Note] Shutting down plugin 'mysql_native_password'
2020-05-04T02:35:11.691753Z 0 [Note] Shutting down plugin 'binlog'
2020-05-04T02:35:11.692167Z 0 [Note] mysqld: Shutdown complete
2020-05-04 02:35:12+00:00 [Note] [Entrypoint]: Temporary server stopped
2020-05-04 02:35:12+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
2020-05-04T02:35:12.487256Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2020-05-04T02:35:12.487313Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2020-05-04T02:35:12.653541Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-05-04T02:35:12.656420Z 0 [Note] mysqld (mysqld 5.7.30) starting as process 1 ...
2020-05-04T02:35:12.661070Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-05-04T02:35:12.661167Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-05-04T02:35:12.661214Z 0 [Note] InnoDB: Uses event mutexes
2020-05-04T02:35:12.661279Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-05-04T02:35:12.661351Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-04T02:35:12.661398Z 0 [Note] InnoDB: Using Linux native AIO
2020-05-04T02:35:12.661719Z 0 [Note] InnoDB: Number of pools: 1
2020-05-04T02:35:12.661932Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-05-04T02:35:12.663826Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-05-04T02:35:12.672562Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-05-04T02:35:12.675123Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-05-04T02:35:12.686919Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-05-04T02:35:12.695569Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-05-04T02:35:12.695780Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-05-04T02:35:12.741231Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-05-04T02:35:12.742151Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-05-04T02:35:12.742243Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-05-04T02:35:12.742595Z 0 [Note] InnoDB: Waiting for purge to start
2020-05-04T02:35:12.792909Z 0 [Note] InnoDB: 5.7.30 started; log sequence number 12481183
2020-05-04T02:35:12.793439Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-05-04T02:35:12.798968Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-05-04T02:35:12.802392Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200504 2:35:12
2020-05-04T02:35:12.803494Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2020-05-04T02:35:12.803591Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2020-05-04T02:35:12.804157Z 0 [Warning] CA certificate ca.pem is self signed.
2020-05-04T02:35:12.804275Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2020-05-04T02:35:12.804748Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2020-05-04T02:35:12.804859Z 0 [Note] IPv6 is available.
2020-05-04T02:35:12.804912Z 0 [Note] - '::' resolves to '::';
2020-05-04T02:35:12.805010Z 0 [Note] Server socket created on IP: '::'.
2020-05-04T02:35:12.807001Z 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.
2020-05-04T02:35:12.815445Z 0 [Note] Event Scheduler: Loaded 0 events
2020-05-04T02:35:12.815742Z 0 [Note] mysqld: ready for connections.
Version: '5.7.30' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants