Missing Mist and Z in render layers
Enable mist and Z for the view layer.

For older versions of blender (2.79 or previous)

On the Scene tab(yellow circle), make sure that Z and Mist are checked(red circle).
Also, make sure that the render layer in the Scene tab matches the render layer in the node editor (green circle).
Z is now called Depth.