use localhost instead of 127.0.0.1 since it can deal with ipv6 address