econnrefused

ECONNREFUSED on running localhost server from NodeJS

眉间皱痕 提交于 2021-01-29 05:55:58
问题 I have a NodeJS server up and running on my local machine that is listening to port 50000. From another server, that is also running on my local machine, I need to make a simple GET request to that server, but all I get is an ECONNREFUSED error: { Error: connect ECONNREFUSED 127.0.0.1:50000 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 50000 } My request looks as follows, using

Android - Volley request throws ECONNREFUSED when App is closed

时间秒杀一切 提交于 2020-01-06 14:55:39
问题 I have an alarm manager that runs an intentservice which fetch data from a server every minute and then sends a notification. Problem is when the app is opened i can still get the data but if the app is closed it sends it throws ECONNREFUSED . VOLLEY ERROR: java.util.concurrent.ExecutionException:com.android.volley.NoConnectionError: java.net.ConnectException: failed to connect to samples.openweathermap.org/138.201.197.100 (port 443) AFTER 2500ms: isConnected failed: ECONNREFUSED (Connection

Android ECONNREFUSED (Connection refused)

狂风中的少年 提交于 2019-12-17 20:56:44
问题 I have tried to send data to server with this code from my android application. try { HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost("http://myip/adminlogin.php"); httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpClient.execute(httpPost); HttpEntity entity = response.getEntity(); is = entity.getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"), 8); StringBuilder sb = new

Why is my Web API server refusing to accept calls from Android?

喜欢而已 提交于 2019-12-11 09:19:49
问题 I can access my Web API server from a Windows app without problems. From Android, though, is a different story Why would that be? Is "localhost" the wrong thing to use (in the URL)? Should I use the name of the computer instead? Does the string (passed literally as " http://localhost:28642/api/Departments/GetCount?serialNum=4242 ") need to be verbatimized? What is the difference between a Windows app calling a REST method, and an Android app calling the same REST method, that would cause the

ECONNREFUSED for proxy request from localhost to another localhost

懵懂的女人 提交于 2019-12-11 06:02:59
问题 To begin, I'm new to angular and I'm following a tutorial video step by step. I've been stuck on this issue for nearly 2 weeks and have spent many hours looking for solutions in other similar forums. I realize this is a common error, but after trying a couple dozen or so solutions but finding no success I figure I may as well post my experience and maybe it can shed some light on this problem many of us seem to be having. The Issue The error occurs while following along for the "Angular

ECONNREFUSED errors on UDP sendto

风格不统一 提交于 2019-12-08 06:45:40
问题 I am experiencing some unexplained behavior with an app that is writing UDP data with sendto() to multiple ports (all opened with socket(PF_INET, SOCK_DGRAM, 0) ) for the benefit of a set of client reading processes. These sendto()s occasionally and unpredictably trigger ECONNREFUSED errors. This is happening on a macOS Sierra (10.12) system whose sendto(2) manual page does not even list ECONNREFUSED as a possible error. Interestingly, I have a CentOS7 system (where these errors never occur)

ECONNREFUSED errors on UDP sendto

我怕爱的太早我们不能终老 提交于 2019-12-07 02:28:26
I am experiencing some unexplained behavior with an app that is writing UDP data with sendto() to multiple ports (all opened with socket(PF_INET, SOCK_DGRAM, 0) ) for the benefit of a set of client reading processes. These sendto()s occasionally and unpredictably trigger ECONNREFUSED errors. This is happening on a macOS Sierra (10.12) system whose sendto(2) manual page does not even list ECONNREFUSED as a possible error. Interestingly, I have a CentOS7 system (where these errors never occur) whose sendto(2) manual page references additional sendto() errors documented on the udp(7) manual page,

ECONNREFUSED error for create-react-app and node server

霸气de小男生 提交于 2019-12-04 05:18:26
问题 I'm builing a MERN application with create-react-app (so no custom webpack) and a node server. I'm using nodemon to restart changes on the backend, and the problem is that about half of the time it seems that my front-end tries to render before nodemon can restart the node server, resulting in a ECONNREFUSED error. I can solve the issue my simply refreshing the page, but it's annoying to have to do this repeatedly and I'd like to just figure out what the issue may be. This isn't happening if

Postgresql Ubuntu小小折腾

点点圈 提交于 2019-12-02 22:54:53
ubuntu环境,曾安装postgresql 9.1。 最近个人追风,安装了postgresql 9.3(非升级)。所以,系统上有了两个postgresql。 某个Node.js应用程序,使用了PostgreSQL,在安装了两个PostgreSQL的情况下,运行是良好的。 一时抽风,想到系统上安装了两个,就想删掉旧版本。如何,移除了9.1并删掉了相应文件。 ###悲剧出现了! 应用运行出错,重启应用,报 Error: connect ECONNREFUSED 的错误。在网上搜了下,果然答案大大的有,但最后都汇总为同一个问题,服务器监听了重复的端口。我擦,仔细检查了N遍,重启机器后再运行应用,还是报错。开了一个样例程序,证明了服务器端口是没有被占用的。仔细想了下,需要监听端口的就那么几个服务,挨个检查了遍,最后定位于PostgreSQL。 使用 netstat -ap 命令检查了下端口情况,发现PostgreSQL的端口是5433(默认是5432)。 一下子就明白了过来,PostgreSQL的运行端口号变更了。 由于同时安装了两个PostgreSQL, 所以,两个服务只能监听不同端口。由于前一个已经占用了5432,所以,后面一个只能去占用5433。 来源: oschina 链接: https://my.oschina.net/u/942329/blog/229292

Android ECONNREFUSED (Connection refused)

旧城冷巷雨未停 提交于 2019-11-28 14:02:22
I have tried to send data to server with this code from my android application. try { HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost("http://myip/adminlogin.php"); httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpClient.execute(httpPost); HttpEntity entity = response.getEntity(); is = entity.getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"), 8); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); }