I am trying to test my REST API through postman and I am getting the following error:
This is my first REST API that I have written and I am very new to postman so not sure what am I doing wrong. Below is my code that I am trying to call in postman with this URL. I am passing two date parameters in the URL
https://localhost:44360/api/RecLoadPrime/insertRecLoadData/?RecStartDate=01/01/2020&RecEndDate=01/02/2020
Below is the code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using RecLoad.DAL;
namespace RecLoad.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class RecLoadPrimeController : ControllerBase
{
[Route("RecLoadPrime/insertRecLoadData/{RecStartDate}/{RecEndDate}")]
[HttpPost]
public void insertRecLoadData(string RecStartDate, string RecEndDate)
{
RecLoadDataProvider dataProvider = new RecLoadDataProvider();
dataProvider.InsertData(RecStartDate, RecEndDate);
}
}
}
There is nothing under the other tabs, Authorization, Headers, Body, PreRequest scripts, Test and settings of postman. Below is the screen shot from postman:
when I trying to run the API directly by putting this URL in the browser, I am getting the error saying:
This localhost page can’t be foundNo webpage was found for the web address: https://localhost:44360/api/RecLoadPrime/insertRecLoadData/?RecStartDate=01/01/2020&RecEndDate=01/02/2020
I’m running into the same issue. Even if I try getting all my collections using the Postman API key (https://community.getpostman.com/t/where-do-you-see-your-own-uid-for-collection/3537) I generated I get a ‘connection refused’ response.
Request:
curl https://api.getpostman.com/collections?apikey=XXXXXXXXXXXXXXX/ -v
Response:
Failed to connect to api.getpostman.com port 443: Connection refused
It may be a proxy issue — I did try specifying the proxy IP address and port in Settings and all tried with and without ‘Use System Proxy
Enable this option to allow Postman to use the system’s default proxy configurations’.
I also tried to make the request outside the firewall — I get a more explicit error there:
‘AuthenticationError’.
I’ve copied the API key directly from the Postman Integrations, Existing API Keys page. It currently has a status of ‘Enabled’ and ‘Last Accessed’ of ‘Never Used’. ‘Date Created’ is June 7, 2019.
I’ve ran out of ideas for now. Any thoughts or suggestions are more than welcome!
Thanks for your time
Содержание
- Could not get any response — Error: connect ECONNREFUSED #6205
- Comments
- Error: connect ECONNREFUSED 127.0.0.1:8080 #7483
- Comments
- Getting ‘Error: connect ECONNREFUSED’ while sending the request from Postman and same is working in another machine #4494
- Comments
- App Details:
- WSL2, Error: connect ECONNREFUSED 127.0.0.1:80 with Postman, however cUrl returns HTTP200 #9981
- Comments
- Как решить? «ECONNREFUSED — connection refused by server»
- Первый Метод. Изменение Дефолтного Значения Порта FileZilla
- Второй Метод. Отключение Антивируса/Брандмауэра
- Третий Метод. Изменение Мастера Настройки Сети FileZilla
- Выводы
Could not get any response — Error: connect ECONNREFUSED #6205
Hi, 3 days ago everything worked fine. Now I am getting an error Could not get any response like the screenshots show. Here are the error and settings screenshots.
Any public url is not able to connect. Only localhost works. I reinstalled the Postman to latest version but nothing happened.
Thank you for any help.
The text was updated successfully, but these errors were encountered:
Can you check your OS proxy settings or proxy settings in Postman?
I was having the same issue on Mac Postman, Version 7.0.7 (7.0.7)
Just add a extra slash, that trailing slash is important.
i.e try «node4:9200/search/_search/ «
@shamasis Postman proxy settings are off
@baibhavtripathi Trailing slash does not work.
@camohub can you try making the same call using curl and check? (Use —verbose mode in curl so that we get more details.)
@camohub did you manage to recheck using curl? Another thing that interests me is that can you try enabling “use system proxy”? If your network has a proxy and is defined in OS, then this setting will enable postman to use the same. I’m stressing on proxy because the symptoms you mentioned gives me the feeling that localhost is excluded from proxy and hence is the only endpoint that’s working.
I made a request in PHP. It works. It is curl request. Postman still does not work. Any suggestions? I am not familiar with proxy. Why I need it?
PS: URL of the request looks like node4:9200/search/_search Is it correct? Its the same url as before when it worked.
Still no solution. Any suggestions?
am also having this same issue
As I found out I am behind the proxy server. Is it related to this problem?
@camohub Like I was guessing, proxy seems to be the likely culprit. But you never know! :-p In your proxy setting in Postman App, can you enable using system proxy and then in your system proxy, exclude the domain node (I’m guessing that you will see that localhost is already marked as excluded there and that’s why that is working.)
am also having this same issue
@Westernwells — is it «same» issue. by that I mean, «http://localhost/» works but nothing else on local works? If there is a major variation from that then please file a separate issue.
What means exclude domain node? Proxy settings looks like:
I’m running into the same issue. Even if I try getting all my collections using the Postman API key (https://community.getpostman.com/t/where-do-you-see-your-own-uid-for-collection/3537) I generated I get a ‘connection refused’ response.
Response:
Failed to connect to api.getpostman.com port 443: Connection refused
It may be a proxy issue — I did try specifying the proxy IP address and port in Settings and all tried with and without ‘Use System Proxy
Enable this option to allow Postman to use the system’s default proxy configurations’.
I also tried to make the request outside the firewall — I get a more explicit error there:
I’ve copied the API key directly from the Postman Integrations, Existing API Keys page. It currently has a status of ‘Enabled’ and ‘Last Accessed’ of ‘Never Used’. ‘Date Created’ is June 7, 2019.
I’ve ran out of ideas for now. Any thoughts or suggestions are more than welcome!
Источник
Error: connect ECONNREFUSED 127.0.0.1:8080 #7483
Describe the bug
Could not get any response
Error: connect ECONNREFUSED 127.0.0.1:8080
To Reproduce
Steps to reproduce the behavior:
I created request post with url is http://localhost:8080/api/users
In header,
Request Headers:
Content-Type:»application/javascript»
Accept:»application/json»
In body,
firstName:»Hoa»
lastName:»Le»
email:»lehoa08121998@gmail.com»
password:»lehoa123″
profilePictureUrl:»hoadeptrai.jpg»
platform:»windown»
appVersion:»10″
Error: connect ECONNREFUSED 127.0.0.1:8080
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
App information (please complete the following information):
- App Type [Windown App]
- Postman Version [e.g. 7.9.0]
- Window 10
Additional context
I tried turn off turning off ‘SSL certificate verification’ in Settings > General»
and turn off
Global Proxy Configuration
Use System Proxy
besides, i also create file batch like that
set HTTP_PROXY=
set http_proxy=
set HTTPS_PROXY=
set https_proxy=
START %LOCALAPPDATA%PostmanUpdate.exe —processStart «Postman.exe»
eventually, it didn’t work! can anyone help me please!
The text was updated successfully, but these errors were encountered:
Источник
Getting ‘Error: connect ECONNREFUSED’ while sending the request from Postman and same is working in another machine #4494
App Details:
Postman for Mac
Version 4.11.0
OS X 16.4.0 / x64
The text was updated successfully, but these errors were encountered:
Hi @mohank1986, you seem to be on a pretty old version of Postman. Can you update to the latest (6.0.10 as of now) and see of the problem persists?
Moreover, can you list some differences in both those machines (network-wise, proxies, firewalls etc.) that might help us debug this?
I have installed the latest build(6.0.10) and found the same issue again.
Any update on the above ticket. Same request is working in another machine without changing any proxy settings. We are sending the request behind firewall and tried using both Global Proxy Config and Use System Proxy settings.
With Global Proxy Settings —> We are getting Gateway Timeout
With Use System Proxy settings —> We are getting ‘Could not get any response’ error
@mohank1986 Looks like an issue with proxy setup. Also, try setting «SSL verification» to off.
Closing this issue as we are not able to reproduce this internally and we haven’t seen other users facing the same.
Please feel free to reopen if the issue persists or you can help us with the steps to reproduce this issue.
Got the same issue today. My colleague (next to me) use exactly the same config, no proxy setting, in the same LAN network, and only I got the «Error: connect ECONNREFUSED»
Источник
WSL2, Error: connect ECONNREFUSED 127.0.0.1:80 with Postman, however cUrl returns HTTP200 #9981
Describe the Issue
Using the Postman client under Windows 10, performing a request to an apache webserver under WSL2 returns the following error -> Error: connect ECONNREFUSED 127.0.0.1:80
However, performing the same request using curl in the Powershell terminal returns HTTP 200, which is the expected behaviour under the Postman client.
Steps to Reproduce
Under Windows 10, enable WSL. set to version 2, mount a Ubuntu-20.04 distribution.
Get an apache2 server up and running on the WSL2 distribution, configure a specific vhost, ensure a request returns HTTP 200 from a web browser for instance.
Run the same call under Postman client, then the error is thrown Error: connect ECONNREFUSED 127.0.0.1:80.
Screenshots or Videos
Environment Information
- Platform Type:
- Postman Version: Version 8.5.1 (8.5.1)
- Operating System: Windows 10
Additional Context
- Proxy settings have been disabled in Postman
- Sent request headers have been reduced to the minimum AFAIK
The text was updated successfully, but these errors were encountered:
Источник
Как решить? «ECONNREFUSED — connection refused by server»
Вы тоже столкнулись с ошибкой ECONNREFUSED — connection refused by server в FileZilla? Тогда здорово, что вы нашли это руководство. Я покажу вам три метода, как можно исправить эту ошибку FTP.
Первый Метод. Изменение Дефолтного Значения Порта FileZilla
Причиной ошибки может быть неправильный порт при подключении через FileZilla. В этой ситуации вам просто нужно изменить порт FTP по умолчанию на дефолтный номер порта SFTP. Просто измените 21 на 22 в поле ввода “Port”.
Второй Метод. Отключение Антивируса/Брандмауэра
Иногда эта ошибка может возникать, когда антивирусное программное обеспечение и/или брандмауэр отказывает FileZilla в попытках установить соединение.
В случае, если антивирус или брандмауэр вызывает ECONNREFUSED, вам нужно просто отключить это ПО, а затем снова подключиться. Сначала я покажу вам, как это сделать в macOS:
- Нажмите на иконку “Apple” в верхнем меню. Перейдите в “System Preferences”.
- Найдите раздел настроек “Security & Privacy”.
Перейдите во вкладку “Firewall” и выберите “Turn Off Firewall”.
Если вы используете Windows, выполните следующие действия:
- В строке поиска по Windows введите запрос “Control Panel”.
- Затем перейдите в раздел “System & Security” и найдите “Windows Defender Firewall”.
В меню слева найдите “Turn Windows Defender Firewall on or off”.
Подробней о том, как деактивировать разное антивирусное программное обеспечение можно прочитать здесь (англ).
Если отключение антивируса или брандмауэра не помогло и вы по-прежнему получаете ошибку «ECONNREFUSED — connection refused by server», попробуйте следующий метод.
Третий Метод. Изменение Мастера Настройки Сети FileZilla
Что делать, если предыдущие решения не принесли желаемого результата? Чтобы исправить ошибку, вы также можете попробовать изменить конфигурации сети FileZilla:
- Подключитесь к FTP-клиенту FileZilla, затем перейдите в “Edit” и выберите “Network Configuration Wizard”.
На этом этапе вам необходимо убедиться, что все настройки были выполнены правильно. Нажмите кнопку “Test”, чтобы FileZilla попыталась установить соединение с probe.filezilla-project.org. Программа выполнит несколько простых тестов.
Если тестирование пройдет без сбоев, попробуйте снова подключиться к вашей учетной записи хостинга. В этот раз все должно работать отлично. Если же ошибка ECONNREFUSED все равно не исчезла, обратитесь в службу поддержки вашего хостинга.
Выводы
Вот и все. Это и есть три метода, как исправить ошибку «ECONNREFUSED — connection refused by server». Надеемся, что один из них таки поможет вам решить проблему с FileZilla. Если у вас остались вопросы или вы знаете другие решения, не стесняйтесь оставить комментарий!
Источник
Я создал поток на платформе Mulesoft Anypoint с прослушивателем HTTP и теперь пытаюсь протестировать поток, открывая этот API через почтальона локально.
Ниже сообщения из консоли ошибок
GET http://localhost:8081/test
Error: connect ECONNREFUSED 127.0.0.1:8081
Request Headers
User-Agent: PostmanRuntime/7.28.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 92ca3330-3dd3-4bfc-a183-f3cb4f22f469
Host: localhost:8081
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Немного понял, что некоторые настройки прокси и внесли эти изменения, но все еще не смог решить эту проблему.
2 ответа
Я получил такое же предупреждение от почтальона, позже я обнаружил, что исключаю порт в своих настройках.
Будет неплохо, если вы включите свой код, но вы можете использовать приведенную ниже настройку…
const express = require("express");
const app = express();
const port = process.env.PORT || 3000;
app.post("/users", (req, res) => {
res.send("testing...")
})
app.listen(port, () => {
console.log("Server is running at port ", port);
})
1
Chekwube Alaekwe
5 Июл 2021 в 02:28
При отсутствии исходного файла/моментального снимка нужно обратить внимание на несколько вещей:
-
Убедитесь, что ваш локальный файл конфигурации мула содержит API Auto Discovery и включен, закомментируйте его и повторите попытку. RCA: если эта конфигурация включена, то даже локальный запрос сначала перенаправляется на менеджера API, который не одобряет ваш запрос на подключение. Ps: не забудьте раскомментировать перед фиксацией
-
Убедитесь, что номер порта правильный RCA: иногда указывается другой номер порта
-
Убедитесь, что хост для прослушивателя настроен на localhost RCA: иногда хост установлен другой
-
Проверьте, читается ли слушателем правильный файл конфигурации. RCA: Возможно, в глобальной переменной конфигурации может быть установлено dev вместо локального, поэтому свойства dev считываются, а не локальные.
0
Yogesh Kurane
10 Июл 2021 в 08:31
Моя подсказка такая:
GET http://localhost:*
Error: connect ECONNREFUSED 127.0.0.1:4000
Request Headers
User-Agent: PostmanRuntime/7.26.5
Accept: */*
Postman-Token: *
Host: localhost:4000
Accept-Encoding: gzip, deflate, br
ЭтоНет стартового сервераВ результате сервер должен быть активирован сначала, а когда сервер запускает сервер, его необходимо вызвать:
Подключение базы данных сбой MongonetWorkError: не удалось подключиться к серверу [LocalHost: 27010] при первом подключении [Ошибка: подключить EconRefused 127.0.0.0.1: 2701010
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1138:16) {
name: 'MongoNetworkError',
errorLabels: [Array],
[Symbol(mongoErrorContextSymbol)]: {}
}]
в точке.
at Pool.emit (events.js:311:20)
AT Connection. <NeMous> (F: Vue Vue_ Project Code Gshop-server_final node_modules mongodb-core connection pool.js: 317: 12)
at Object.onceWrapper (events.js:418:26)
at Connection.emit (events.js:311:20)
в сокете. <NeMous> (F: Vue Vue_ Project Code gshop-server_final node_modules mongodb-core connection.js: 246: 50)
at Object.onceWrapper (events.js:418:26)
at Socket.emit (events.js:311:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
name: 'MongoNetworkError',
errorLabels: [ 'TransientTransactionError' ],
[Symbol(mongoErrorContextSymbol)]: {}
}
Done in 8.65s.
Эта проблемаНе начал базу данныхВ результате вам нужно только ввести в поискСлужить,поверниMongoDBПросто откройте его. Я установил, чтобы быть ручным, поэтому мне нужно открыть его вручную после включения оборота
Затем перейдите в тестовый интерфейс и узнайте: