Skip to content
This repository was archived by the owner on Mar 26, 2022. It is now read-only.
This repository was archived by the owner on Mar 26, 2022. It is now read-only.

yum update with cntlm fails #4

Description

@andreicristianpetcu

Hello!
I've configured yum on a CentOS 6.7 to use a CNTLM proxy but it fails. If I set Firefox to use that proxy it works but not yum. Here is the output when I do a yum update.

******* Round 1 C: 5, S: 6 *******!
Reading headers...
HEAD: GET http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock HTTP/1.1
User-Agent                     => urlgrabber/3.9.1 yum/3.2.29
Host                           => mirrorlist.centos.org
Accept                         => */*
Proxy-Connection               => Keep-Alive
NTLM Request:
           Domain: XXXXXX
         Hostname: vagrant
            Flags: 0xA208B205

Sending auth request...
User-Agent                     => urlgrabber/3.9.1 yum/3.2.29
Host                           => mirrorlist.centos.org
Accept                         => */*
Proxy-Connection               => Keep-Alive
Connection                     => Keep-Alive
Proxy-Authorization            => NTLM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Reading auth response...
HEAD: HTTP/1.1 401 Unauthorized
Cache-Control                  => no-cache
Pragma                         => no-cache
WWW-Authenticate               => NTLM
Content-Type                   => text/html; charset=utf-8
Proxy-Connection               => close
Set-Cookie                     => BCSI-CS-9999999999999999=2; Path=/
Connection                     => close
Content-Length                 => 4259
Got 4259 too many bytes.
Proxy signals it's closing the connection.
Proxy closed connection (i=1, closed=1, so_closed=1). Reconnecting...
Sending headers...
User-Agent                     => urlgrabber/3.9.1 yum/3.2.29
Host                           => mirrorlist.centos.org
Accept                         => */*
Proxy-Connection               => Keep-Alive
Connection                     => Keep-Alive
No body.

******* Round 2 C: 5, S: 6 *******!
Reading headers...
HEAD: HTTP/1.1 401 Unauthorized
Cache-Control                  => no-cache
Pragma                         => no-cache
WWW-Authenticate               => NEGOTIATE
WWW-Authenticate               => NTLM
Content-Type                   => text/html; charset=utf-8
Proxy-Connection               => close
Set-Cookie                     => BCSI-CS-9999999999999999=2; Path=/
Connection                     => close
Content-Length                 => 4259
Sending headers...
Body included. Lenght: 4259
data_send: read 2048 of 2048 / 2048 of 4259 (errno = ok)
data_send: fds 5:6 warning -999 (connection closed)
Could not send whole body

Thread finished.
Joining thread 3077966704; rc: 0

This is my cntlm.ini

Username    xxxxxxxx
Domain      xxxxxx
PassLM          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PassNT          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PassNTLMv2      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Proxy       myproxy.internal:80
NoProxy     localhost, 127.0.0.*
Listen      127.0.0.1:3128
Gateway yes

This is what I put in my /etc/yum.cfg

.....
proxy=http://127.0.0.1:3128

And this is the output of yum update

yum update
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock error was
14: PYCURL ERROR 22 - "The requested URL returned error: 401 Unauthorized"
Error: Cannot find a valid baseurl for repo: base

What am I doing wrong? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions