Page MenuHomePhabricator

Require help troubleshooting an error when running install-certificate.
Closed, InvalidPublic

Description

We are using a Phabricator server setup under ubuntu. This is linked to SVN repository that is running on a windows 2003 server box. (Don't ask why, crazy I know, but thats what I have to work with at the moment)

I have installed Archanist on the windows box as I wish to install a post-commit hook so that I can use conduit to trigger a repository refresh instantly.

On the windows box I am getting an "ERR-BAD-TOKEN" error as shown in the logs below. I have tried a number of different users, regenerating tokens etc, however they all give the same error.

I would like some help in how I can track down what is causing this. It could well be environmental, but I don't know where to start looking.

Thanks

D:\marpet1>arc --conduit-uri="http://10.212.8.208/" install-certificate --trace
libphutil loaded from 'C:\arcanist\libphutil\src'.
arcanist loaded from 'C:\arcanist\arcanist\src'.
Config: Reading user configuration file "d:\marpet1\AppData\Roaming/.arcrc"...
Config: Did not find system configuration at "D:\marpet1\Phabricator/Arcanist/co
nfig".
Working Copy: No candidate locations for .arcconfig from this working directory.

Working Copy: Path "D:\marpet1" is not in any working copy.
Installing certificate for 'http://10.212.8.208/api/'...
Trying to connect to server...
>>> [0] <conduit> conduit.ping() <bytes = 39>
>>> [1] <http> http://10.212.8.208/api/conduit.ping
<<< [1] <http> 78,125 us
<<< [0] <conduit> 78,125 us
Connection OK!

LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricator if necessary:

    http://10.212.8.208/conduit/token/

Then paste the token on that page below.

    Paste token from that page: qumavmh5milr6r2rts56y7iuhkkdwdt6cs4w6le4eqj6rftn
izltock2qs53cilsyx7mjod32vbh7dfazmwiskmkoptvcomgacaq4fp34bxpqbtl35borcltqfdk26ik
fskzeu2iqvrieh5hxu6oe6pbz4iwyftxcyius4m644hzkjkj5zarbqf4c2h7gsgkd3kuzhsarpb55hnr
u44znofa2sk3jcshjcijs5vtuwkl3qjm3hvvkprjzswhwzl

Downloading authentication certificate...
>>> [2] <conduit> conduit.getcertificate() <bytes = 382>
>>> [3] <http> http://10.212.8.208/api/conduit.getcertificate
<<< [3] <http> 62,500 us
<<< [2] <conduit> 62,500 us

[2014-10-20 17:58:29] EXCEPTION: (ConduitClientException) ERR-BAD-TOKEN: Token d
oes not exist or has expired. at [<phutil>\src\conduit\ConduitFuture.php:54]
  #0 ConduitFuture::didReceiveResult(array) called at [<phutil>\src\future\Futur
eProxy.php:60]
  #1 FutureProxy::getResult() called at [<phutil>\src\future\FutureProxy.php:37]

  #2 FutureProxy::resolve() called at [<phutil>\src\conduit\ConduitClient.php:24
]
  #3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>\s
rc\workflow\ArcanistInstallCertificateWorkflow.php:97]
  #4 ArcanistInstallCertificateWorkflow::run() called at [<arcanist>\scripts\arc
anist.php:338]

D:\marpet1>

Event Timeline

pmstick raised the priority of this task from to Needs Triage.
pmstick updated the task description. (Show Details)
pmstick added a project: Arcanist.
pmstick added a subscriber: pmstick.

It looks like you're pasting the entire certificate, not the token. Follow the link and paste just the token (which is much shorter). Do not go to Settings > Conduit Certificate -- that is not what you're supposed to paste.

btrahan claimed this task.

Thanks Evan. That got me moving forward, I can use that URL for a normal user. How do I get the token for a bot? I can't login to the site as a bot user to get the token.

This is how I go the certificate in the first place, but you need a token not a certificate see first comment from Evan. I have just found that it installs the certificate in the .arcrc so I should be able to use the certificate directly in the config file and not need to use a token at all. I am slowly getting on top of this great product.