Skip to content

always get error (SocksClientError: connect ECONNREFUSED 127.0.0.1:9050) #60

Open

Description

@Pavelhack

after installing and running the module, I get an error from a function of one of the dependencies. (socksclient.js: 371: 32). Maybe it dependence(module"socksclient") did`t work correct now?

Activity

  1. talmobi commented on Oct 18, 2020

    @talmobi
    Owner

    Can you see the full error log where it says:

    (node:95146) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:9050
    
    
     - Are you running `tor`?
    See easy guide here (OSX, Linux, Windows):
    https://github.com/talmobi/tor-request#requirements
    
     Quickfixes:
      OSX: `brew install tor && tor`         # installs and runs tor
      Debian/Ubuntu: `apt-get install tor`   # should auto run as daemon after install
      Windows: download the Windows Expert Bundle from `https://www.torproject.org/download/tor/`
               Unzip and run tor.exe inside the Tor/ directory.
    

    See the: https://github.com/talmobi/tor-request#requirements

  2. talmobi commented on Oct 19, 2020

    @talmobi
    Owner

    see related issues: #3 #40 #54

    Basically you have most likely forgot to run your tor client before using tor-request

  3. DhananjayPurohit commented on May 23, 2023

    @DhananjayPurohit

    I am getting the same error even when my tor is running:-

    netstat -ano | find "9060"
      TCP    127.0.0.1:9060         0.0.0.0:0              LISTENING       7804
    
    tasklist /fi "pid eq 7804"
    Image Name                     PID Session Name        Session#    Mem Usage
    ========================= ======== ================ =========== ============
    tor.exe                       7804 Console                    1     40,648 K
    

    OS:- Windows 11

    Here's the link to my torrc file:-
    https://gist.github.com/DhananjayPurohit/40d377e67e5ac7bf5f0f3b86717fdd77

  4. DhananjayPurohit commented on May 26, 2023

    @DhananjayPurohit
  5. talmobi commented on May 26, 2023

    @talmobi
    Owner

    @DhananjayPurohit tor is usually running on port 9050 by default -- but your seems to be running on port 9060 -- try setting the port specifically to 9060 using

    var tr = require('tor-request');
    var ipaddress = "127.0.0.1"
    var port = 9060
    tr.setTorAddress(ipaddress, port); // "127.0.0.1" and 9050 by default
    
  6. DhananjayPurohit commented on May 31, 2023

    @DhananjayPurohit

    I ensured the port to be 9060 still getting the error, Is there any tool or process you can recommend for checking what's wrong with my SOCKS port?

  7. talmobi commented on Jun 5, 2023

    @talmobi
    Owner

    @DhananjayPurohit maybe there is wrong with library configuring the port -- try running your tor on port 9050 instead by changing line 18 in your torrc and trying again.

    you can check which ports are active/in use using:

    lsof -i -P -n | grep LISTEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions