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?
@hanson, “keeping an eye”, does this mean this is on the roadmap?
Would it work running singlestore within a virtualized windows environment like parallels?
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.
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?
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.
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,
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
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…