Auto-detect the url of es server.