Git Product home page Git Product logo

Comments (18)

mamachanko avatar mamachanko commented on August 16, 2024 17

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>

One way to get past this policy is to grant permission to certain programs in the Developer Tools settings. We've been successful in granting java permissions.

yes-java

You will have to point at your java binary. Depending on how you install it, it will be in different places. which java can help. SDKman and brew put binaries in special locations.

Once you grant java with permissions, run your things again but make sure that there are new PIDs. For example, when you use gradle, say --no-daemon to not reuse an existing daemon which might not have elevated permissions yet.

❗ Disclaimer: this is potentially unsafe. zero warranty. you have been warned. yak yak.

from embedded-redis.

tpanagos avatar tpanagos commented on August 16, 2024 11

@codemonstur's build with maven repo worked to fix for me.

https://mvnrepository.com/artifact/com.github.codemonstur/embedded-redis/1.0.0

from embedded-redis.

michaelcowan avatar michaelcowan commented on August 16, 2024 6

Another option is to move to a maintained fork that has addressed this issue:
https://github.com/codemonstur/embedded-redis

This worked for me MacOS Sonoma 14.1.1 (23B81) M1.

from embedded-redis.

fernando-garcia-diaz avatar fernando-garcia-diaz commented on August 16, 2024 5

@codemonstur's build with maven repo worked to fix for me.

https://mvnrepository.com/artifact/com.github.codemonstur/embedded-redis/1.0.0

Unfortunately this works in Intel macs but not on M1 macs

from embedded-redis.

vjsantojaca avatar vjsantojaca commented on August 16, 2024 3

I have the same problem. I have modified the code in this repository https://github.com/vjsantojaca/embedded-redis and now the tests pass without error (I have not upload it to a maven repository)

I am trying to update the redis version to a new one.

Anyway, I think that the correct way would be change the dependencies that we have with this library in our repository and use testcontainers.

    redis = new GenericContainer(DockerImageName.parse("redis:7.0.0").toString()).withExposedPorts(6379);
    redis.start();

    String host =  redis.getContainerIpAddress();
    Integer port = redis.getMappedPort(6379);

    System.out.println("Redis -> " + host + ":" + port);

from embedded-redis.

PovilasKM avatar PovilasKM commented on August 16, 2024 2

Another option is to move to a maintained fork that has addressed this issue: https://github.com/codemonstur/embedded-redis

This worked for me MacOS Sonoma 14.1.1 (23B81) M1.

Thanks, that repo worked for me with 14.1.1 (23B81), 2019 mac.
The only difference between these repos was that RedisServer.builder() had to be replaced with RedisServer.newRedisServer()

from embedded-redis.

SanthoshVasabhaktula avatar SanthoshVasabhaktula commented on August 16, 2024 2

Another option is to move to a maintained fork that has addressed this issue: https://github.com/codemonstur/embedded-redis

This worked for me MacOS Sonoma 14.1.1 (23B81) M1.

Thanks, the same has worked for me with 14.1.1 (23B81) M2 as well

from embedded-redis.

Hejow avatar Hejow commented on August 16, 2024 2

@codemonstur's build with maven repo worked to fix for me.

https://mvnrepository.com/artifact/com.github.codemonstur/embedded-redis/1.0.0

Thanks! This works on me (mac M2 pro 14.2.1)

from embedded-redis.

michellemillerh avatar michellemillerh commented on August 16, 2024 2

@mamachanko's option worked for me on M1 Airbook, 14.3.1. I had to enable this for both Java and IntelliJ also -- the screenshot hints at IntelliJ but has it turned off. Also, which java misled me, it did not show brew's installation path, but echo $JAVA_HOME and then /bin/java did.

I wasn't able to use the codemunster fork because it broke in our Jenkins pipeline running on Linux with java.io.IOException: Ready pattern not found in log. Startup log.

from embedded-redis.

jevanlingen avatar jevanlingen commented on August 16, 2024 1

Unfortunately this works in Intel macs but not on M1 Macs

Yeah, that's kinda sad. Luckily the customised Redis version by @vjsantojaca does work on my m2 Mac 💪🏻!

from embedded-redis.

wuyongdec avatar wuyongdec commented on August 16, 2024 1

finally it works for me @mamachanko appreciate for your help

from embedded-redis.

PengLean avatar PengLean commented on August 16, 2024

have the same problem

from embedded-redis.

PengLean avatar PengLean commented on August 16, 2024

have the same problem

#127 (comment)
I follow the comment to set up local redisExecProvider when create redis server, then solve the problem.

from embedded-redis.

EGjaedong avatar EGjaedong commented on August 16, 2024

same problem with you

from embedded-redis.

frankfiorante avatar frankfiorante commented on August 16, 2024

having the same problem

from embedded-redis.

deva820 avatar deva820 commented on August 16, 2024

I am on Mac M2 Pro Sonoma. But unfortunately it does not work for me. I get the following error while running the builds. I am using latest version 1.4.1. I have also tried 1.0.0 as well.

Caused by: java.io.IOException: Ready pattern not found in log. Startup log:
at redis.embedded.RedisInstance.awaitServerReady(RedisInstance.java:59)
at redis.embedded.RedisInstance.start(RedisInstance.java:45)
... 92 more

@Bean("EmbeddedRedisConfig") public EmbeddedRedisConfig embeddedRedisConfig() throws IOException { int redisPort = 6381; redisServer = RedisServer.newRedisServer().port(redisPort).build(); redisServer.start(); log.info("Started redis server on port {}", redisPort); return new EmbeddedRedisConfig(redisServer, redisPort); }

from embedded-redis.

phanker avatar phanker commented on August 16, 2024

@mamachanko's option worked for me on M1 Airbook, 14.3.1. I had to enable this for both Java and IntelliJ also -- the screenshot hints at IntelliJ but has it turned off. Also, which java misled me, it did not show brew's installation path, but echo $JAVA_HOME and then /bin/java did.

I wasn't able to use the codemunster fork because it broke in our Jenkins pipeline running on Linux with java.io.IOException: Ready pattern not found in log. Startup log.

it works for me.

from embedded-redis.

codemonstur avatar codemonstur commented on August 16, 2024

@michellemillerh

I wasn't able to use the codemunster fork because it broke in our Jenkins pipeline running on Linux with java.io.IOException: Ready pattern not found in log. Startup log.

This is the error that you get when the Redis binary doesn't start up at all. Theoretically it could be anything but lots of people appear to have trouble because they run the binary on a host that doesn't have libssl.so installed. If you run the latest version of the library it should give you a more detailed error message that says as much. Installing libssl on the host is the solution most people go for.

from embedded-redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.