Bug 8329

Summary: Fetcher error: You must specify the destination port correctly.
Product: [Build System, Metadata & Runtime] BitBake Reporter: Michael Wood <michael.g.wood>
Component: bitbakeAssignee: Juro Bystricky <juro.bystricky>
Status: VERIFIED NOTABUG QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium CC: bluelightning, bogdanx.a.voiculescu, poky.bs.watcher, poky.watcher, ross.burton
Version: unspecified   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Michael Wood 2015-09-18 15:14:32 UTC
In master I currently can't complete a build of core-image-base when using proxies, I get the following:

ERROR: Fetcher failure: Fetch command failed with exit code 128, output:
ERROR: You must specify the destination port correctly.
usage: connect [-dnhst45] [-p local-port][-R resolve] [-w timeout] 
          [-H proxy-server[:port]] [-S [user@]socks-server[:port]] 
          [-T proxy-server[:port]]
          [-c telnet-proxy-command]
          host port
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ERROR: Function failed: Fetcher failure for URL: 'git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/michael/poky/build/tmp/work/x86_64-linux/prelink-native/1.0+gitAUTOINC+cdee5a4dd2-r0/temp/log.do_fetch.12940
ERROR: Task 152 (virtual:native:/home/michael/poky/meta/recipes-devtools/prelink/prelink_git.bb, do_fetch) failed with exit code '1'

0: linux-yocto-4.1.6+gitAUTOINC+429f9e2ff0_59b8c4f5e8-r0 do_fetch (pid 30850)

I have an http_proxy, socks_proxy, SSH_SOCKS_SERVER, GIT_PROXY_COMMAND=/usr/bin/socks_connect all set in my environment.

I tried this under current fido and this error does not occur. My poky git master HEAD is at 5b4e380b9b4335f4607d78d97345bbbda4c66e0e

os-release:
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"


Package: connect-proxy
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 88
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1.101-1
Comment 1 Richard Purdie 2015-09-24 14:41:04 UTC
Setting an invalid revision will force the it to fetch from the git repo and allow a good test of this avoding mirror tarballs which is why I think fido might work.
Comment 2 Ross Burton 2015-09-24 14:42:32 UTC
FWIW some fixes for oe-git-proxy landed in oe-core master yesterday if you're using that.
Comment 3 Juro Bystricky 2015-09-24 21:17:48 UTC
You are using socks_connect, not oe-git-proxy. 

Can you try to reproduce the problem with oe-git-proxy?


place <..>/poky/scripts/oe-git-proxy somewhere in your PATH.

Set environment (your actual proxy may be different)

GIT_PROXY_COMMAND=oe-git-proxy
ALL_PROXY=socks://proxy-socks.jf.intel.com:1080/ 

And then try bitbake core-image-base.
Comment 4 Juro Bystricky 2015-09-29 01:33:12 UTC
I also tried the following (Ubuntu) :

1. Install package connect-proxy

2. Created a file "git_connect_sockets" in /usr/local/bin:

#!/bin/bash
connect-proxy -S http://proxy-us.intel.com:1080 $@  

3. Set environment variable:
GIT_PROXY_COMMAND=git_connect_sockets


4. git clone git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink 

No problems.


So I think the problem is in /usr/bin/socks_connect. Can you provide more details?
Comment 5 Paul Eggleton 2015-09-30 11:23:19 UTC
So I fixed this - the problem was the socks_connect script was trying to use a variable that was being filtered out of the environment by bitbake.

I did try to use the oe-git-proxy script (also setting ALL_PROXY) but unfortunately did not manage to get it to work - our proxy always refused the connection. I did have it working fine on another machine but I don't have access to that at the moment to compare to.
Comment 6 Juro Bystricky 2015-09-30 16:14:32 UTC
(In reply to comment #5)
> So I fixed this - the problem was the socks_connect script was trying to use
> a variable that was being filtered out of the environment by bitbake.
> 
> I did try to use the oe-git-proxy script (also setting ALL_PROXY) but
> unfortunately did not manage to get it to work - our proxy always refused
> the connection. I did have it working fine on another machine but I don't
> have access to that at the moment to compare to.

Great, problem solved. I am going to set the status to RESOLVED/NOTABUG
Comment 7 Bogdan Alexandru Voiculescu 2015-10-27 11:47:54 UTC
I confirm this is not a bug; still there are some issues with the oe-git-proxy setup. I cannot make it work. I will investigate this separately and fill a bug if is the case.