Dear Users,
I'm trying to install foreman using an external
postgresql.
When I run the foreman-installer, without -i, everything seems to work fine
until
the foreman-proxy finalization which fails with 500 error.
If I connect to the foreman web interface I have this error:
Web application could not be started
PGError: ERROR: relation "features" does not exist
LINE 4: WHERE a.attrelid = '"features"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"features"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
(ActiveRecord::StatementInvalid)
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in
`async_exec'
And If I connect directly to the postgresql I see that inside the database
called foreman there is nothing.
I created the user foreman by myself and also the database foreman
otherwise it complains when calling foreman-rake.
This is the configuration part related to the database
cat /etc/foreman/foreman-installer-answers.yaml | grep db
db_port: 5432
db_sslmode:
db_username: foreman
db_password: mypassword
db_type: postgresql
db_manage: true
db_host: "XXXXXXXX"
db_adapter:
db_database: foreman
Anyone has any experience or Idea why foreman is not able, in this case, to
create the db structure?
Did I forget anything to configure?
Thanks in advance.
Cheers.
Luca
>
> Dear Users,
> I'm trying to install foreman using an external
> postgresql.
>
> When I run the foreman-installer, without -i, everything seems to work
fine until
> the foreman-proxy finalization which fails with 500 error.
>
> If I connect to the foreman web interface I have this error:
>
> Web application could not be started
>
> PGError: ERROR: relation "features" does not exist
> LINE 4: WHERE a.attrelid = '"features"'::regclass
> ^
> : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
d.adsrc, a.attnotnull
> FROM pg_attribute a LEFT JOIN pg_attrdef d
> ON a.attrelid = d.adrelid AND a.attnum = d.adnum
> WHERE a.attrelid = '"features"'::regclass
> AND a.attnum > 0 AND NOT a.attisdropped
> ORDER BY a.attnum
> (ActiveRecord::StatementInvalid)
>
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in
`async_exec'
>
> And If I connect directly to the postgresql I see that inside the
database called foreman there is nothing.
> I created the user foreman by myself and also the database foreman
otherwise it complains when calling foreman-rake.
>
>
> This is the configuration part related to the database
> cat /etc/foreman/foreman-installer-answers.yaml | grep db
> db_port: 5432
> db_sslmode:
> db_username: foreman
> db_password: mypassword
> db_type: postgresql
> db_manage: true
> db_host: "XXXXXXXX"
> db_adapter:
> db_database: foreman
>
> Anyone has any experience or Idea why foreman is not able, in this case,
to create the db structure?
> Did I forget anything to configure?
> Thanks in advance.
> Cheers.
On your foreman server try: foreman-rake db:migrate followed by a
foreman-rake db:seed.
AFAIK we don't migrate the external db by default.
Ohad
>
> Luca
>
> –
> You received this message because you are subscribed to the Google Groups
"Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
···
On Nov 3, 2014 9:03 PM, "Luca Mazzaferro" wrote:
> To post to this group, send email to foreman-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.
Hi Ohad,
thank you very much for your help.
It worked!
What I'm really trying to do is to divide the different services on
different
docker containers.
If I would connect foreman to external already configured and working
puppetmaster with passenger,
what I should do? Any suggestions?
Thank you.
Cheers.
Luca
···
Il giorno lunedì 3 novembre 2014 21:06:05 UTC+1, ohad ha scritto:
>
>
> On Nov 3, 2014 9:03 PM, "Luca Mazzaferro" > wrote:
> >
> > Dear Users,
> > I'm trying to install foreman using an external
> > postgresql.
> >
> > When I run the foreman-installer, without -i, everything seems to work
> fine until
> > the foreman-proxy finalization which fails with 500 error.
> >
> > If I connect to the foreman web interface I have this error:
> >
> > Web application could not be started
> >
> > PGError: ERROR: relation "features" does not exist
> > LINE 4: WHERE a.attrelid = '"features"'::regclass
> > ^
> > : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
> d.adsrc, a.attnotnull
> > FROM pg_attribute a LEFT JOIN pg_attrdef d
> > ON a.attrelid = d.adrelid AND a.attnum = d.adnum
> > WHERE a.attrelid = '"features"'::regclass
> > AND a.attnum > 0 AND NOT a.attisdropped
> > ORDER BY a.attnum
> > (ActiveRecord::StatementInvalid)
> >
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in
> `async_exec'
> >
> > And If I connect directly to the postgresql I see that inside the
> database called foreman there is nothing.
> > I created the user foreman by myself and also the database foreman
> otherwise it complains when calling foreman-rake.
> >
> >
> > This is the configuration part related to the database
> > cat /etc/foreman/foreman-installer-answers.yaml | grep db
> > db_port: 5432
> > db_sslmode:
> > db_username: foreman
> > db_password: mypassword
> > db_type: postgresql
> > db_manage: true
> > db_host: "XXXXXXXX"
> > db_adapter:
> > db_database: foreman
> >
> > Anyone has any experience or Idea why foreman is not able, in this case,
> to create the db structure?
> > Did I forget anything to configure?
> > Thanks in advance.
> > Cheers.
>
> On your foreman server try: foreman-rake db:migrate followed by a
> foreman-rake db:seed.
> AFAIK we don't migrate the external db by default.
>
> Ohad
> >
> > Luca
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Foreman users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to foreman-user...@googlegroups.com .
> > To post to this group, send email to forema...@googlegroups.com
> .
> > Visit this group at http://groups.google.com/group/foreman-users.
> > For more options, visit https://groups.google.com/d/optout.
>