Error tests on socket creation