Repo Upload failed with connection refused

773 views
Skip to first unread message

rajesh boyapati

unread,
Sep 11, 2011, 6:44:02 PM9/11/11
to Repo and Gerrit Discussion
Hi,

I am getting the following error while doing repo upload. But "git
push" is working fine.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
abc@abc-laptop:~/rowboat/build$ repo --trace upload .

: unpickle /home/abc/rowboat/.repo/manifests.git/config
: unpickle /home/abc/.gitconfig
: load refs /home/abc/rowboat/.repo/projects/build.git
: unpickle /home/abc/rowboat/.repo/projects/build.git/config
: export GIT_DIR=/home/abc/rowboat/.repo/projects/build.git
: git rev-list --abbrev=8 --abbrev-commit --pretty=oneline --reverse --
date-order ^refs/remotes/ti-android/ti-pdt-master refs/heads/test --
1>| 2>|
: git log --pretty=format:%cd -n 1 refs/heads/test -- 1>| 2>|
Upload project build/:
branch test ( 1 commit, Sun Sep 11 16:25:57 2011 -0500):
ff23be17 checking repo upload
to abc-laptop (y/n)? y

: cd /home/abc/rowboat/build
: git update-index -q --unmerged --ignore-missing --refresh 1>| 2>|
: git diff-index -z --cached HEAD 1>| 2>|
: git diff-files -z 1>| 2>|
: git ls-files -z --others --exclude-standard 1>| 2>|

----------------------------------------------------------------------
[FAILED] build/ test
(abc-laptop: Connection refused)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Then I tried one command to verify whether repo is using correct port
or not via ssh

abc@abc-laptop:~/rowboat/build$ curl http://abc-laptop:8080/ssh_info
abc-laptop 29418

The ssh address and port are showing correct, but repo upload is not
working.

My review attribute in manifest.xml file looks like:
<remote name="ti-android"
fetch="ssh://abc-laptop:29418"
review="abc-laptop" />
My gerrit.config file has sshd attribute as:
[sshd]
listenAddress = *:29418

Can you give me a solution on how to resolve this error.

Thanks,
Rajesh.

Magnus Bäck

unread,
Sep 12, 2011, 2:10:05 AM9/12/11
to Repo and Gerrit Discussion
On Monday, September 12, 2011 at 00:44 CEST,
rajesh boyapati <boyapat...@gmail.com> wrote:

> I am getting the following error while doing repo upload. But "git
> push" is working fine.
>
> abc@abc-laptop:~/rowboat/build$ repo --trace upload .

[...]

> : git ls-files -z --others --exclude-standard 1>| 2>|
>
> ----------------------------------------------------------------------
> [FAILED] build/ test
> (abc-laptop: Connection refused)

Weird, I'd expect the --trace option to get Repo to show the exact push
command.

> Then I tried one command to verify whether repo is using correct port
> or not via ssh
>
> abc@abc-laptop:~/rowboat/build$ curl http://abc-laptop:8080/ssh_info
> abc-laptop 29418
>
> The ssh address and port are showing correct, but repo upload is not
> working.
>
> My review attribute in manifest.xml file looks like:
> <remote name="ti-android"
> fetch="ssh://abc-laptop:29418"
> review="abc-laptop" />

That should be abc-laptop:8080, otherwise the request will default to
fetching /ssh_info from the standard HTTP port (80). What's the result
of "curl http://abc-laptop/ssh_info"?

To find out exactly what goes on in cases like this, I find strace quite
useful.

[...]

--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Anatol Pomazau

unread,
Sep 12, 2011, 2:59:27 AM9/12/11
to rajesh boyapati, Repo and Gerrit Discussion
Hi, Rajesh

Do you have HTTP proxy? If yes then you hit a repo issue. Repo tool does not work over proxy. I filed a patch to Gerrit at (already dead) kernel.org that adds proxy support for "repo upload".

Shawn, Magnus, any chance to accept that patch to stable branch?

rajesh boyapati

unread,
Sep 12, 2011, 10:29:59 AM9/12/11
to Repo and Gerrit Discussion
Hi,

I changed the review attribute in manifest file to abc-laptop:8080,
but still getting the same error(connection refused).
Now my manifest file looks like:
<remote name="ti-android"
fetch="ssh://abc-laptop:29418"
review="abc-laptop:8080" />

The result of "curl http://abc-laptop:8080/ssh_info" gives like this:
abc-laptop 29418

The result of "curl http://abc-laptop/ssh_info" gives like this: curl:
(7) couldn't connect to host

Thanks,
Rajesh.

On Sep 12, 1:10 am, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Monday, September 12, 2011 at 00:44 CEST,
>      rajesh boyapati <boyapatisraj...@gmail.com> wrote:
>
> > I am getting the following error while doingrepoupload. But "git
> > push" is working fine.
>
> > abc@abc-laptop:~/rowboat/build$repo--traceupload.
>
> [...]
>
> > : git ls-files -z --others --exclude-standard 1>| 2>|
>
> > ----------------------------------------------------------------------
> > [FAILED] build/          test
> >        (abc-laptop:Connectionrefused)
>
> Weird, I'd expect the --trace option to getRepoto show the exact push
> command.
>
> > Then I tried one command  to verify whetherrepois using correct port
> > or not via ssh
>
> > abc@abc-laptop:~/rowboat/build$ curlhttp://abc-laptop:8080/ssh_info
> > abc-laptop 29418
>
> > The ssh address and port are showing correct, butrepouploadis not
> > working.
>
> > My review attribute in manifest.xml file looks like:
> > <remote  name="ti-android"
> >            fetch="ssh://abc-laptop:29418"
> >           review="abc-laptop" />
>
> That should be abc-laptop:8080, otherwise the request will default to
> fetching /ssh_info from the standard HTTP port (80). What's the result
> of "curlhttp://abc-laptop/ssh_info"?

rajesh boyapati

unread,
Sep 12, 2011, 10:31:50 AM9/12/11
to Repo and Gerrit Discussion
Hi,

I don't have any HTTP proxy issue.

Thanks,
Rajesh.


On Sep 12, 1:59 am, Anatol Pomazau <ana...@google.com> wrote:
> Hi, Rajesh
>
> On Sun, Sep 11, 2011 at 3:44 PM, rajesh boyapati
> <boyapatisraj...@gmail.com>wrote:
> > abc@abc-laptop:~/rowboat/build$ curlhttp://abc-laptop:8080/ssh_info

Magnus Bäck

unread,
Sep 12, 2011, 10:37:26 AM9/12/11
to Repo and Gerrit Discussion
On Monday, September 12, 2011 at 16:29 CEST,
rajesh boyapati <boyapat...@gmail.com> wrote:

> I changed the review attribute in manifest file to abc-laptop:8080,
> but still getting the same error(connection refused).
> Now my manifest file looks like:
> <remote name="ti-android"
> fetch="ssh://abc-laptop:29418"
> review="abc-laptop:8080" />
>
> The result of "curl http://abc-laptop:8080/ssh_info" gives like this:
> abc-laptop 29418
>
> The result of "curl http://abc-laptop/ssh_info" gives like this: curl:
> (7) couldn't connect to host

Okay, so to which URL is Repo attempting to push? Use strace.

rajesh boyapati

unread,
Sep 12, 2011, 1:26:01 PM9/12/11
to Repo and Gerrit Discussion
Hi Magnus,

Repo is attempting to push to "abc-laptop".
Here is the output of command after changing the review attribute to
"abc-laptop:8080"

abc@abc-laptop:~/rowboat/build$ repo --trace upload .

: unpickle /home/abc/rowboat/.repo/manifests.git/config
: unpickle /home/abc/.gitconfig
: load refs /home/abc/rowboat/.repo/projects/build.git
: unpickle /home/abc/rowboat/.repo/projects/build.git/config
: export GIT_DIR=/home/abc/rowboat/.repo/projects/build.git
: git rev-list --abbrev=8 --abbrev-commit --pretty=oneline --reverse
--
date-order ^refs/remotes/ti-android/ti-pdt-master refs/heads/test --
1>| 2>|
: git log --pretty=format:%cd -n 1 refs/heads/test -- 1>| 2>|
Upload project build/:
branch test ( 1 commit, Sun Sep 11 16:25:57 2011 -0500):
ff23be17 checking repo upload
to abc-laptop (y/n)? y

: cd /home/abc/rowboat/build
: git update-index -q --unmerged --ignore-missing --refresh 1>| 2>|
: git diff-index -z --cached HEAD 1>| 2>|
: git diff-files -z 1>| 2>|
: git ls-files -z --others --exclude-standard 1>| 2>|

----------------------------------------------------------------------
[FAILED] build/ test
(abc-laptop: Connection refused)


Thanks,
Rajesh.


On Sep 12, 9:37 am, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Monday, September 12, 2011 at 16:29 CEST,
>      rajesh boyapati <boyapatisraj...@gmail.com> wrote:
>
> > I changed the review attribute in manifest file to abc-laptop:8080,
> > but still getting the same error(connection refused).
> > Now my manifest file looks like:
> > <remote  name="ti-android"
> >              fetch="ssh://abc-laptop:29418"
> >              review="abc-laptop:8080" />
>
> > The result of "curlhttp://abc-laptop:8080/ssh_info" gives like this:
> > abc-laptop 29418
>
> > The result of "curlhttp://abc-laptop/ssh_info" gives like this: curl:

Magnus Bäck

unread,
Sep 12, 2011, 1:40:04 PM9/12/11
to Repo and Gerrit Discussion
On Monday, September 12, 2011 at 19:26 CEST,
rajesh boyapati <boyapat...@gmail.com> wrote:

> Repo is attempting to push to "abc-laptop".
> Here is the output of command after changing the review attribute to
> "abc-laptop:8080"
>
> abc@abc-laptop:~/rowboat/build$ repo --trace upload .

As I said, use strace or a similar tool to find out what *really*
goes on.

[...]

rajesh boyapati

unread,
Sep 12, 2011, 10:04:01 PM9/12/11
to Repo and Gerrit Discussion
Hi Magnus,

I used the command "strace repo --trace upload ."
And got the output like this:

write(1, "Upload project build/:\n", 23Upload project build/:
) = 23
write(1, " branch test ( 2 commits, Mon S"..., 60 branch test ( 2
commits, Mon Sep 12 20:08:13 2011 -0500):
) = 60
write(1, " ff23be17 checking repo "..., 39 ff23be17
checking repo upload
) = 39
write(1, " dd28988b checking repo "..., 39 dd28988b
checking repo upload
) = 39
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7455000
write(1, "to abc-laptop (y/n)? ", 23to abc-laptop (y/n)? ) = 23
read(0, y
"y\n", 1024) = 2
write(2, "\n: cd /home/abc/rowboat/build\n"..., 99
: cd /home/abc/rowboat/build
: git update-index -q --unmerged --ignore-missing --refresh 1>| 2>|) =
99
write(2, "\n", 1
) = 1
pipe([3, 4]) = 0
pipe([5, 6]) = 0
pipe([7, 8]) = 0
fcntl64(8, F_GETFD) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0xb778a728) = 3329
close(8) = 0
close(4) = 0
close(6) = 0
mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7354000
read(7, "", 1048576) = 0
mremap(0xb7354000, 1052672, 4096, MREMAP_MAYMOVE) = 0xb7354000
close(7) = 0
munmap(0xb7354000, 4096) = 0
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(3, 0, 0xbfc7a6dc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fcntl64(5, F_GETFL) = 0 (flags O_RDONLY)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(5, 0, 0xbfc7a6dc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(3, 0, 0xbfc7b110, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(3, "", 8192) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
close(3) = 0
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(5, 0, 0xbfc7b110, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(5, "", 8192) = 0
close(5) = 0
waitpid(3329, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 3329
stat64("/home/abc/rowboat/build/.git/rebase-apply", 0xbfc7b20c) = -1
ENOENT (No such file or directory)
stat64("/home/abc/rowboat/build/.git/rebase-merge", 0xbfc7b20c) = -1
ENOENT (No such file or directory)
stat64("/home/abc/rowboat/build/.dotest", 0xbfc7b20c) = -1 ENOENT (No
such file or directory)
write(2, ": git diff-index -z --cached HEA"..., 41: git diff-index -z
--cached HEAD 1>| 2>|) = 41
write(2, "\n", 1
) = 1
pipe([3, 4]) = 0
pipe([5, 6]) = 0
pipe([7, 8]) = 0
fcntl64(8, F_GETFD) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0xb778a728) = 3330
close(8) = 0
close(4) = 0
close(6) = 0
mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7354000
read(7, "", 1048576) = 0
mremap(0xb7354000, 1052672, 4096, MREMAP_MAYMOVE) = 0xb7354000
close(7) = 0
munmap(0xb7354000, 4096) = 0
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(3, 0, 0xbfc7a6dc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fcntl64(5, F_GETFL) = 0 (flags O_RDONLY)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(5, 0, 0xbfc7a6dc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(3, 0, 0xbfc7b1f0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(3, "", 8192) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(3, 0, 0xbfc7b110, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(3, "", 8192) = 0
close(3) = 0
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(5, 0, 0xbfc7b110, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(5, "", 8192) = 0
close(5) = 0
waitpid(3330, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 3330
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, ": git diff-files -z 1>| 2>|", 27: git diff-files -z 1>| 2>|)
= 27
write(2, "\n", 1
) = 1
pipe([3, 4]) = 0
pipe([5, 6]) = 0
pipe([7, 8]) = 0
fcntl64(8, F_GETFD) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0xb778a728) = 3331
close(8) = 0
close(4) = 0
close(6) = 0
mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7354000
read(7, "", 1048576) = 0
mremap(0xb7354000, 1052672, 4096, MREMAP_MAYMOVE) = 0xb7354000
close(7) = 0
munmap(0xb7354000, 4096) = 0
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(3, 0, 0xbfc7a6dc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fcntl64(5, F_GETFL) = 0 (flags O_RDONLY)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(5, 0, 0xbfc7a6dc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(3, 0, 0xbfc7b1f0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(3, "", 8192) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(3, 0, 0xbfc7b110, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(3, "", 8192) = 0
close(3) = 0
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(5, 0, 0xbfc7b110, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(5, "", 8192) = 0
close(5) = 0
waitpid(3331, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 3331
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, ": git ls-files -z --others --exc"..., 53: git ls-files -z --
others --exclude-standard 1>| 2>|) = 53
write(2, "\n", 1
) = 1
pipe([3, 4]) = 0
pipe([5, 6]) = 0
pipe([7, 8]) = 0
fcntl64(8, F_GETFD) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0xb778a728) = 3332
close(8) = 0
close(4) = 0
close(6) = 0
mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7354000
read(7, "", 1048576) = 0
mremap(0xb7354000, 1052672, 4096, MREMAP_MAYMOVE) = 0xb7354000
close(7) = 0
munmap(0xb7354000, 4096) = 0
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(3, 0, 0xbfc7a76c, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fcntl64(5, F_GETFL) = 0 (flags O_RDONLY)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
_llseek(5, 0, 0xbfc7a76c, SEEK_CUR) = -1 ESPIPE (Illegal seek)
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
munmap(0xb7454000, 4096) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(3, 0, 0xbfc7b1a0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(3, "", 8192) = 0
close(3) = 0
fstat64(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
_llseek(5, 0, 0xbfc7b1a0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
read(5, "", 8192) = 0
close(5) = 0
waitpid(3332, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 3332
--- SIGCHLD (Child exited) @ 0 (0) ---
socket(PF_NETLINK, SOCK_RAW, 0) = 3
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=3326, groups=00000000},
[12]) = 0
time(NULL) = 1315877524
sendto(3, "\24\0\0\0\26\0\1\3\224\262nN\0\0\0\0\0\0\0\0", 20, 0,
{sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0\224\262nN\376\f
\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}],
msg_controllen=0, msg_flags=0}, 0) = 108
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000}, msg_iov(1)=[{"@\0\0\0\24\0\2\0\224\262nN\376\f\0\0\n
\200\200\376\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0,
msg_flags=0}, 0) = 128
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\224\262nN\376\f
\0\0\0\0\0\0\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0,
msg_flags=0}, 0) = 20
close(3) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=513, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 513
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7454000, 4096) = 0
open("/etc/host.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
read(3, "# The \"order\" line is only used "..., 4096) = 92
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7454000, 4096) = 0
futex(0xec2b44, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/resolv.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=91, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
read(3, "# Generated by NetworkManager\ndo"..., 4096) = 91
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7454000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=66174, ...}) = 0
mmap2(NULL, 66174, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7444000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i686/cmov/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0
\32\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=42572, ...}) = 0
mmap2(NULL, 45772, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x123000
mmap2(0x12d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x9) = 0x12d000
close(3) = 0
mprotect(0x12d000, 4096, PROT_READ) = 0
munmap(0xb7444000, 66174) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
fstat64(3, {st_mode=S_IFREG|0644, st_size=258, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7454000
read(3, "127.0.0.1\tlocalhost\n127.0.1.1\tsr"..., 4096) = 258
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7454000, 4096) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("127.0.1.1")}, 16) = -1 ECONNREFUSED (Connection
refused)
close(3) = 0
write(2, "\n", 1
) = 1
write(2, "--------------------------------"...,
70----------------------------------------------------------------------)
= 70
write(2, "\n", 1
) = 1
write(2, "[FAILED] build/ test "..., 82[FAILED]
build/ test
(abc-laptop: Connection refused)) = 82
write(2, "\n", 1
) = 1
write(2, "\n", 1
) = 1
rt_sigaction(SIGINT, {SIG_DFL, [], 0}, {0x810fde0, [], 0}, 8) = 0
exit_group(1) = ?


Thanks,
Rajesh.


On Sep 12, 12:40 pm, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Monday, September 12, 2011 at 19:26 CEST,
>      rajesh boyapati <boyapatisraj...@gmail.com> wrote:
>
> >Repois attempting to push to "abc-laptop".

Magnus Bäck

unread,
Sep 13, 2011, 1:40:41 AM9/13/11
to Repo and Gerrit Discussion
On Tuesday, September 13, 2011 at 04:04 CEST,
rajesh boyapati <boyapat...@gmail.com> wrote:

> I used the command "strace repo --trace upload ."
> And got the output like this:

[...]

> connect(3, {sa_family=AF_INET, sin_port=htons(80),
> sin_addr=inet_addr("127.0.1.1")}, 16) = -1 ECONNREFUSED (Connection
> refused)

There we go. Git is connecting to 127.0.0.1 since that's what abc-laptop
resolves to, presumably because you have

127.0.0.1 abc-laptop localhost

in your /etc/hosts. Now, this shouldn't be a problem since Gerrit should
listen on all interfaces.

However, on the connect() line we can see that it's still connecting to
port 80 and not 8080 where your /ssh_info resource can be found. In a
previous email you claim that your manifest contains

<remote name="ti-android"
fetch="ssh://abc-laptop:29418"
review="abc-laptop:8080" />

which should make Repo connect to port 8080, *if* the git you're pushing
to actually uses the ti-android remote. Does it?

rajesh boyapati

unread,
Sep 14, 2011, 11:57:41 AM9/14/11
to Repo and Gerrit Discussion
Hi Magnus,

Thanks, I resolved that issue.
Initially, I added the port number to review attribute in manifest
file, but didn't committed the change.
So, later when I committed the change, it works.

Now, I have one more question:
If my gerrit web URL starts with "https" , how my review attribute in
manifest file should be like:
Ex:
If my Gerrit web URL is like: https://gerrit.abc.com:8090
Then my review attribute should be
a) <remote name="ti-android"
fetch="ssh://gerrit.abc.com:29418"
review="gerrit.abc.com:8090" />

(OR)
b) <remote name="ti-android"
fetch="ssh://gerrit.abc.com:29418"
review="https://gerrit.abc.com:8090" />

--> If I set Proxy variables as environment variables, repo upload is
not working in both the cases(a & b)..giving errors like
"AttributeError: 'HTTPError' object has no attribute 'reason'....in
(case(a))" and "raise UploadError('%s: %s' % (self.review,
e.reason[1])) IndexError: tuple index out of range.....in
(case(b))".

-->If I unset the Proxy variables, only case(b) is working and case(a)
is giving Error like "raise BadStatusLine(line)
httplib.BadStatusLine "

Do I need to make any changes in gerrit.config file to make gerrit
work behind proxy?. If yes, what should I add in gerrit.config file.

Thanks,
Rajesh.

On Sep 13, 12:40 am, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Tuesday, September 13, 2011 at 04:04 CEST,
>      rajesh boyapati <boyapatisraj...@gmail.com> wrote:
>
> > I used the command "stracerepo--traceupload."
> > And got the output like this:
>
> [...]
>
> > connect(3, {sa_family=AF_INET, sin_port=htons(80),
> > sin_addr=inet_addr("127.0.1.1")}, 16) = -1 ECONNREFUSED (Connection
> >refused)
>
> There we go. Git is connecting to 127.0.0.1 since that's what abc-laptop
> resolves to, presumably because you have
>
>    127.0.0.1        abc-laptop        localhost
>
> in your /etc/hosts. Now, this shouldn't be a problem since Gerrit should
> listen on all interfaces.
>
> However, on the connect() line we can see that it's still connecting to
> port 80 and not 8080 where your /ssh_info resource can be found. In a
> previous email you claim that your manifest contains
>
>    <remote name="ti-android"
>            fetch="ssh://abc-laptop:29418"
>            review="abc-laptop:8080" />
>
> which should makeRepoconnect to port 8080, *if* the git you're pushing

Magnus Bäck

unread,
Sep 14, 2011, 12:51:17 PM9/14/11
to Repo and Gerrit Discussion
On Wednesday, September 14, 2011 at 17:57 CEST,
rajesh boyapati <boyapat...@gmail.com> wrote:

[...]

> Now, I have one more question:
> If my gerrit web URL starts with "https" , how my review attribute in
> manifest file should be like:
> Ex:
> If my Gerrit web URL is like: https://gerrit.abc.com:8090
> Then my review attribute should be
> a) <remote name="ti-android"
> fetch="ssh://gerrit.abc.com:29418"
> review="gerrit.abc.com:8090" />
>
> (OR)
> b) <remote name="ti-android"
> fetch="ssh://gerrit.abc.com:29418"
> review="https://gerrit.abc.com:8090" />

The latter, b. Repo basically just appends /ssh_info and feeds it to
Python's HTTP library (urllib2). See git_config.py in Repo's source
code.

> --> If I set Proxy variables as environment variables, repo upload is
> not working in both the cases(a & b)..giving errors like
> "AttributeError: 'HTTPError' object has no attribute 'reason'....in
> (case(a))" and "raise UploadError('%s: %s' % (self.review,
> e.reason[1])) IndexError: tuple index out of range.....in
> (case(b))".
>
> -->If I unset the Proxy variables, only case(b) is working and case(a)
> is giving Error like "raise BadStatusLine(line)
> httplib.BadStatusLine "
>
> Do I need to make any changes in gerrit.config file to make gerrit
> work behind proxy?. If yes, what should I add in gerrit.config file.

This is Repo and not Gerrit, so gerrit.config is out of the question.
I don't know what it takes to make Repo work via a proxy. I would've
expected that urllib2 would've detected this automatically, but judging
by http://stackoverflow.com/questions/1450132/proxy-with-urllib2 you'd
have to modify Repo to make it support proxy configurations.

rajesh boyapati

unread,
Sep 20, 2011, 10:08:15 PM9/20/11
to Repo and Gerrit Discussion
Hi,

Thanks for the suggestions. It worked

Thanks,
Rajesh

On Sep 14, 11:51 am, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Wednesday, September 14, 2011 at 17:57 CEST,
> byhttp://stackoverflow.com/questions/1450132/proxy-with-urllib2you'd
Reply all
Reply to author
Forward
0 new messages