Singlestore for Arm64 (M1 Macs)

I’ve been trying to configure the docker image to run on M1 mac using the
parameter:

platform=linux/amd64 

in the yaml docker configuration file.
and a docker file containing

FROM --platform=linux/amd64 memsql

But it still doesn’t work.
I tested this approach with a MySQL docker image, which works fine and runs in the emulated amd64 modus.

When looking at the docker dashboard in the container / apps section, there is a label ‘amd64’ below the MySQL app.
For the Singlestore container, I have the same label, so suspecting the image + container has been created in an emulated amd64 modus.
But when I launch the container with docker-compose up, the process bails out.
This is the log from the terminal:

Attaching to memsql_1
memsql_1  | 2022-01-07 14:00:37.527041 Starting Cluster
memsql_1  | Latest errors from MemSQL tracelog:
memsql_1  | 578 2022-01-07 14:00:39.613 INFO: Log opened
memsql_1  | 02431423 2022-01-07 14:00:42.044   FAIL: Thread 115118: InitializeRepl: Failed to initialize replication subsystem because 'io_setup' system call failed with error 38 (Function not implemented).
memsql_1  | : Failed to connect to MemSQL: process exited: exit status 255
memsql_1  | Traceback (most recent call last):
memsql_1  |   File "/startup", line 122, in <module>
memsql_1  |     start_cluster()
memsql_1  |   File "/startup", line 86, in start_cluster
memsql_1  |     ctl("start-node", "--all")
memsql_1  |   File "/startup", line 18, in ctl
memsql_1  |     subprocess.check_output(["memsqlctl", "-yj"] + list(args)))
memsql_1  |   File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
memsql_1  |     raise CalledProcessError(retcode, cmd, output=output)
memsql_1  | subprocess.CalledProcessError: Command '['memsqlctl', '-yj', 'start-node', '--all']' returned non-zero exit status 1
memsql_1 exited with code 1

Anyone a clue on how to get Singlestore running on Apple M1 chipset in a docker container?

1 Like

@yves7wdata thanks for sharing this. We are keeping an eye on this feature request.

2 Likes

@hanson, “keeping an eye”, does this mean this is on the roadmap?
Would it work running singlestore within a virtualized windows environment like parallels?

2 Likes

Is there any update on this?

2 Likes

Any updates on this?

2 Likes

Hi! Any updates on this?

4 Likes

Hi. Is there any updates?

2 Likes

This is a showstopper for my team. While I understand the desire to operate on the optimal hardware for your platform, your product is literally unusable for many small teams and hobbyists who cannot, or simply will not accept the necessity of a managed service or alternate hardware to run a database. Coupled with the fact that other databases do not have this problem, it is a significant mark against SingleStore. Surely this had to have come up in house too?

The % of M1 machines is only going to increase over time, and it’s fairly troubling that this doesn’t seem to be a high priority , but just something to ‘keep an eye on’. The less people can try your product before committing, the less they will be willing to explore the product further.

2 Likes

Hi Jet! I can understand your frustration.

ARM support and M1 support are critical to development and production use of SingleStore. We are actively working on supporting M1 chips, but supporting ARM overall (including Graviton instances) is a longer-term effort but we are exploring it as we understand the performance benefits of deploying software on those.

We are happy to provide $500 in free credits for use of our Managed Service for development purposes, in addition to more credits when you collaborate with SingleStore Solution Engineers.

Would you be interested in further pursuing this path?

1 Like

I am stuck with a similar situation, all developers are on Mac M1 and we are totally unable to test anything on our local.

Any update on when can we expect, just a timeline?

1 Like

Hey to all those within this thread! I myself run Apple Silicon and wanted to get it running, after a week of back and forth testing… I finally got it functional!

Now granted, this is not official nor supported by the SingleStore team, however it gives a taster for those wanting to tinker with it.

Check it out :slight_smile:

3 Likes

Thank you, will let you know if this works for me.

2 Likes

Hi! Thank you so much for the blog post, I was able to set everything up, i can acess the Studio properly, but i can’t connect with it through JDBC, :frowning:

An exception or error caused a run to abort: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. 
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
	at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251)
	at com.wiliot.TestUtils$.initDb(TestUtils.scala:34)
	at com.wiliot.TestUtils$.startSinglestoreDb(TestUtils.scala:41)
	at com.wiliot.assetTracking.AssetActorSpec.beforeAll(AssetActorSpec.scala:100)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:212)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at com.wiliot.assetTracking.AssetActorSpec.run(AssetActorSpec.scala:27)
	at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45)
	at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13(Runner.scala:1346)
	at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13$adapted(Runner.scala:1340)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1340)
	at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24(Runner.scala:1031)
	at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24$adapted(Runner.scala:1010)
	at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1506)
	at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010)
	at org.scalatest.tools.Runner$.run(Runner.scala:850)
	at org.scalatest.tools.Runner.run(Runner.scala)
	at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2or3(ScalaTestRunner.java:38)
	at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:25)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
	at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
	at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:581)
	at com.mysql.cj.protocol.a.NativeProtocol.readServerCapabilities(NativeProtocol.java:536)
	at com.mysql.cj.protocol.a.NativeProtocol.beforeHandshake(NativeProtocol.java:423)
	at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1431)
	at com.mysql.cj.NativeSession.connect(NativeSession.java:133)
	at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)
	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)
	... 25 more
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
	at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:67)
	at com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81)
	at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63)
	at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45)
	at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:575)
	... 31 more


Process finished with exit code 0

You have any idea how i can fix this?

1 Like

Hello, we have a good news.

With our 7.8.11 release, you can now run SingleStoreDB on M1 Macs. Provide feedback on this thread if you encounter any issue.

Make sure to pull the latest version when installing it:

docker run -i --init \
    --name singlestore-ciab \
    -e LICENSE_KEY=<YOUR_LICENSE_FROM_PORTAL.SINGLESTORE.COM> \
    -e ROOT_PASSWORD=<YOUR_DESIRED_DATABASE_ROOT_PASSWORD> \
    -p 3306:3306 -p 8080:8080 \
    singlestore/cluster-in-a-box:latest
6 Likes

What great news! :tada: Yay!

1 Like

That is amazing! But when I run your command with my variables, I still get the message that it is running in amd64 mode…


Am I doing something wrong?

1 Like

I also experience that but it should work once you connect with it. Let me know if it doesn’t work.

2 Likes

Ahh, yeah I started looking at Singlestore yesterday, so it was already working for me. But it is so slow on a M1 Pro when I compare it to an external server that is amd64 over the internet…

1 Like

What is running slow? Your feedback will help us improve the experience. As a note, this release on MAC is more for dev/test scenario.

2 Likes

Great news, waited for this a long time.

Will M1 support be available only from 7.8.11 and above ?

Our prod env. is 7.6.22,
and I wonder if it’s supported, best practice is to have same version for dev & prod envs.

Thanks in advance,
Ziv

1 Like