I have the same problem but I do not know the cause.
By the way single run on virtual machine works
docker run -p 4000:80 username/project:part1
Also the swarm works on physical machine.
So may be the problem is in docker shipped with boot2docker.iso, misconfiguration of docker or in misconfiguration of virtualbox/virtual machine.
a duplicate Swarm does not accept connection if running on VM (created by docker-machine)?