moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
373 stars 244 forks source link

IOError when waiting for Oracle to come up #223

Closed paulholden closed 1 year ago

paulholden commented 1 year ago
$ bin/moodle-docker-wait-for-db
Waiting for oracle to come up...
Waiting for oracle to come up...
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 9, in <module>
    load_entry_point('docker-compose==1.8.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 61, in main
    command()
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 113, in perform_command
    handler(command, command_options)
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 507, in logs
    event_stream=self.project.events(service_names=options['SERVICE'])).run()
  File "/usr/lib/python2.7/dist-packages/compose/cli/log_printer.py", line 98, in run
    self.output.flush()
IOError: [Errno 32] Broken pipe

Note I can still install/init phpunit, etc - just this step seems broken for Oracle

stronk7 commented 1 year ago

Wow, this is really strange error. I've tried to reproduce it locally and, here, it always ends ok after a couple of 'Waiting for oracle to come up...'. Just guessing if you get the same error (or similar) if, instead of the bin/moodle-docker-wait-for-db script you just run this every 4-5 seconds:

bin/moodle-docker-compose logs db | grep -q 'DATABASE IS READY TO USE!' && echo "Yes, we are ready!"

Certainly I cannot imagine where that error comes from, maybe ensure you're using updated docker stuff or so?

Ciao :-)

stronk7 commented 1 year ago

Have you been able to solve this, @paulholden ? Maybe upgrading / reinstalling or so?

paulholden commented 1 year ago

Hi @stronk7 - sorry for the delay. It seems that upgrading Docker has indeed resolved the issue:


$ bin/moodle-docker-wait-for-db
Waiting for oracle to come up...
Waiting for oracle to come up...
Waiting for oracle to come up...
$ docker --version
Docker version 20.10.7, build f0df350
$ docker compose version
Docker Compose version v2.12.2