#1650  Remote Executor throws exception "No any mounting container found"
Closed
Dylan Vos opened 5 months ago

I've looked through the issues, looked through Google - but cannot find any reference to this exception No any mounting container found

When I try to test my remote executor which is running through docker, it throws the exception No any mounting container found, full stacktrace:

Please wait...
Pending resource allocation...
Testing on agent '{AGENT_NAME}'...
Connecting to server '{PRIVATE}'...
Testing specified docker image...
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No any mounting container found
    	at io.onedev.server.job.DefaultJobManager.runJob(DefaultJobManager.java:1353)
    	at io.onedev.server.job.DefaultResourceAllocator.runAgentJob(DefaultResourceAllocator.java:322)
    	at io.onedev.server.plugin.executor.remotedocker.RemoteDockerExecutor.test(RemoteDockerExecutor.java:208)
    	at io.onedev.server.plugin.executor.remotedocker.RemoteDockerExecutor.test(RemoteDockerExecutor.java:38)
    	at io.onedev.server.web.page.admin.buildsetting.jobexecutor.JobExecutorEditPanel$3.runTask(JobExecutorEditPanel.java:204)
    	at io.onedev.server.web.component.taskbutton.TaskButton$2.call(TaskButton.java:160)
    	at io.onedev.server.web.component.taskbutton.TaskButton$2.call(TaskButton.java:133)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	at io.onedev.server.security.SecurityUtils.lambda$inheritSubject$1(SecurityUtils.java:350)
    	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:829)
    Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No any mounting container found
    	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    	at com.hazelcast.executor.impl.DistributedExecutorService$Processor.run(DistributedExecutorService.java:278)
    	at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217)
    	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:829)
    	at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
    	at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
    Caused by: java.lang.IllegalStateException: No any mounting container found
    	at io.onedev.agent.DockerExecutorUtils.getHostPath(DockerExecutorUtils.java:517)
    	at io.onedev.agent.AgentSocket.getHostPath(AgentSocket.java:81)
    	at io.onedev.agent.AgentSocket.testDockerExecutor(AgentSocket.java:954)
    	at io.onedev.agent.AgentSocket.service(AgentSocket.java:1030)
    	at io.onedev.agent.AgentSocket.lambda$onMessage$2(AgentSocket.java:210)
    	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:829)
    
Dylan Vos commented 5 months ago

Found the cause of the issue - apparently named-volumes aren't supported for the onedev/agent - as it cannot retrieve the path on the host - running of docker inspect -f "{{range .Mounts}}{{if eq .Destination \"/agent/work\"}}{{.Source}}{{end}}{{end}}" {CONTAINER_ID} - results in an empty response as the Source field is not set when using named volumes - at least in this deployment - so I have to figure that one out to get it to work - but maybe the Error message can be a little more explanatory ??

Dylan Vos changed state to 'Closed' 5 months ago
Previous Value Current Value
Open
Closed
Dylan Vos commented 5 months ago

Local deployment issue

Robin Shen commented 5 months ago

Will improve the error message to emphasize on using bind mount.

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/server#1650
Please wait...
Page is in error, reload to recover