Garmaine Staff asked 3 months ago

I have a maven project which can be successfully imported on my windows machine. However with the same settings.xml and pom.xml, I can't import it on my MAC. The Unable to import maven project. See logs for details erroe keeps showing up. The project relies on some private repository and the addresses is configured in settings.xml (since windows machine do the job successfully). Here is some of the log I get when importing:

2020-04-11 10:00:34,028 [ 407319]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
2020-04-11 10:00:34,683 [ 407974]   INFO - j.ide.plugins.RepositoryHelper - using cached plugin list (updated at 2020/4/11, 9:54) 
2020-04-11 10:02:21,424 [ 514715]  ERROR -      #org.jetbrains.idea.maven - Cannot reconnect. 
java.lang.RuntimeException: Cannot reconnect.
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:64)
    at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1261)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:45)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:141)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:35)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor$1.run(MavenProjectsProcessor.java:110)
    at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:482)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.net.SocketException: Permission denied (Write failed)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:254)
    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217)
    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162)
    at com.sun.proxy.$Proxy143.customize(Unknown Source)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:167)
    at com.intellij.execution.rmi.RemoteUtil.access$400(RemoteUtil.java:38)
    at com.intellij.execution.rmi.RemoteUtil$1.lambda$invoke$0(RemoteUtil.java:151)
    at com.intellij.openapi.util.ClassLoaderUtil.computeWithClassLoader(ClassLoaderUtil.java:45)
    at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:219)
    at com.intellij.execution.rmi.RemoteUtil$1.invoke(RemoteUtil.java:151)
    at com.sun.proxy.$Proxy143.customize(Unknown Source)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:92)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda$customizeForResolve$1(MavenEmbedderWrapper.java:65)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
    ... 13 more
Caused by: java.net.SocketException: Permission denied (Write failed)
    at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
    at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    at java.base/java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1829)
    at java.base/java.io.ObjectOutputStream.flush(ObjectOutputStream.java:722)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.releaseOutputStream(StreamRemoteCall.java:120)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:238)
    ... 31 more
2020-04-11 10:02:21,427 [ 514718]  ERROR -      #org.jetbrains.idea.maven - IntelliJ IDEA 2019.3.4  Build #IU-193.6911.18 
2020-04-11 10:02:21,427 [ 514718]  ERROR -      #org.jetbrains.idea.maven - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-04-11 10:02:21,427 [ 514718]  ERROR -      #org.jetbrains.idea.maven - OS: Mac OS X 
2020-04-11 10:02:21,427 [ 514718]  ERROR -      #org.jetbrains.idea.maven - Last Action: Maven.ReimportProject 
2020-04-11 10:02:27,780 [ 521071]  ERROR -      #org.jetbrains.idea.maven - Cannot reconnect. 
java.lang.RuntimeException: Cannot reconnect.
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:64)
    at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1261)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:45)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:141)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:35)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor$1.run(MavenProjectsProcessor.java:110)
    at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:482)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.net.SocketException: Permission denied (Write failed)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:254)
    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217)
    at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162)
    at com.sun.proxy.$Proxy143.customize(Unknown Source)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:167)
    at com.intellij.execution.rmi.RemoteUtil.access$400(RemoteUtil.java:38)
    at com.intellij.execution.rmi.RemoteUtil$1.lambda$invoke$0(RemoteUtil.java:151)
    at com.intellij.openapi.util.ClassLoaderUtil.computeWithClassLoader(ClassLoaderUtil.java:45)
    at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:219)
    at com.intellij.execution.rmi.RemoteUtil$1.invoke(RemoteUtil.java:151)
    at com.sun.proxy.$Proxy143.customize(Unknown Source)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:92)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda$customizeForResolve$1(MavenEmbedderWrapper.java:65)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
    ... 13 more
Caused by: java.net.SocketException: Permission denied (Write failed)
    at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
    at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    at java.base/java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1829)
    at java.base/java.io.ObjectOutputStream.flush(ObjectOutputStream.java:722)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.releaseOutputStream(StreamRemoteCall.java:120)
    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:238)
    ... 31 more
2020-04-11 10:02:27,781 [ 521072]  ERROR -      #org.jetbrains.idea.maven - IntelliJ IDEA 2019.3.4  Build #IU-193.6911.18 
2020-04-11 10:02:27,781 [ 521072]  ERROR -      #org.jetbrains.idea.maven - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-04-11 10:02:27,781 [ 521072]  ERROR -      #org.jetbrains.idea.maven - OS: Mac OS X 
2020-04-11 10:02:27,781 [ 521072]  ERROR -      #org.jetbrains.idea.maven - Last Action: Maven.ReimportProject 
2020-04-11 10:02:29,890 [ 523181]   INFO - rationStore.ComponentStoreImpl - Saving Project (name=dmp, containerState=ACTIVE, componentStore=/Users/11113523/Code/dmp) RunManager took 24 ms 

I think the main problem is Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.net.SocketException: Permission denied (Write failed). But I can't figure out what permission is denied from where. Could someone tell me how to make it right?