I found a quick solution for me. Everytime you start Crysis 2, press the ~ button on the top left corner of the keyboard. If it says, "Failed to create socket port on blah blah blah" then it will not connect to multiplayer. What I do to fix this, is restart my computer, and DO NOT CONNECT to the internet while you startup crysis 2 again. Press the ~ button again, and if you don't see the "Failed to connect..." then you can connect to multiplayer. (make sure to connect to the internet again)
Hope this helps some of you, it always fixes my problem.