如何判断cntlm是否正在运行?

时间:2014-07-03 00:16:11

标签: proxy

与此问题相关here

如何判断cntlm是否正在运行?我已经尝试过任务管理器,即使在按下Start Cntlm Authentication Proxy

之后也看不到它在运行

背景
尝试进行npm安装并获取npm ERR! Error: connect ECONNREFUSED 我很确定我的cntlm设置正确,因为它在

之前工作

2 个答案:

答案 0 :(得分:2)

CNTLM is a service! so you have to open services.msc(for windows) and check if service is running or not! Always use this way to start server instead of starting from start menu.

TIP: if you try to start from your windows start menu you, that command window would disappear immediately so you can not see what error is there.Just go to that folder and open command prompt(keep pressing shift key and then right click gives you option to open command prompt at that folder.) and execute that exe(the one you see at start menu start cntlm server). Now you will see if service started successfully or not!

If you want to check it is working or not,You can check simply with the help of firefox!

  1. GO to Preferences >> Advanced >> Network >> Connection >> settings >> select Manual proxy settings
  2. put host as localhost and port as 3128 . (the one which you set inside cntlm config file as listening port)
  3. Check if you want browse internet inside firefox or not! if it says proxy server unreachable or refusing connections, you got problem and if you can browse internet then your cntlm is working ok.

答案 1 :(得分:1)

如果您需要从命令行检查,请尝试以下操作:

sc query cntlm

如果CNTLM正在运行,则此命令应返回以下内容:

SERVICE_NAME: cntlm
    TYPE               : 10  WIN32_OWN_PROCESS
    STATE              : 4  RUNNING
                            (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
    WIN32_EXIT_CODE    : 0  (0x0)
    SERVICE_EXIT_CODE  : 0  (0x0)
    CHECKPOINT         : 0x0
    WAIT_HINT          : 0x0

如果停止,结果将如下所示:

SERVICE_NAME: cntlm
    TYPE               : 10  WIN32_OWN_PROCESS
    STATE              : 1  STOPPED
    WIN32_EXIT_CODE    : 0  (0x0)
    SERVICE_EXIT_CODE  : 0  (0x0)
    CHECKPOINT         : 0x0
    WAIT_HINT          : 0x0