Appium Inspector throws error :Failed to connect to to server, Pls check that it is running

Go to advanced setting.
Allow Unauthorized Access (Enable this)
And move to Automatic server tab
Now connect. It should Connect