Can't add perforce repository

138 views
Skip to first unread message

Giuseppe Salvatore

unread,
Jan 8, 2018, 2:08:56 PM1/8/18
to Review Board Community
Hi,
I am trying to add a perforce repository in the list of available repositories. Unfortunately it looks like from the admin dashbord this can't be done. In REPOSITORY INFORMATION -> Path  it is not really clear what is should go. From the description I am assuming p4server:p4port but that doesn't work and the error message is confusing. Says 

A repository was not found at the specified path.

It is not clear if I have to put the path of the local p4 workspace/client. It wouldn't make sense to me.

Any comment will be appreciated

Thanks,
Giuseppe

David Trowbridge

unread,
Jan 8, 2018, 2:16:51 PM1/8/18
to revie...@googlegroups.com
Giuseppe,

The path should be the P4PORT setting. So it should look something like "perforce.example.com:1666"

-David

--
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.

Giuseppe Salvatore

unread,
Jan 9, 2018, 6:00:43 AM1/9/18
to Review Board Community
Hi David,

thanks for your reply. Yes I tried that as well but didn't work. I am wondering if there's anyway of doing it using command line. I tried also using rbt setup-repo command but I am not sure if that's equivalent of doing it from RB web dashboard. 

BTW also rbt setup-repo doesn't work. If I put perforce.server.com:1666 (just an example) the error message is also quite confusing, it says 

ERROR: The current directory does not contain a checkout from a supported source code repository.

Running that command in debug mode, it looks like checks with the known repository tools, but then when it finds one (p4 info in my case succeeds) then it wants probably the current directory to be on a perforce workspace

Any ideas?

Thanks
Giuseppe

David Trowbridge

unread,
Jan 10, 2018, 7:34:24 PM1/10/18
to revie...@googlegroups.com
Giuseppe,

There's no way of configuring it via the command-line. The repository has to be set up in the Review Board admin UI first. Are you still getting the same error with the correct P4PORT string? 


"rbt setup-repo" is for configuring RBTools (creating a .reviewboardrc file). This is for after you've set it up in the web UI. The command is poorly named, and we're hoping to improve it (and rename it) in the future.

-David

Giuseppe Salvatore

unread,
Jan 12, 2018, 1:00:25 PM1/12/18
to revie...@googlegroups.com
Hi David,

yes I do. And it's strange that the error message refers to a path! Also, is the Name field the name of the repository or a name that will identify the repository in review board (btw I tried putting the real repository name in perforce and doesn't work as well)
It's strange that the error message refers to a path instead of an address or hostname... 

We are in the process of evaluating different tools to implement a code review process in our team (possibly the whole company) but unfortunately if I am not able to get it working I will have to drop RB. I would prefer not to since it was me to recommend it. 

Thanks for your help and support

Giuseppe

To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

David Trowbridge

unread,
Jan 12, 2018, 5:01:35 PM1/12/18
to revie...@googlegroups.com
The error message is generic for all repository types, most of which have a "path". Would it be possible for you to share a screenshot of what you're putting into the field? (possibly anonymizing any domain names)? Can you check the Review Board log file after attempting to save it to see if there are any errors listed there?

The name field is an identifier which will be used within Review Board, and can be whatever you like.

You received this message because you are subscribed to a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

Giuseppe Salvatore

unread,
Jan 15, 2018, 6:23:48 AM1/15/18
to revie...@googlegroups.com
Hi David,

sure thank you! 
By looking into the log file I think a different errors is showing up. Not sure if it is related in any way with the Perforce repo interaction, seems to be related to rbintegrations missing hook library.
Here is what it says 

ImportError: cannot import name IntegrationHook
2018-01-15 11:03:58,557 - DEBUG -  - djblets.cache.backend - Cache miss for key jsi18n-djangojs-reviewboard_djblets-en-gb-1515434639.
2018-01-15 11:05:20,140 - INFO -  - root - Reloading logging settings
2018-01-15 11:05:20,141 - DEBUG -  - root - Logging to /var/www/html/*********************/logs/webapp-logs/reviewboard.log with a minimum level of DEBUG
2018-01-15 11:05:20,143 - ERROR -  - djblets.extensions.manager - Error loading extension rbintegrations: cannot import name IntegrationHook
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/djblets/extensions/manager.py", line 449, in _load_extensions
    ext_class = entrypoint.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2405, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2411, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/rbintegrations/extension.py", line 6, in <module>
    from reviewboard.extensions.hooks import IntegrationHook, URLHook
ImportError: cannot import name IntegrationHook

Due to confidential info I had to blank part of the domain, repo name and user name. 
Regards,

Giuseppe



To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.
reviewboard_error.png

Giuseppe Salvatore

unread,
Jan 15, 2018, 12:07:42 PM1/15/18
to revie...@googlegroups.com
Hi David,

I fixed it now!! The problem was the following but I need you to confirm it. In the python scripts at some point I think there is a check done (think was check_repository) that was basically running p4 info ignoring the values in the filled fields of the web UI but reading for the environment variables, can you confirm that? I basically included a logging.error() print just when RepositoryNotFoundError was thrown and the error there was that I received a permission denied in the TPC connect.... which was weird. Basically since the http server runs as root (I think...) running a p4 info with sudo was failing and so was the check I believe. So I basically added the P4PORT also as GLOBAL environment variable in /etc/profile.d/....

Thanks for the support David, I appreciated it.

Giuseppe

David Trowbridge

unread,
Jan 15, 2018, 3:50:38 PM1/15/18
to revie...@googlegroups.com
Giuseppe,

Can you confirm exactly where in the code it was failing? There shouldn't be any dependency on the environment.

-David

You received this message because you are subscribed to a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Giuseppe Salvatore

unread,
Jan 16, 2018, 5:23:23 AM1/16/18
to revie...@googlegroups.com
It's in file 

reviewboard/scmtools/perforce.py

line 490 (highlighted in yellow, I have added the two lines in bold to get more debug information)

       try:
            with self.connect():
                yield
        except P4Exception as e:
            error = six.text_type(e)

            if 'Perforce password' in error or 'Password must be set' in error:
                raise AuthenticationError(msg=error)
            elif 'SSL library must be at least version' in error:
                raise SCMError(_(
                    'The specified Perforce port includes ssl:, but the '
                    'p4python library was built without SSL support or the '
                    'system library path is incorrect.'
                ))
            elif ('check $P4PORT' in error or (error.startswith('[P4.connect()] TCP connect to') and 'failed.' in error)):
                logging.error("RepositoryNotFound was raised: " + error)
                traceback.print_stack()
 ---------->    raise RepositoryNotFoundError
            elif "To allow connection use the 'p4 trust' command" in error:
                fingerprint = error.split(r'\n')[3]


To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

David Trowbridge

unread,
Jan 20, 2018, 10:37:41 AM1/20/18
to revie...@googlegroups.com
Giuseppe,

Do you have the full traceback? That's generic worker code that's called in many places.

-David

You received this message because you are subscribed to a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Giuseppe Salvatore

unread,
Jan 23, 2018, 5:09:59 AM1/23/18
to revie...@googlegroups.com
Hi David,

After further investigation I discovered that it was the firewall blocking httpd outgoing connection to perforce. I couldn't figure it out from ssh,  I had to remote in through vnc to see an alert related to that. The error message from the python script was suggesting to look at the P4PORT but that wasn't the problem, and when I thought I had fixed it but what actually happened was to put svn repo type when adding the repo (strangely that was accepted without any immediate errors).   

Thanks,  
Giuseppe 

To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/PvsyfplzUIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages