1202: Post-review socket.gaierror: (-2, 'Name or service not known')

steven.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 14, 2009
What version are you running?
Reviewboard 1.0 final, RBTools 0.2beta1 

What's the URL of the page containing the problem?
Command line

What steps will reproduce the problem?
0. cd ~
1. mkdir svn
2. cd svn
3. svn co https://leavitt.lsa.umich.edu/repos/test (or whatever Svn Repo)
4. cd test
5. echo REVIEWBOARD_URL = 'http://leavitt.lsa.umich.edu/reviews/' >
.reviewboardrc
6. post-review -d
--repository-url=https://leavitt.lsa.umich.edu/repos/test/
--revision-range=2110:2135

What is the expected output? 
Should submit review

What do you see instead?
>>> svn info https://leavitt.lsa.umich.edu/repos/test/
>>> repository info: Path: https://leavitt.lsa.umich.edu/repos/test, Base
path: /, Supports changesets: False
>>> svn diff --diff-cmd=diff https://leavitt.lsa.umich.edu/repos/test/@2110
https://leavitt.lsa.umich.edu/repos/test/@2135
>>> Looking for 'leavitt.lsa.umich.edu /reviews/' cookie in
/home/gears/.post-review-cookies.txt
>>> Couldn't load cookie file: [Errno 2] No such file or directory:
'/home/gears/.post-review-cookies.txt'
==> Review Board Login Required
Enter username and password for Review Board at
http://leavitt.lsa.umich.edu/reviews/
Username: gears
Password:
>>> Logging in with username "gears"
>>> HTTP POSTing to
http://leavitt.lsa.umich.edu/reviews/api/json/accounts/login/: {'username':
'gears', 'password': '**************'}
Traceback (most recent call last):
  File "/usr/bin/post-review", line 5, in ?
    pkg_resources.run_script('RBTools==0.2beta1', 'post-review')
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 448, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 1173, in run_script
    exec script_code in namespace, namespace
  File "/usr/bin/post-review", line 2313, in ?

  File "/usr/bin/post-review", line 2291, in main

  File "/usr/bin/post-review", line 306, in login

  File "/usr/bin/post-review", line 569, in api_post

  File "/usr/bin/post-review", line 542, in http_post

  File "/usr/bin/post-review", line 575, in _encode_multipart_formdata

  File "/usr/lib64/python2.4/mimetools.py", line 130, in choose_boundary
    hostid = socket.gethostbyname(socket.gethostname())
socket.gaierror: (-2, 'Name or service not known')


What operating system are you using? What browser?
Red Hat Enterprise Linux 5.3
python-2.4.3-24.el5
python-setuptools-0.6c7-1.el5
mod_python-3.2.8-3.1
httpd-2.2.3-22.el5
memcached-1.2.5-2.el5
mysql-5.0.45-7.el5
patch-2.5.4-29.2.3.el5
subversion-1.5.5-0.1.el5.rf
pysvn-1.6.2-1.el5



Please provide any additional information below.
I will provide faster responses if you email gears@umich.edu for requests
for addtiional information.
#1 steven.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
This appears to be a duplicate of bug #992 ( see
http://code.google.com/p/reviewboard/issues/detail?id=992 )
chipx86
#2 chipx86
This is related to the local hostname. It's not able to find the hostname of the
local host. There's nothing we can do about this, and is actually inside Python.
  • +ThirdParty
#3 dhum*****@gmai***** (Google Code) (Is this you? Claim this profile.)
If you add whatever socket.gethostname() returns to /etc/hosts that should fix/work around the issue.