1

I'm trying to get PostgreSQL set up on cloud-based IDE Cloud9 but getting hung up getting getting the postgreSQL server, databases and roles started.

Cloud9 docs have instructions called "Setting Up PostgreSQL" but following them produces the error shown below.

I'm working in a new c9 workspace but it's possible that I've done something in c9 (like upgrading pg, starting pg server in other workspaces, etc.) that is messing things up, too.

Anyone have any ideas?

I hope to have the basics of getting pg set up well enough to set up rails 4.2 apps with rails_composer using postgreSQL.

[my c9 username]:~/workspace $ sudo service postgresql start
 * Starting PostgreSQL 9.3 database server
 * The PostgreSQL server failed to start. Please check the log output:

2015-11-08 13:10:11 UTC FATAL:  could not access private key file  "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

   ...fail!

[my c9 username]:~/workspace $ 
Ryan Vincent
  • 4,483
  • 7
  • 22
  • 31
BenU
  • 2,287
  • 1
  • 22
  • 35
  • Did you try `sudo chown -Rf postgres:postgres /etc/ssl/private/ssl-cert-snakeoil.key`? – Amit Badheka Nov 08 '15 at 13:41
  • Thanks for suggestion, @AmitBadhekaPykihStaff, but that doesn't seem to help: `[my c9 username]:~/workspace $ sudo chown -Rf postgres:postgres /etc/ssl/private/ssl-cert-snakeoil.key [my c9 username]:~/workspace $ sudo service postgresql start * Starting PostgreSQL 9.3 database server * The PostgreSQL server failed to start. Please check the log output: 2015-11-08 13:42:41 UTC FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied ...fail!` – BenU Nov 08 '15 at 13:43
  • Can you try with `sudo chmod 700 /etc/ssl/private/ssl-cert-snakeoil.key`? – Amit Badheka Nov 08 '15 at 13:47
  • tried and same things: \n[my c9 username]:~/workspace $ sudo chmod 700 /etc/ssl/private/ssl-cert-snakeoil.key [my c9 username]:~/workspace $ sudo service postgresql start * Starting PostgreSQL 9.3 database server * The PostgreSQL server failed to start. Please check the log output: 2015-11-08 13:47:38 UTC FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied ...fail! – BenU Nov 08 '15 at 13:49
  • Try this `sudo chmod og-rwx /etc/ssl/private/ssl-cert-snakeoil.key` – Amit Badheka Nov 08 '15 at 13:52
  • no change... I'm going for a brisk walk. Very grateful for your thoughts, though. ben_unger:~/workspace $ sudo chmod og-rwx /etc/ssl/private/ssl-cert-snakeoil.key ben_unger:~/workspace $ sudo service postgresql start * Starting PostgreSQL 9.3 database server * The PostgreSQL server failed to start. Please check the log output: 2015-11-08 13:53:17 UTC FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied ...fail! ben_unger:~/workspace $ – BenU Nov 08 '15 at 13:54
  • I think the problem is unique to Cloud9's IDE. Hopefully they will weigh in @ some point. – BenU Nov 08 '15 at 14:28
  • Can you check if this is happening for you on new workspaces? Can you write in to support@c9.io with details about any relevant changes you made so we can take a closer look? Thanks! – Mutahhir Nov 09 '15 at 06:15

1 Answers1

1

Got it working! Or I should say, "It's working now."

I'm embarrassed to say that I think the problem is related to having an open browser on my desktop with the same name as the new workspaces I was creating to get this working on my laptop.

I'll leave this question and answer up in case someone else has the same rare scenario and generates the same error message.

BenU
  • 2,287
  • 1
  • 22
  • 35