Image never builds, get stuck on "Waiting for DOWNLOAD_SOURCE"
$ ./codebuild_build.sh -i aws/codebuild/docker:18.09.0 -a /Users/mthompson/code/aws/aws-build/output -e env.txt -m
Build Command:
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -e "IMAGE_NAME=aws/codebuild/docker:18.09.0" -e "ARTIFACTS=/Users/mthompson/code/aws/aws-build/output" -e "SOURCE=/Users/mthompson/code/aws/aws-build-2/web" -v "/Users/mthompson/code/aws/aws-build-2/web:/LocalBuild/envFile/" -e "ENV_VAR_FILE=env.txt" -e "MOUNT_SOURCE_DIRECTORY=TRUE" -e "INITIATOR=mthompson" amazon/aws-codebuild-local:latest
Removing agent-resources_build_1 ... done
Removing agent-resources_agent_1 ... done
Removing network agent-resources_default
Removing volume agent-resources_source_volume
Removing volume agent-resources_user_volume
Creating network "agent-resources_default" with the default driver
Creating volume "agent-resources_source_volume" with local driver
Creating volume "agent-resources_user_volume" with local driver
Creating agent-resources_agent_1 ... done
Creating agent-resources_build_1 ... done
Attaching to agent-resources_agent_1, agent-resources_build_1
agent_1 | [Container] 2019/04/18 21:14:29 Waiting for agent ping
agent_1 | [Container] 2019/04/18 21:14:29 Waiting for DOWNLOAD_SOURCE
From my proxy it appears like it's trying to hit "http://bmr:3000/api/v1/phase" and since that doesn't exist, nothing happens.
Hi @mbering , I was not able to reproduce this issue. Could you please try to run the local build without the proxy? Thanks.
I am seeing the same behavior. Script hangs on Waiting for DOWNLOAD_SOURCE. What is happening at this step? Is there any logging that can be turned on to see more details?
edit: Adding the -m option cleared this up.
@gferreri , your source directory might be too large. We would mount the source directory to the customer build container directly when using -m instead of copying source directory to a volume at first. Thanks!
@awszhen I set up an environment that can work without a proxy and was able to get past the download source part.
Does codebuild local not work with proxies? Most people in my company who would be using this have to use a proxy.
@mbering , we are trying to reproduce this issue. Are you setting the proxy on the host or inside the build? Thanks.
Proxy is set on the host, I was also setting the proxy inside the build.
I tested with no proxy, still get the same result.
On Wed, Apr 24, 2019 at 6:57 PM awszhen notifications@github.com wrote:
@mbering https://github.com/mbering , we are trying to reproduce this
issue. Are you setting the proxy on the host or inside the build? Thanks.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws/aws-codebuild-docker-images/issues/195#issuecomment-486469615,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABFYOUVEC5VC3TXH3JPJTGDPSDXXBANCNFSM4HHEOQYA
.
@mbering , please use latest version of the local agent. SHA: 7dbfe6f7ac84331dcb314d609f6e6655c062dc7d99e4df4d0b7f4114a87286eb
To debug this, click on the build Phase Details, you will see more logs there.
Try removing your node_modules (or whatever dependencies) dir before attempting to mount.
I had nested packages with node_modules directories that were causing this step to hang. Whether it was actually copying files or had crashed at "DOWNLOAD SOURCE," i'm not sure. But I wasn't happy to wait for 15m+ for the build to run, so I executed find . -name "node_modules" -type d -prune -exec rm -rf '{}' + in the project directory before attempting to run codebuild locally.
@chriswall-aa despite this issue being marked as "closed", this is at most a work-around and not a solution. At the minimum, there should be an informative error message by the script telling you that your source directory might be too large. Otherwise your only way of knowing what the issue is, is googling and finding your way here.
Most helpful comment
I am seeing the same behavior. Script hangs on
Waiting for DOWNLOAD_SOURCE. What is happening at this step? Is there any logging that can be turned on to see more details?edit: Adding the
-moption cleared this up.