If you're creating your server at home. Some routers will not allow its LAN users to connect from its WAN(for some security issues). You have to connect with LAN ip or 127.0.0.1 for your server, and let others join your server with WAN ip or normally connect from server browser.