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

MongoDB repetitive restarting on raspberry pi #892

Open
NandishRana opened this issue Aug 16, 2023 · 2 comments
Open

MongoDB repetitive restarting on raspberry pi #892

NandishRana opened this issue Aug 16, 2023 · 2 comments

Comments

@NandishRana
Copy link

NandishRana commented Aug 16, 2023

Bug description
The error I am encountering is related to a failed connection to the MongoDB service. Specifically, it seems that the service responsible for initializing the LMS (Learning Management System) couldn't establish a connection to MongoDB, even after multiple attempts.
As quite evident in the docker logs below, I think the issue is to do with the version compatibility (Hoping for a plausible solution or workaround)

How to reproduce
Flashed the mentioned Ubuntu OS on the SD Card, booted up the and updated the system sudo apt update
Installed using pipx install "tutor[full]==16.0.5" (globally)
Solved issue with docker mentioned below in additional context
Used tutor local launch command, Installation went on smoothly until error as mentioned below in the logging section
No manual changes done to any of the files.

Environment
Ubuntu Desktop 23.04 (64bit)
Tutor v16.0.5
SD Card Sandisk Ultra 64 GB (micro SD XC 1, A1)
Raspberry pi 4 Model B (2018) 8 GB RAM variant, ( Tutor's OpenEdX post v16 support ARM based systems)
For the sake of ease, the following is the specsheet for it

  • Processor: Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.8GHz
  • Memory: 8GB LPDDR4-3200 SDRAM
  • Connectivity: 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE, Gigabit Ethernet
  • USB: 2 USB 3.0 ports; 2 USB 2.0 ports
  • GPIO: Standard 40-pin GPIO header (fully backwards compatible with previous boards)
  • Video & sound: 2 × micro-HDMI ports (up to 4kp60 supported), 4-pole stereo audio and composite video port
  • Multimedia: H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode), OpenGL ES 3.1, Vulkan 1.0
  • Storage: Micro-SD card slot for loading operating system and data storage
  • Power: 5V DC via USB-C connector (minimum 3A), 5V DC via GPIO header (minimum 3A), Power over Ethernet (PoE) enabled (requires separate PoE HAT)
  • Operating temperature: 0 – 50 degrees C ambient

Additional context
There were some hiccups like the issue with docker compose #868, which was easily overcome by updating docker using this guide Docker Upgrade Guide for Ubuntu, mentioned the appropriate aarch as required in step 6, the adding the user to group sudo usermod -aG docker $USER.

Just to prevent miscommunication, I would require a bit elaboration if I need to tinker with Docker as 'am not well versed in it

Logs
Error log: Installation and Error Log (As you know the entire log is way too big, there were no errors before this, not even warnings. Issues began as soon as interaction with mongodb began

The relevant line in the log is probably: 2023/08/16 10:16:19 Failed to wait: timed out: tcp://mongodb:27017.
Used docker ps -a | grep mongodb 4-6 times.

nas@nas-desktop:~$ docker ps -a | grep mongodb
5608efbaba7b   mongo:4.4.22                            "docker-entrypoint.s…"   20 minutes ago   Restarting (132) 28 seconds ago                                                                                                                               tutor_local-mongodb-1
nas@nas-desktop:~$ docker ps -a | grep mongodb
5608efbaba7b   mongo:4.4.22                            "docker-entrypoint.s…"   21 minutes ago   Restarting (132) 9 seconds ago                                                                                                                               tutor_local-mongodb-1
nas@nas-desktop:~$ docker ps -a | grep mongodb
5608efbaba7b   mongo:4.4.22                            "docker-entrypoint.s…"   21 minutes ago   Restarting (132) 13 seconds ago                                                                                                                               tutor_local-mongodb-1
nas@nas-desktop:~$ docker ps -a | grep mongodb
5608efbaba7b   mongo:4.4.22                            "docker-entrypoint.s…"   21 minutes ago   Restarting (132) 14 seconds ago                                                                                                                               tutor_local-mongodb-1

Confirmed aarch using uname -m
Got back aarch 64

Further inspected the docker logs 5608efbaba7b

WARNING: MongoDB requires ARMv8.2-A or higher, and your current system does not appear to implement any of the common features for that!
  applies to all versions ≥5.0, any of 4.4 ≥4.4.19
  see https://jira.mongodb.org/browse/SERVER-71772
  see https://jira.mongodb.org/browse/SERVER-55178
  see also https://en.wikichip.org/wiki/arm/armv8#ARMv8_Extensions_and_Processor_Features
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-970864306

Feel free to ask for other logs or info as required!

Update 1: Ready with a clean installation of Tutor, up until just before launching it using tutor local launch.
Update 2: I am guessing this is sort of a bypass? building from source, Is it possible to do something with this, and/or jerry-rigging by downgrading the version

@NandishRana NandishRana changed the title MongoDB Repetitive Restarting on ARM-based Systems (aarch64) with Tutor v16.05 MongoDB Repetitive Restarting on ARM-based Systems with Tutor v16.05 Aug 16, 2023
@regisb regisb changed the title MongoDB Repetitive Restarting on ARM-based Systems with Tutor v16.05 MongoDB Repetitive Restarting on raspberry pi Aug 16, 2023
@regisb regisb changed the title MongoDB Repetitive Restarting on raspberry pi MongoDB repetitive restarting on raspberry pi Aug 16, 2023
@regisb
Copy link
Contributor

regisb commented Sep 5, 2023

WARNING: MongoDB requires ARMv8.2-A or higher, and your current system does not appear to implement any of the common features for that!
  applies to all versions ≥5.0, any of 4.4 ≥4.4.19

Please try the following:

tutor config save --set DOCKER_IMAGE_MONGODB=docker.io/mongo:4.4.18

Then tutor local launch.

@DawoudSheraz
Copy link
Contributor

@NandishRana Hi, did the above comment resolve the issue for you? Thanks

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

No branches or pull requests

3 participants