Alfresco image not compatible with apple silicon

cancel
Showing results for 
Search instead for 
Did you mean: 
Javiersainzmaza
Partner

Alfresco image not compatible with apple silicon

Hi,

I am trying to set up alfresco on my local environmetn throw docker (alfresco 7.0.0) the thing is that I have a apple macbook m1 wich has an arm architecture. only the container of postgress seems that is optimized for it since the alfresco, share and solr are amd64 and due to that alfresco never starts.

I am getting some errors about qemu also like these:

https://github.com/docker/for-mac/issues/5123

It seems that Alfresco needs to update the images to make them compatible for mac arm.

Do you expect to make it compatible? is there any way to setup a local alfresco with docker on m1 macs?

I ahe tried with ther images from docker and also from quay.io.

Also take into account that the m1 macs were released more than 1 year ago and there are no more intel macs so if alfresco wants to continue give support to apple devices new images need to be generated in order to set up alfresco locally.

Kind regards

9 Replies
abhinavmishra14
Advanced

Re: Alfresco image not compatible with apple silicon

I think it is not supported as you have also mentioned.

Check this documentation for more details: https://docs.alfresco.com/content-services/7.0/support/

You can also raise an issue here: https://github.com/Alfresco/acs-deployment/issues 

Provide all the steps and detailed logs in the description

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
pavel_titenkov
Member II

Re: Alfresco image not compatible with apple silicon

Fully agree with Javiersainzmaza. Willing to see any actions from Alfresco to sort it out after 1 year of apple silicon MacBooks on the market. I see it's already becoming an issue in my organization and with more developers jumping on new macs hotter it will become.

Javiersainzmaza
Partner

Re: Alfresco image not compatible with apple silicon

Hi,

I think that the problem is that the container itself is running on amd64,  probably due the tomcat also is amd64.

The thing is that there is a tomcat 8.5.43 image for arm devices and also there are several jdk 11 for arm, so alfresco just needs to create an alfresco installation from scracth using the distribution zip and the versions of tomcat and jdk for arm, just that.

I have tried it myself and I ahve been able to start alfresco using it, right now I am configuring the other tools as libreoffice...

This is the image of tomcat that I am using:

tomcat:8.5.75-jre11-temurin-focal

and for postgress 

postgres:11.4-alpine

So I really don´t know why alfresco after one year haven´t made this litle updates.

I

 

Javiersainzmaza
Partner

Re: Alfresco image not compatible with apple silicon

Hi,

if you use 

postgres:alpine3.14

and

tomcat:8.5.75-jre11-temurin-focal

 it works on apple silicon devices, jsut you have to make the installation using the distribution zip

angelborroy
Alfresco Employee

Re: Alfresco image not compatible with apple silicon

I made some simple project to build ARM64 Docker Images:

https://github.com/aborroy/alfresco-dockerx-builder

Let me know your thoughts on that.

Hyland Developer Evangelist
Javiersainzmaza
Partner

Re: Alfresco image not compatible with apple silicon

Hi!

Thanks for that Angel. I have run that script but I am getting some errors for solr and share, alfresco was fine.

Solr:

Failed to execute goal on project alfresco-search: Could not resolve dependencies for project org.alfresco:alfresco-search:jar:2.1.0-SNAPSHOT: Failed to collect dependencies at org.apache.solr:solr-core:jar:6.6.5-patched.6 -> org.restlet.jeeSmiley Surprisedrg.restlet:jar:2.3.12: Failed to read artifact descriptor for org.restlet.jeeSmiley Surprisedrg.restlet:jar:2.3.12: Could not transfer artifact org.restlet.jeeSmiley Surprisedrg.restletSmiley Tongueom:2.3.12 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [maven-restlet (http://maven.restlet.talend.com, default, releases+snapshots), apache.snapshots (http://repository.apache.org/snapshots, default, disabled)]

I think that it is due we don´t have access to that repository since I am not able to download that jar.

Share:

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @547f1d52
at java.lang.reflect.AccessibleObject.checkCanSetAccessible (AccessibleObject.java:354)
at java.lang.reflect.AccessibleObject.checkCanSetAccessible (AccessibleObject.java:297)
at java.lang.reflect.Field.checkCanSetAccessible (Field.java:178)
at java.lang.reflect.Field.setAccessible (Field.java:172)
at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit> (TreeMapConverter.java:59)
at com.thoughtworks.xstream.XStream.setupConverters (XStream.java:679)
at com.thoughtworks.xstream.XStream.<init> (XStream.java:456)
at com.thoughtworks.xstream.XStream.<init> (XStream.java:381)
at com.thoughtworks.xstream.XStream.<init> (XStream.java:356)
at org.apache.maven.plugin.war.util.WebappStructureSerializer.<clinit> (WebappStructureSerializer.java:47)
at org.apache.maven.plugin.war.AbstractWarMojo.<init> (AbstractWarMojo.java:329)
at org.apache.maven.plugin.war.WarMojo.<init> (WarMojo.java:54)
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstanceWithCaller (Constructor.java:499)
at java.lang.reflect.Constructor.newInstance (Constructor.java:480)
at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance (DefaultConstructionProxyFactory.java:126)
at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:306)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

 

angelborroy
Alfresco Employee

Re: Alfresco image not compatible with apple silicon

I removed my ".m2" folder and built both projects without issues.

May you try from some other computer or environment?

These are tool versions I'm using:

$ mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 11.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"e 

 

Hyland Developer Evangelist
upforsin
Senior Member

Re: Alfresco image not compatible with apple silicon

Hello @angelborroy 

I can confirm it compiles and creates 3 arm docker images. But only while using Java from Oracle.

Unfortunatelly, no matter if I use standard Alfresco images or yours, after a BUILD SUCCESS messnagem acs contrainer exits.

docker-main-package-acs-1       | /usr/local/tomcat/bin/catalina.sh: line 421: /usr/lib/jvm/jre/bin/java: No such file or directory
docker-main-package-acs-1 exited with code 127

I have also other errors, SIGSEGV from Search:

docker-main-package-ass-1       | 2022-02-19 13:15:10.462 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _   Starting in standalone mode on port 8983
docker-main-package-ass-1       | 2022-02-19 13:15:10.463 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_|  Install dir: /opt/alfresco-search-services/solr
docker-main-package-ass-1       | 2022-02-19 13:15:10.497 INFO  (main) [   ] o.a.s.s.SolrDispatchFilter |___/\___/_|_|    Start time: 2022-02-19T13:15:10.479221Z
docker-main-package-ass-1       | 2022-02-19 13:15:14.743 INFO  (main) [   ] o.e.j.s.Server Started @11445ms
docker-main-package-share-1     | #
docker-main-package-share-1     | # A fatal error has been detected by the Java Runtime Environment:
docker-main-package-share-1     | #
docker-main-package-share-1     | #  SIGSEGV (0xb) at pc=0x000000401ef605fd, pid=23, tid=37
docker-main-package-share-1     | #
docker-main-package-share-1     | # JRE version: OpenJDK Runtime Environment 18.9 (11.0.12+7) (build 11.0.12+7-LTS)
docker-main-package-share-1     | # Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.12+7-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
docker-main-package-share-1     | # Problematic frame:
docker-main-package-share-1     | # J 2094 c1 com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Ljava/lang/String;)Z java.xml@11.0.12 (122 bytes) @ 0x000000401ef605fd [0x000000401ef60580+0x000000000000007d]
docker-main-package-share-1     | #
docker-main-package-share-1     | # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
docker-main-package-share-1     | #
docker-main-package-share-1     | # An error report file with more information is saved as:
docker-main-package-share-1     | # /usr/local/tomcat/hs_err_pid23.log
docker-main-package-share-1     | Compiled method (c1)   28913 2062       3       com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl::scanEndElement (170 bytes)
docker-main-package-share-1     |  total in heap  [0x000000401ef45810,0x000000401ef47208] = 6648
docker-main-package-share-1     |  relocation     [0x000000401ef45988,0x000000401ef45ad8] = 336
docker-main-package-share-1     |  main code      [0x000000401ef45ae0,0x000000401ef46c00] = 4384
docker-main-package-share-1     |  stub code      [0x000000401ef46c00,0x000000401ef46cc0] = 192
docker-main-package-share-1     |  oops           [0x000000401ef46cc0,0x000000401ef46ce0] = 32
docker-main-package-share-1     |  metadata       [0x000000401ef46ce0,0x000000401ef46d18] = 56
docker-main-package-share-1     |  scopes data    [0x000000401ef46d18,0x000000401ef46f10] = 504
docker-main-package-share-1     |  scopes pcs     [0x000000401ef46f10,0x000000401ef47180] = 624
docker-main-package-share-1     |  dependencies   [0x000000401ef47180,0x000000401ef47190] = 16
docker-main-package-share-1     |  nul chk table  [0x000000401ef47190,0x000000401ef47208] = 120
docker-main-package-share-1     | Compiled method (c2)   28914 1422       4       com.sun.org.apache.xerces.internal.impl.io.UTF8Reader::read (1443 bytes)
docker-main-package-share-1     |  total in heap  [0x000000402604f790,0x00000040260503e0] = 3152
docker-main-package-share-1     |  relocation     [0x000000402604f908,0x000000402604f948] = 64
docker-main-package-share-1     |  main code      [0x000000402604f960,0x000000402604ffc0] = 1632
docker-main-package-share-1     |  stub code      [0x000000402604ffc0,0x000000402604ffe8] = 40
docker-main-package-share-1     |  metadata       [0x000000402604ffe8,0x000000402604fff8] = 16
docker-main-package-share-1     |  scopes data    [0x000000402604fff8,0x0000004026050280] = 648
docker-main-package-share-1     |  scopes pcs     [0x0000004026050280,0x00000040260503c0] = 320
docker-main-package-share-1     |  dependencies   [0x00000040260503c0,0x00000040260503c8] = 8
docker-main-package-share-1     |  handler table  [0x00000040260503c8,0x00000040260503e0] = 24
docker-main-package-share-1     | Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
docker-main-package-share-1     | #
docker-main-package-share-1     | # If you would like to submit a bug report, please visit:
docker-main-package-share-1     | #   https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%207&component=java-11-openjdk
docker-main-package-share-1     | #
docker-main-package-share-1     | qemu: uncaught target signal 6 (Aborted) - core dumped
docker-main-package-share-1     | /usr/local/tomcat/shared/classes/alfresco/substituter.sh: line 37:    23 Aborted                 bash -c "$@"
docker-main-package-share-1 exited with code 134

and write-lock from SOLR

docker-main-package-ass-1       | org.apache.solr.common.SolrException: Error CREATEing SolrCore 'alfresco': Unable to create core [alfresco] Caused by: /opt/alfresco-search-services/data/alfresco/index/write.lock
docker-main-package-ass-1       | 	at org.apache.solr.core.CoreContainer.create(CoreContainer.java:900)
docker-main-package-ass-1       | 	at org.alfresco.solr.AlfrescoCoreAdminHandler.createAndRegisterNewCore(AlfrescoCoreAdminHandler.java:801)
docker-main-package-ass-1       | 	at org.alfresco.solr.AlfrescoCoreAdminHandler.newCore(AlfrescoCoreAdminHandler.java:705)
docker-main-package-ass-1       | 	at org.alfresco.solr.AlfrescoCoreAdminHandler.lambda$setupNewDefaultCores$3(AlfrescoCoreAdminHandler.java:286)
docker-main-package-ass-1       | 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
docker-main-package-ass-1       | 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
docker-main-package-ass-1       | 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
docker-main-package-ass-1       | 	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
docker-main-package-ass-1       | 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
docker-main-package-ass-1       | 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
docker-main-package-ass-1       | 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
docker-main-package-ass-1       | 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
docker-main-package-ass-1       | 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
docker-main-package-ass-1       | 	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
docker-main-package-ass-1       | 	at org.alfresco.solr.AlfrescoCoreAdminHandler.setupNewDefaultCores(AlfrescoCoreAdminHandler.java:279)
docker-main-package-ass-1       | 	at org.alfresco.solr.AlfrescoCoreAdminHandler.lambda$new$0(AlfrescoCoreAdminHandler.java:227)
docker-main-package-ass-1       | 	at java.base/java.lang.Thread.run(Thread.java:829)
docker-main-package-ass-1       | Caused by: org.apache.solr.common.SolrException: Unable to create core [alfresco]
docker-main-package-ass-1       | 	at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:966)
docker-main-package-ass-1       | 	at org.apache.solr.core.CoreContainer.create(CoreContainer.java:863)
docker-main-package-ass-1       | 	... 16 more
docker-main-package-ass-1       | Caused by: org.apache.solr.common.SolrException: /opt/alfresco-search-services/data/alfresco/index/write.lock
docker-main-package-ass-1       | 	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:977)
docker-main-package-ass-1       | 	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:830)
docker-main-package-ass-1       | 	at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:950)
docker-main-package-ass-1       | 	... 17 more
docker-main-package-ass-1       | Caused by: java.nio.file.AccessDeniedException: /opt/alfresco-search-services/data/alfresco/index/write.lock
docker-main-package-ass-1       | 	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
docker-main-package-ass-1       | 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
docker-main-package-ass-1       | 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
docker-main-package-ass-1       | 	at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
docker-main-package-ass-1       | 	at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
docker-main-package-ass-1       | 	at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)
docker-main-package-ass-1       | 	at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:113)
docker-main-package-ass-1       | 	at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
docker-main-package-ass-1       | 	at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
docker-main-package-ass-1       | 	at org.apache.lucene.store.FilterDirectory.obtainLock(FilterDirectory.java:104)
docker-main-package-ass-1       | 	at org.apache.lucene.index.IndexWriter.isLocked(IndexWriter.java:4776)
docker-main-package-ass-1       | 	at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:709)
docker-main-package-ass-1       | 	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:923)
docker-main-package-ass-1       | 	... 19 more

How did you resolve those issues?

 

EDIT. On my macbook the procedure is much more compilcated. That is why I created an instruction on Github:

https://gist.github.com/howkymike/d2ad4e81298e2408511a14cb731441c3

Thank you @angelborroy for the motivation, if not you I would just sell my Macbook and buy PC.

angelborroy
Alfresco Employee

Re: Alfresco image not compatible with apple silicon

exited with code 127

That means the docker service doesn't have enough memory. You should increase the amount of memory dedicated to Docker Desktop or to the docker service in docker-compose.yml

Hyland Developer Evangelist