The description for Error CE-33991-5 is "Get the status of the non HTTP_GET_200 in Internet Connection." What in the world is your PS4 trying to tell you and how do you fix this? Simple. You just need to retry the Internet Connection Test. To do this, go to Network-->Test Internet Connection.
Sony has a great page in their PS4 online user's guide to help you get online by figuring out which NAT typeyou have, etc. Check it out here. If you're still having problems, contract Sony directly at 800-345-SONY.