본문 바로가기
🪲 bugs

🐛 Bugs: MacOS에서 Sonoma 업데이트 이후 Embedded Redis 시작되지 않음

by iirin 2024. 3. 2.

발생 상황

`EmbeddedRedis` 가 적용된 테스트를 실행시키려고 할 때, 다음의 에러 로그가 뜬 후 프로세스가 죽는 현상이 있었습니다.

`Can't start redis server. Check logs for details. Redis process log:`

 

그러나 process 가 이미 죽어버려서 로그를 볼 수도 없는 상황.

해당 문제에 대해 사수님께 질문하여 'OS 문제인 것 같다' 는 결론을 얻었습니다.

 

발생 원인

얼마 전에 MacOS를 Sonoma 14.x로 업데이트 했는데, 그로 인해 OS security policy가 변경되며 `EmbeddedRedis` 실행에 실패했던 것입니다. [👉 related issue]

 

Most likely security policies forbid the Redis binary from starting. The security policies seems to have been tightened in Sonoma. You can confirm that yourself with the Console app. Learn a bit more about it over here. In a nutshell, you start recording messages, filter for redis and run whatever code uses embedded-redis. Eventually you might see something like this:

`ASP: Security policy would not allow process <pid>`

 

 

대처

실행되는 자바에 권한 주는 방법이 있습니다. 보안 문제가 있을 수 있으므로 권장되지는 않습니다.

 

 

 

 

기존 Embedded Redis 를 포크하여 해당 문제를 해결한 레포지토리가 있습니다. 이것으로 대체할 수 있습니다.

https://github.com/codemonstur/embedded-redis

 

GitHub - codemonstur/embedded-redis: Redis embedded server

Redis embedded server. Contribute to codemonstur/embedded-redis development by creating an account on GitHub.

github.com

 


Refs.

https://github.com/kstyrc/embedded-redis/issues/135#issuecomment-1810598861

 

Unable to run on macOS Sonoma · Issue #135 · kstyrc/embedded-redis

This worked before I upgraded to macOS Sonoma. Now I get this error message: java.lang.RuntimeException: Can't start redis server. Check logs for details. Redis process log: at redis.embedded.Abstr...

github.com