Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

MID Server on silicon based Mac (Mx)

Tommy Jensen
Giga Guru

I need a local MID server to test an integration solution I am working on and I do not have windows anymore. And I do not have a license to run a virtual windows server.

So I have tried to build a docker image with the recipe downloaded from the instance b ut it fails with following error:

ERROR: failed to solve: eclipse-temurin:8-jdk-alpine: failed to resolve source metadata for docker.io/library/eclipse-temurin:8-jdk-alpine: no match for platform in manifest: not found

 

I have spent hours googling for a solution but so found none. For that problem I have created a HI case and am waiting for a response on that.


Then I found a blog post about how to run MID Server directly on siliconbased Mac so tried that too. But this too fails. I get these errors 

 

Unable to locate any of the following binaries:
/Volumes/DATA2/midserver/agent/bin/./wrapper-macosx-arm-64
/Volumes/DATA2/midserver/agent/bin/./wrapper-macosx-arm-32
/Volumes/DATA2/midserver/agent/bin/./wrapper


I found another post which said to grab those files from the Vancouver zip. I did that but then I get other errors and the MID server still cannot start.

Release: Washington DC 

Machine: Mac Studio M1 Ultra.



 

1 ACCEPTED SOLUTION

-O-
Kilo Patron

I'm not sure if it will work for you on the M1, but I have just managed to install a MID server on a Raspberry Pi 4, which is also an ARM architecture.

I have combined the Tanuki wrapper from https://download.tanukisoftware.com/wrapper/3.5.51/ into the MID service folder and added the Amazon Coretto 17 Java run-time to the MID service folder, have updated the configuration files to point to these new pieces, and it kinda' works.

The updated files were "wrapper-jvm.conf":

set.JAVA_HOME=/srv/snmid/agent/jdk-17.0.12
set.SNC_JVM_ARCH=arm-64

and "wrapper-override.conf":

wrapper.name=snmid_agent_001
# REQUIRED: Display name of the service
wrapper.displayname=ServiceNow MID Server (agent_001)
...
wrapper.java.command=%JAVA_HOME%/bin/java

The last parameter makes it use the Amazon Coretto 17 run-time.

 

The differences between the downloaded and final MID service package are that folder "bin" contains the extra file "wrapper-linux-arm-64" and folder "lib" contains extra (sub) folder "arm-64" and extra files "libwrapper-linux-arm-64.so" and "wrapper.jar" - all from the Tanuki download.

 

I have seen that the Tanuki download also contains Mac Arm files, but I can't say if any will work on the M1.

View solution in original post

4 REPLIES 4

-O-
Kilo Patron

I'm not sure if it will work for you on the M1, but I have just managed to install a MID server on a Raspberry Pi 4, which is also an ARM architecture.

I have combined the Tanuki wrapper from https://download.tanukisoftware.com/wrapper/3.5.51/ into the MID service folder and added the Amazon Coretto 17 Java run-time to the MID service folder, have updated the configuration files to point to these new pieces, and it kinda' works.

The updated files were "wrapper-jvm.conf":

set.JAVA_HOME=/srv/snmid/agent/jdk-17.0.12
set.SNC_JVM_ARCH=arm-64

and "wrapper-override.conf":

wrapper.name=snmid_agent_001
# REQUIRED: Display name of the service
wrapper.displayname=ServiceNow MID Server (agent_001)
...
wrapper.java.command=%JAVA_HOME%/bin/java

The last parameter makes it use the Amazon Coretto 17 run-time.

 

The differences between the downloaded and final MID service package are that folder "bin" contains the extra file "wrapper-linux-arm-64" and folder "lib" contains extra (sub) folder "arm-64" and extra files "libwrapper-linux-arm-64.so" and "wrapper.jar" - all from the Tanuki download.

 

I have seen that the Tanuki download also contains Mac Arm files, but I can't say if any will work on the M1.

-O-
Kilo Patron

Something I just realized, maybe you should also download the "delta-pack" from Tanuki. It contains files that have the platfrom in their name so it will be easier to "combine" those into the MID service installation - will not cause conflicts. I can see that the delta-pack contains files "bin/wrapper-macosx-arm-64" (and library "lib/libwrapper-macosx-arm-64.dylib") which might be what you need. It may be that other library files will also be needed, but I have no way of knowing.

Thanks, I did discover that once I found the first missing files then more. But for now I managed to get a Vancouver MID server up and runnning. It turned out that the blogpost I linked to have a small but significant error in the description.

The linie

  • wrapper.java.additional.128=Djdk.lang.Process.launchMechanism=posix_spawn

 

should in fact be

 

  • wrapper.java.additional.128=-Djdk.lang.Process.launchMechanism=posix_spawn

the "-" was missing between "=" and "D".

You're most welcome 🙂

Glad that you managed to make it work.