To diagnose this error even when running the simple command please follow bellow instructions:
1. java -version 2. Check the amount of free memory you have: free -m 3. Check the max number of user processes
ulimit -a ps -ef | wc -l
https://github.com/scala/scala-jenkins-infra/issues/181