rwf2 / Rocket

A web framework for Rust.

Home Page:https://rocket.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Solved) Rocket database fairing panicking while connecting to dockerized postgres on MacOS Sonoma

ananyo141 opened this issue · comments

Rocket Version

0.5.0

Operating System

macOS Sonoma

Rust Toolchain Version

1.74

What happened?

Was working on a dockerized version of a rust rocket application with postgresql as database, working fine on linux (arch linux) on both pc and laptop. Running the same docker compose application on MacOS Sonoma led to migration errors, that were promptly fixed by using wait-for-it script (my bad), but still not working on macos specifically.

Quite a few hours gone by, after trial and error, changed rust:1.74-slim-buster image to rust:1.75 only, and seems to now work perfectly. Commit

Keeping a log here since the issue is esoteric enough and I couldn't find any resources about it online (just got my macbook today and this was definitely not a good experience).

Test Case

https://github.com/ananyo141/video-sharing-platform/tree/ddfb0439f137af1cb6d35ae3d44fa6c5d5565458

running this code on 3 mac environments with 


$ cd video-processing && yarn install && cd ..
$ docker compose -f dev.docker-compose.yml up -d
$ docker logs -f video-sharing-platform-user-management-dev-1


### Log Output

```shell
postgres log:
connection reset by peer

rocket log:
panic in main thread while initializing user_db

Additional Context

No response

System Checks

  • My bug report relates to functionality.
  • I have tested against the latest Rocket release or a recent git commit.
  • I have tested against the latest stable rustc toolchain.
  • I was unable to find this issue previously reported.

Closing as it seems to be fixed.