Hello Christian,

   I was hoping that would be it, but I get the same problem.  I am pretty 
sure my apache config is the problem.  I replaced my apache customizations 
with the /var/www/reviewboard/conf/apache-wsgi.conf file and it wrote the 
session to the .rbtools-cookies file.  Still errored, but it was about ssl 
which isn't included in that basic file.  So I think I am on the right 
track.

Thank you very much for your help!

Vince


On Monday, January 15, 2018 at 7:58:40 PM UTC-8, Christian Hammond wrote:
>
> Hi Vince,
>
> The debug log shows an immediate failure after providing a login/password, 
> and it's not the one I'd expect if there was an issue with the credentials 
> (you'd see "The username or password was not correct."), which makes me 
> wonder if there's an issue with the credentials even reaching the server.
>
> I've seen this happen when going through an outbound HTTP(S) proxy for a 
> company. If the company has one set up at all, and your system is 
> configured to go through it, then it's likely going to interfere with the 
> requests. Just to sanity-check, can you try passing --no-proxy to RBTools 
> in your test?
>
> LDAP errors will show up as warnings/errors, without the need to enable 
> debug logging. You should see a debug message for "Attempting to 
> authenticate user ..."
>
> If you aren't seeing anything from LDAP, then it sounds like it's not 
> going through LDAP. Can you confirm LDAP is showing up as the auth backend 
> in Authentication Settings?
>
> Christian
>
> On Mon, Jan 15, 2018 at 3:34 PM, Vince Thyng <vth...@gmail.com 
> <javascript:>> wrote:
>
>>
>> Confirmed, the domain matches exactly.
>>
>> We have restarted apache many times while troubleshooting this, but tried 
>> a restart again just now.  We wanted to try `sudo python -m ipdb $(which 
>> rb-site) manage /var/www/reviewboard runserver 0.0.0.0:80`, but ran in to 
>> trouble with https not being available.
>>
>> Sorry, that .rbtools-cookies file post was confusing.  It shows our 
>> production server in there as otherserver.com (which I can still post to 
>> just fine even after removing the session for it from .rbtools-cookies), 
>> and this new one that will replace it as localserver.com.  I think what 
>> is noteable about my testing is that when I remove the cookies file, it is 
>> not getting populated again, yet if I put a session in there manually that 
>> I can see in the database, it works.
>>
>> Logins via webui work, while new sessions via rbt do not.
>>
>> We are using apache 2.4.6 without a proxy in front, on centos 7.3
>>
>> I think it is a pretty basic config, but I removed the 80->443 redirect 
>> and tested again just now in case that has introduced a problem.  Still no 
>> love.
>>
>> <VirtualHost *:443>
>>   ServerName reviewboard.localserver.com
>>
>>   ## Vhost docroot
>>   DocumentRoot "/var/www/reviewboard/"
>>   ## Alias declarations for resources outside the DocumentRoot
>>   Alias /static "/var/www/reviewboard/htdocs/static"
>>
>>   ## Directories, there should at least be a declaration for 
>> /var/www/reviewboard/
>>
>>   <Directory "/var/www/reviewboard/">
>>     Options -Indexes +FollowSymLinks
>>     AllowOverride None
>>     Require all granted
>>   </Directory>
>>
>>   ## Logging
>>   ErrorLog "/var/log/httpd/reviewboard.localserver.com_error_ssl.log"
>>   ServerSignature Off
>>   CustomLog "/var/log/httpd/reviewboard.localserver.com_access_ssl.log" 
>> combined
>>
>>   ## SSL directives
>>   SSLEngine on
>>   SSLCertificateFile      "/etc/pki/tls/certs/_.west.isilon.com.crt"
>>   SSLCertificateKeyFile   "/etc/pki/tls/private/_.west.isilon.com.key"
>>   SSLCertificateChainFile "/etc/pki/tls/certs/_.west.isilon.com.chain.crt"
>>   SSLCACertificatePath    "/etc/pki/tls/certs"
>>   WSGIScriptAlias / "/var/www/reviewboard/htdocs/reviewboard.wsgi"
>> </VirtualHost>
>>
>>
>> Something else I have noticed is that even with reviewboard in debug mode 
>> (set in System Settings->Logging log level = DEBUG, I don't see anything in 
>> the reviewboard.log file except 
>> 2018-01-15 20:05:00,809 - INFO -  - root - Reloading logging settings
>> Is there a way to get it to report ldap failures there?
>>
>> Vince
>>
>>
>> On Monday, January 15, 2018 at 2:59:23 PM UTC-8, Christian Hammond wrote:
>>>
>>> Hi Vince,
>>>
>>> Is Review Board configured to use the same domain in General Settings as 
>>> you have specified in .reviewboardrc? Can you confirm that for me, and also 
>>> confirm that restarting Apache doesn't fix anything? I'm wondering because 
>>> it sounds like the cookie is being generated for the wrong domain, which 
>>> would mean that upon initial authentication, you're getting a cookie and 
>>> then trying to use it again for the wrong server. Since the RBTools debug 
>>> output has been modified to mask the domain, I can't verify any of this 
>>> myself.
>>>
>>> What is your web server configuration like? Is Apache handling all 
>>> requests itself, or are you going through Nginx or another proxy?
>>>
>>> Christian
>>>
>>> On Mon, Jan 15, 2018 at 2:51 PM, Vince Thyng <vth...@gmail.com> wrote:
>>>
>>>> Adding to my previous post, we are seeing django_session table records 
>>>> getting created when the webui is used, and I wasn able to use a sessionid 
>>>> created there with rbt by putting it in the .rbtools-cookies file, however 
>>>> no session is getting created when we get these failures over rbt.  We 
>>>> seem 
>>>> to be narrowing in on the problem, but now need to understand how 
>>>> authentication is being handled differently via rbt / the api compared to 
>>>> the webui.
>>>>
>>>> Vince
>>>>
>>>> On Tuesday, January 6, 2015 at 2:59:26 PM UTC-8, Julian Mehnle wrote:
>>>>>
>>>>> Hi all, 
>>>>>
>>>>> I'm having trouble using rbt on the command line. No matter what I do, 
>>>>> anything that requires interaction with the Review Board server gives me 
>>>>> a 
>>>>> "You are not logged in (HTTP 401, API Error 103)": 
>>>>>
>>>>> > joule:~/tmp/rbtools.orig> rbt --version 
>>>>> > RBTools 0.6.3 
>>>>> > joule:~/tmp/rbtools.orig> git log --stat master ^origin/master | 
>>>>> more 
>>>>> > commit 86dc0ab71c20a599c33efa7ea694c12281fe8ef6 
>>>>> > Author: Julian Mehnle <jme...@agari.com> 
>>>>> > Date:   Tue Jan 6 22:45:19 2015 +0000 
>>>>> > 
>>>>> >     When raising CommandError, include lower-level exception. 
>>>>> > 
>>>>> >  rbtools/commands/__init__.py | 2 +- 
>>>>> >  1 file changed, 1 insertion(+), 1 deletion(-) 
>>>>> > joule:~/tmp/rbtools.orig> rbt post --debug -g 
>>>>> > >>> RBTools 0.6.3 
>>>>> > >>> Python 2.7.9 (default, Dec 13 2014, 15:13:49) 
>>>>> > [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] 
>>>>> > >>> Running on Darwin-14.0.0-x86_64-i386-64bit 
>>>>> > >>> Home = /Users/julian 
>>>>> > >>> Current directory = /Users/julian/tmp/rbtools.orig 
>>>>> > >>> Checking for a Subversion repository... 
>>>>> > >>> Running: svn info --non-interactive 
>>>>> > >>> Command exited with rc 1: ['svn', 'info', '--non-interactive'] 
>>>>> > svn: E155007: '/Users/julian/tmp/rbtools.orig' is not a working copy 
>>>>> > --- 
>>>>> > >>> Checking for a Git repository... 
>>>>> > >>> Running: git rev-parse --git-dir 
>>>>> > >>> Running: git config core.bare 
>>>>> > >>> Running: git rev-parse --show-toplevel 
>>>>> > >>> Running: git symbolic-ref -q HEAD 
>>>>> > >>> Running: git config --get branch.master.merge 
>>>>> > >>> Running: git config --get branch.master.remote 
>>>>> > >>> Running: git config --get remote.origin.url 
>>>>> > >>> repository info: Path: git://github.com/reviewboard/rbtools.git, 
>>>>> Base path: , Supports changesets: False 
>>>>> > >>> Making HTTP GET request to https://reviews.reviewboard.org/api/ 
>>>>> > >>> Running: git rev-parse refs/heads/master 
>>>>> > >>> Running: git merge-base 86dc0ab71c20a599c33efa7ea694c12281fe8ef6 
>>>>> origin/master 
>>>>> > >>> Running: git rev-parse bcb7629c0be773b6f347a5006224825b8726c479 
>>>>> > >>> Running: git status --porcelain --untracked-files=no 
>>>>> > >>> Running: git diff --no-color --full-index --ignore-submodules 
>>>>> bcb7629c0be773b6f347a5006224825b8726c479..86dc0ab71c20a599c33efa7ea694c12281fe8ef6
>>>>>  
>>>>> -M --no-ext-diff 
>>>>> > >>> Running: git log --reverse --pretty=format:%s%n%n%b 
>>>>> ^bcb7629c0be773b6f347a5006224825b8726c479 
>>>>> 86dc0ab71c20a599c33efa7ea694c12281fe8ef6 
>>>>> > >>> Making HTTP GET request to 
>>>>> https://reviews.reviewboard.org/api/review-requests/ 
>>>>> > >>> Making HTTP POST request to 
>>>>> https://reviews.reviewboard.org/api/review-requests/ 
>>>>> > >>> Got API Error 103 (HTTP code 401): You are not logged in 
>>>>> > >>> Error data: {u'stat': u'fail', u'err': {u'msg': u'You are not 
>>>>> logged in', u'code': 103}} 
>>>>> > Traceback (most recent call last): 
>>>>> >   File "/usr/local/bin/rbt", line 9, in <module> 
>>>>> >     load_entry_point('RBTools==0.6.3', 'console_scripts', 'rbt')() 
>>>>> >   File 
>>>>> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/main.py",
>>>>>  
>>>>> line 134, in main 
>>>>> >     command.run_from_argv([RB_MAIN, command_name] + args) 
>>>>> >   File 
>>>>> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/__init__.py",
>>>>>  
>>>>> line 416, in run_from_argv 
>>>>> >     exit_code = self.main(*args) or 0 
>>>>> >   File 
>>>>> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/post.py",
>>>>>  
>>>>> line 791, in main 
>>>>> >     submit_as=self.options.submit_as) 
>>>>> >   File 
>>>>> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/RBTools-0.6.3-py2.7.egg/rbtools/commands/post.py",
>>>>>  
>>>>> line 507, in post_request 
>>>>> >     raise CommandError("Error creating review request: %s" % e) 
>>>>> > rbtools.commands.CommandError: Error creating review request: You 
>>>>> are not logged in (HTTP 401, API Error 103) 
>>>>>
>>>>>
>>>>> I've tried removing ~/.rbtools-cookies, as well as specifying 
>>>>> --username and --password on the command line, to no avail. I've tried 
>>>>> both 
>>>>> posting to https://reviews.reviewboard.org and my company's internal 
>>>>> Review Board server (running RB 1.7.19. I'm running Python 2.7.9 on Mac 
>>>>> OS 
>>>>> X 10.10.1. 
>>>>>
>>>>> I'm not sure what triggered this. How should I go about debugging 
>>>>> this? 
>>>>>
>>>>> -Julian 
>>>>>
>>>>> -- 
>>>> Supercharge your Review Board with Power Pack: 
>>>> https://www.reviewboard.org/powerpack/
>>>> Want us to host Review Board for you? Check out RBCommons: 
>>>> https://rbcommons.com/
>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Review Board Community" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to reviewboard...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Christian Hammond
>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>> Makers of Review Board <https://www.reviewboard.org/>
>>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Christian Hammond
> President/CEO of Beanbag <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to