Unable to connect to the remote server, No connection could be made because the target machine actively refused it 127.0.0.1:8080

0
Hi  I tried to create new app using MX Studio Pro and select Introduction template and build and got below error System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8080    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)    --- End of inner exception stack trace ---    at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)    at System.Net.HttpWebRequest.GetRequestStream()    at Mendix.Modeler.Microflows.Debugger.DebuggerClient.DoHttpRequest(String url, SecureString password, String userAgent, String json, Int32 timeout) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerClient.cs:line 196    at Mendix.Modeler.Microflows.Debugger.DebuggerClient.PerformRequest(DebuggerRequest request, Int32 timeout) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerClient.cs:line 162    at Mendix.Modeler.Microflows.Debugger.DebuggerClient.StartSession(IEnumerable`1 breakpoints) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerClient.cs:line 63    at Mendix.Modeler.Microflows.Debugger.DebuggerController.StartDebugging(String url, SecureString password, ConnectionMode mode) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerController.cs:line 91    at Mendix.Modeler.Utility.BackgroundUtil.<>c__DisplayClass1_0`1.<Do>b__0(Object s, DoWorkEventArgs e) in C:\jenkins-ci\workspace\AppStudio3.0-Build\modeler\Mendix.Modeler.Utility\BackgroundUtil.cs:line 28    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)   Thanks
asked
3 answers
1

The error indicates that Studio Pro could not connect to port 8080 when starting the server..
Did you try and check your firewall settings, to see if it is blocking port 8080? 

answered
0

Thanks Mr Klatter for your answer.

I have allowed Mendix Studio Pro in Firewall for all ports still getting the same error.

answered
0

The 127.0.0.1 represents a 'loopback' . It allows the computer to communicate with itself  via network protocol .  Dns.GetHostEntry(IPAddress.Loopback).HostName returns the host name of your machine. When you pass a host name to TcpClient , it will resolve it to one or more IP addresses using Dns.GetHostAddresses(hostName) . This includes the public and local IP addresses of your machine (e.g. 192.168.12.10), but not 127.0.0.1 (loopback address). So your client is trying to connect to any of the non-loopback addresses of your machine, while your server is listening only on the loopback address . So, no connection can be established. The solution to this problem is that connect to the same end point your server is listening on.

 

answered