Reputation: 309
I'm currently using knife zero to help me provision the servers and the commands are executed through Jenkins. But recently I noticed that the process will stuck halfway through without any error and it is always at the part where it start executing the Java recipe. So every time the process got stuck, I will have to reboot my system to get it running again.
The Java cookbook i'm using is from Chef supermarket. https://supermarket.chef.io/cookbooks/java/versions/1.50.0
How should I debug this issue?
Upvotes: 0
Views: 361
Reputation: 309
After much investigation, I found out that this is due to the lack of available ram in the system when chef is running.
I use the sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
command to clear up the caches at the start of each run and my script no longer get stuck anymore.
http://linuxinsight.com/proc_sys_vm_drop_caches.html
Upvotes: 0
Reputation: 126
I would agree with @coderanger that this sounds like a symptom of a process that is waiting for user input before it can continue. Is it possible that you're trying to install Java 7 and haven't included the attribute accept_oracle_download_terms
?
From the docs for that cookbook, this is explicitly noted as being required:
To install Oracle Java 7 (note that when installing Oracle JDK, accept_oracle_download_terms attribute must be set
Upvotes: 0