草庐IT

econnrefused

全部标签

node.js - 来自 Selenium : UnhandledPromiseRejectionWarning: Error: ECONNREFUSED connect ECONNREFUSED 的错误

我是node.js和Selenium的新手,所以如果我没有立即提供所需的所有详细信息,请多多包涵。这是我想在FF中运行的非常简单的测试(我在这里发现了很多这样的问题,但它们指的是Chrome):constwebdriver=require('selenium-webdriver');constbuilder=newwebdriver.Builder();builder.forBrowser('firefox');constdriver=builder.build();driver.get('https://google.com');driver.quit();这是我不断收到的错误:(n

javascript - node.js 错误 : connect ECONNREFUSED; response from server

这个小程序有问题:varhttp=require("http");varrequest=http.request({hostname:"localhost",port:8000,path:"/",method:"GET"},function(response){varstatusCode=response.statusCode;varheaders=response.headers;varstatusLine="HTTP/"+response.httpVersion+""+statusCode+""+http.STATUS_CODES[statusCode];console.log(s

mysql - 连接 ECONNREFUSED - Node js , sql

我在js文件中有下一段代码:varmysql=require('mysql');varTEST_DATABASE='nodejs_mysql_test';varTEST_TABLE='test';varclient=mysql.createClient({user:'root',password:'root',});client.query('CREATEDATABASE'+TEST_DATABASE,function(err){if(err&&err.number!=mysql.ERROR_DB_CREATE_EXISTS){throwerr;}});但我收到此错误:node.js:

node.js - npm 错误!错误 : connect ECONNREFUSED when trying to update the npm

我正在尝试使用以下命令更新npm(Node包管理器):npminstallnpm@latest-g但我在命令提示符中收到以下错误:npmERR!Windows_NT6.1.7601npmERR!argv"C:\\ProgramFiles\\nodejs\\node.exe""C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js""install""npm@latest""-g"npmERR!nodev6.9.5npmERR!npmv3.10.10npmERR!codeECONNREFUSEDnpmERR!errnoEC

node.js - react 代理错误 : Could not proxy request/api/from localhost:3000 to http://localhost:8000 (ECONNREFUSED)

我有一个使用jwt向Django后端进行身份验证的React前端。后端工作正常,使用djangoView连接得很好,但是当我尝试代理来自React的请求时,它给了我一个ConnectionRefused错误。Proxyerror:Couldnotproxyrequest/api/auth/token/obtain/fromlocalhost:3000tohttp://localhost:8000(ECONNREFUSED).连接到http://localhost:8000/api/auth/token/obtain/工作正常。而且用axios发送POST请求也能正常工作,返回token

mysql - Node.js MySQL - 错误 : connect ECONNREFUSED

我使用Node.js服务器端。我在本地主机上尝试了我的代码,一切正常。我购买了一台服务器并在其上安装了Apache和node.js并在那里测试我的Web应用程序。我正确地将MySQL连接配置从localhost更改为服务器配置。我使用此配置测试我的Web应用程序:varmysql=require('mysql');varmysqlConnection;functionnew_mysqlConnection(){mysqlConnection=mysql.createConnection({host:'myurl.at',user:'myusername',database:'mydat

node.js - 使用 http.request 在 node.js 中捕获 ECONNREFUSED?

我试图在node.js中使用HTTP客户端时捕获ECONNREFUSED错误。我提出这样的要求:varhttp=require('http');varoptions={host:'localhost',port:'3301',path:'/',method:'GET'};http.request(options).on('response',function(res){//dosomestuff});我不知道如何捕捉这个错误:Error:connectECONNREFUSEDaterrnoException(net.js:614:11)atObject.afterConnect[aso

http - node.js 的 ECONNREFUSED 错误在其他客户端中不会发生

我正在使用node.js客户端发出http请求,但收到ECONNREFUSED错误。当我使用浏览器或curl(1)发出看似相同的请求时,它工作得很好这是Node请求:varoptions={host:'localhost',port:8080,path:'/explorers/1.0/agegroup',method:'GET'};varreq=http.request(options,function(res){res.setEncoding('utf8');res.on('data',function(chunk){console.log('BODY:'+chunk);});});

sql-server - Node.js MSSQL tedius ConnectionError : Failed to connect to localhost:1433 - connect ECONNREFUSED

我正在尝试使用带有mssql的NodeJS连接到MSSQL2012连接接口(interface)。尝试连接时出现以下错误:{[ConnectionError:Failedtoconnecttolocalhost:1433-connectECONNREFUSED]name:'ConnectionError',message:'Failedtoconncettolocalhost:1433-connectECONNREFUSED',code:'ESOCKET'}关于如何解决这个问题的任何想法? 最佳答案 解决方案是启用默认禁用的TCP连

javascript - Node.js 错误 : connect ECONNREFUSED

我是node新手,在一个简单的教程中遇到了这个错误。我在OSX10.8.2上从CodeRunner和终端尝试这个。我也尝试将我的模块放在node_modules文件夹中。我可以说这是某种连接问题,但我不知道为什么?events.js:71throwarguments[1];//Unhandled'error'event^Error:connectECONNREFUSEDaterrnoException(net.js:770:11)atObject.afterConnect[asoncomplete](net.js:761:19)app.js:varmakeRequest=require