A 'Connection closed due to invalid server name' is an error message that can appear on mobile MetaTrader apps if you've selected the incorrect server to authenticate with during the login process.
To resolve the issue, ensure you have a stable internet connection, re-launch the MetaTrader apps, and choose the correct trading server according to your account type.
Live and demo server addresses.
To successfully log in to your trading account, you must select the server which comes with "FXTM".
For example, ForexTimeFXTM-ECN