heroku Error: Please run 'atlas-connect keygen' to generate this app's RSA key pair.

163 views
Skip to first unread message

Florian Bauer

unread,
Aug 28, 2013, 11:59:06 AM8/28/13
to atlassian-...@googlegroups.com
Hello!


I try to start my atlassian-connect-express app at heroku as described here.

It seams to be fine but after starting I get the following error:

2013-08-28T15:31:02.200670+00:00 heroku[web.1]: Starting process with command `n
ode app.js`
2013-08-28T15:31:03.
477505+00:00 app[web.1]:     at module.exports (/app/node_modules/atlassian-conn
ect-express/lib/index.js:115:10)
2013-08-28T15:31:03.474705+00:00 app[web.1]:     throw new Error('Please run \'a
tlas-connect keygen\' to generate this app\
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at Function.Module._load (modul
e.js:312:12)
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at EventEmitter.Addon (/app/nod
e_modules/atlassian-connect-express/lib/index.js:18:8)
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at Function.Module.runMain (mod
ule.js:497:10)
2013-08-28T15:31:03.474249+00:00 app[web.1]: /app/node_modules/atlassian-connect
-express/lib/index.js:53
2013-08-28T15:31:03.474705+00:00 app[web.1]:           ^
2013-08-28T15:31:03.473909+00:00 app[web.1]:
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at Object.Module._extensions..j
s (module.js:474:10)
2013-08-28T15:31:03.477505+00:00 app[web.1]: Error: Please run 'atlas-connect ke
ygen' to generate this app's RSA key pair.
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at EventEmitter.proto._verifyKe
ys (/app/node_modules/atlassian-connect-express/lib/index.js:53:11)
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at Module._compile (module.js:4
56:26)
2013-08-28T15:31:03.477685+00:00 app[web.1]:     at startup (node.js:119:16)
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at Object.<anonymous> (/app/app
.js:29:13)
2013-08-28T15:31:03.477505+00:00 app[web.1]:     at Module.load (module.js:356:3
2)
2013-08-28T15:31:04.595552+00:00 heroku[web.1]: Process exited with status 8
2013-08-28T15:31:04.606258+00:00 heroku[web.1]: State changed from starting to c
rashed
 
 indeed, I created my pem's by atlas-connect keygen and set heroku variables as follows:

heroku config:set AC_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----XXXXXXX-----END PUBLIC KEY-----" --app my-app
heroku config:set AC_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----XXXXXX-----END RSA PRIVATE KEY-----" --app myapp


what is wrong?

thx,
Florian

Roberto Dominguez

unread,
Aug 28, 2013, 12:02:28 PM8/28/13
to atlassian-...@googlegroups.com

Florian,

Confirm the environment variables are indeed set properly for your application:

heroku config --app YOUR_OWN_APP_NAME

you should see the full key's config variable set, i.e. AC_PRIVATE_KEY and AC_PUBLIC_KEY

Roberto

--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Robert Bergman

unread,
Aug 28, 2013, 12:03:29 PM8/28/13
to atlassian-...@googlegroups.com

If those are exactly the commands you used, you're app name is different on the two lines ('my-app' vs 'myapp').  Also double check that your keys have newlines in them and look correct when you read them back out with 'heroku config'.


--
Bob Bergman
--

Florian Bauer

unread,
Aug 28, 2013, 12:34:45 PM8/28/13
to atlassian-...@googlegroups.com
Hi Robert, hi Roberto!

thanks for your very quick response!

for me it looks fine and well formated (I just replaced the app's name by 'my-app' and later I will create a new key pair):


heroku config --app my-app
=== my-app Config Vars
AC_PRIVATE_KEY:             -----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA0h3VX1o6vYiDHBy/NMKXWPj6CGbGwiX7TUUBp2T7v6bTXulw
yYL30ZArEH5EwzHoHgOcpwiUQS6zTAiMPbkkotPaqJhKy03EYgX/WWBX0EJYewMa
cYRQxH0X7Y89rY/nKV357vM9Mrc0dx6KURFoliNrMcUb78KBHQ2nhRYhCwiEn0MD
UBuuxg2Moyqur7n2k4gTzioPJOz6MxyKPCOXjkJEl192Nil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nsKC5fpZZYioSk0J4VFlsieby/0UQdQxtawZWS
84CkZZLP9JKtMnSkJqGvE4hE4qtrNhz11OMFGiRxQUYEb5xM8Woyw3yG+f1w3ciK
JJPPAoGBAIjvMLiaFTCmX7Fy0+Me2vt8ieESWcp0utAnrI6kNV7Leh76l8IxcqBw
wecfussdsWIG5V/bTlV74bdX1Tjz1KsqLxt085TGpXsGP5kFVw39qyAAkRBdj1M/
z7HzLIdxm9mMG/Bnne7irvBmSMifLqR/p+F2FA4evMiS36Ii1GEQ
-----END RSA PRIVATE KEY-----
AC_PUBLIC_KEY:              -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0h3VX1o6vYiDHBy/NMKX
WPj6CGbGwiX7TUUBp2T7v6bTXulwyYL30ZArEH5EwzHoHgOcpwiUQS6zTAiMPbkk
otPaqJhKy03EYgX/WWBX0EJYewMacYRQxH0X7Y89rY/nKV357vM9Mrc0dx6KURFo
liNrMcUb78KBHQ2nhRYhCwiEn0MDUBuuxg2Moyqur7n2k4gTzioPJOz6MxyKPCOX
jkJEl192NilAjjb+PhZIibxgpFKZJoZbKdpjsB0oEujHsEe/fy5/LYwWOYW4bYJO
2i4sUKkjsXUkyOnO+PMxTARgMiXl5JrD6iQss6FxumCFETGx3ii08qu0KypKRWhi
IQIDAQAB
-----END PUBLIC KEY-----
HEROKU_POSTGRESQL_BLUE_URL: postgres://x...@yyy.com:12345/zzzz
NODE_ENV:                   production


but same error:  Error: Please run 'atlas-connect keygen' to generate this app's RSA key pair.


any ideas?

Florian

Florian Bauer

unread,
Aug 29, 2013, 5:40:18 AM8/29/13
to atlassian-...@googlegroups.com
I tried it in many different variants, encodings and different keys - no sucess. Is there any other way to pass the keys? any ideas?

Florian

Robert Bergman

unread,
Aug 29, 2013, 12:45:59 PM8/29/13
to atlassian-...@googlegroups.com

I think some debugging is the next step.  You can try to reproduce this in your local dev env by doing the following:


* Temporarily rename or move your public-key.pem and private-key.pem files so they aren't found by the ace config code

* Run the following (if in bash) to set the environment variables:

    $ export AC_PUBLIC_KEY=`cat renamed-public-key.pem`

    $ export AC_PRIVATE_KEY=`cat renamed-private-key.pem`

* Run the app with `node app` or whatever you normally use to start it
* See if you get the same error.

If you get the same error, start debugging node_modules/atlassian-connect-express/lib/internal/config.js's 'get' function.  Also send us the version number of the ace build you're using -- I don't see the error when I use those steps to reproduce locally, so if you do, we need to look deeper.  If not, at least we know it's an issue just on the Heroku side, and can consider how to dig in on that end.

--
Bob Bergman

On August 29, 2013 at 3:40:31 AM, Florian Bauer (flo...@die-bauers.name) wrote:

I tried it in many different variants, encodings and different keys - no sucess. Is there any other way to pass the keys? any ideas?

Florian

Florian Bauer

unread,
Sep 21, 2013, 5:33:05 AM9/21/13
to atlassian-...@googlegroups.com
Thanks to all! I am not sure what the reason was for my failure but after a new setup of heroku and ac it works..

Thanks!
Florian
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connect-dev+unsub...@googlegroups.com.

Hua Soon Sim

unread,
Apr 28, 2016, 9:17:37 PM4/28/16
to Atlassian Connect Dev
Hi,

Does anyone knows the purpose of the AC_PUBLIC_KEY and AC_PRIVATE_KEY?


Is it deprecated already?
I checked the node_modules/* and cannot find any usage of the keys. 
Managed to get connect add-on working even though I started node without setting the keys.

Thanks in advance.

Roberto Dominguez

unread,
Apr 29, 2016, 12:08:18 AM4/29/16
to atlassian-...@googlegroups.com
Yeah, they were used back on the OAUTH days, you don’t need them anymore.

Roberto


--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sim Hua Soon

unread,
Apr 29, 2016, 2:59:12 AM4/29/16
to atlassian-...@googlegroups.com
Hi Roberto,

Thank you :)

Regards,
Sim Hua Soon
Akeles Consulting Pte Ltd
T: (65) 6100-WIKI / 9454
www.akeles.com
     
This message is intended only for use of the addressee and may contain information that is privileged and confidential.  If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply and delete this message from your system
Reply all
Reply to author
Forward
0 new messages