Puppet Reports: ERROR: null value in column "name" violates not-null constraint

This seems like something that just came up with the nighties, and my guess
its related to rails packaging.

see Bug #1743: Validation of name parameters always fails - Foreman for more details.

Thanks,
Ohad

··· On Wed, Jul 11, 2012 at 2:59 AM, Darryl Ross wrote:

Hi All,

Having an issue with a new build on Ubuntu 12.04 when puppetmaster is
sending reports. I was not able to get the packages in either stable or
testing (as of 12 hours ago) to work on Ubuntu 12.04 and have installed the
nightly build version.

*root@monitor1:/etc/foreman# dpkg -l | egrep -e '(puppet|foreman)'
ii foreman 1.1-~nightlybuild1341896417
Systems management web interface
ii foreman-pgsql 1.1-~nightlybuild1341896417
metapackage providing PostgreSQL dependencies for Foreman
ii foreman-proxy 1.1-~nightlybuild1341896401
RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii puppet 2.7.11-1ubuntu2
Centralized configuration management - agent startup and compatibility
scripts
ii puppet-common 2.7.11-1ubuntu2
Centralized configuration management
ii puppetmaster 2.7.11-1ubuntu2
Centralized configuration management - master startup and compatibility
scripts
ii puppetmaster-common 2.7.11-1ubuntu2
Puppet master common scripts
*
I am a complete noob when it comes to ruby, and haven’t been able to work
out how to unFILTER the report that is being passed in to find out why all
the fields are blank:

Started POST “/reports/create?format=yml” for 202.191.108.5 at Wed Jul
11 09:21:49 +0930 2012
Processing by ReportsController#create as YML
Parameters: {“report”=>"[FILTERED]"}
processing report for monitor1.afoyi.com
Failed to process report for monitor1.afoyi.com due to:PG::Error: ERROR:
null value in column “name” violates not-null constraint
: INSERT INTO “hosts” (“domain_id”, “managed”, “subnet_id”,
“environment_id”, “name”, “owner_id”, “build”, “sp_ip”, “enabled”,
“serial”, “use_image”, “model_id”, “disk”, “certname”, “last_report”,
“operatingsystem_id”, “sp_mac”, “sp_subnet_id”, “puppet_ca_proxy_id”,
“compute_resource_id”, “environment”, “image_file”, “image_id”,
“hostgroup_id”, “puppet_proxy_id”, “medium_id”, “ip”, “architecture_id”,
“source_file_id”, “comment”, “owner_type”, “puppet_status”, “updated_at”,
“sp_name”, “created_at”, “ptable_id”, “root_pass”, “installed_at”,
“last_compile”, “uuid”, “mac”, “last_freshcheck”) VALUES (NULL, NULL, NULL,
NULL, NULL, NULL, ‘f’, ‘’, ‘t’, NULL, NULL, NULL, NULL, NULL, ‘2012-07-10
23:51:42.077620’, NULL, ‘’, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, 100663296, ‘2012-07-10
23:51:49.409657’, ‘’, ‘2012-07-10 23:51:49.409657’, NULL, NULL, NULL, NULL,
NULL, ‘’, NULL) RETURNING "id"
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 21ms (Views: 0.6ms | ActiveRecord:
2.6ms)

I want to use foreman purely for aggregating reports, not any automated
build system as we have other systems in place for that.

Any suggestions?


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/kBNP5MRCdCoJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Hi Ohad,

That seems to exactly describe what I'm seeing. So much for pulling my
hair out for several hours trying to work out it :slight_smile:

Can you please advise when the nightly builds are built?

Thanks!
Darryl

··· On Wed, Jul 11, 2012 at 08:23:51AM +0300, Ohad Levy wrote: > This seems like something that just came up with the nighties, and my > guess its related to rails packaging. > see [1]http://theforeman.org/issues/1743 for more details.

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ohad,
>
> That seems to exactly describe what I'm seeing. So much for pulling my
> hair out for several hours trying to work out it :slight_smile:
>
> Can you please advise when the nightly builds are built?
>
Hi Darryl,
I just pushed a fixed for this issue, and its fairly trivial - you could
apply the patch yourself, see
https://github.com/theforeman/foreman/commit/85cc156a22f8db8d62a1db953c945a3e29e99ad5

Ohad

··· On Wed, Jul 11, 2012 at 9:57 AM, Darryl Ross wrote:

Thanks!
Darryl

On Wed, Jul 11, 2012 at 08:23:51AM +0300, Ohad Levy wrote:

This seems like something that just came up with the nighties, and my
guess its related to rails packaging.
see [1]http://theforeman.org/issues/1743 for more details.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk/9I/YACgkQ/XQ6DbmPjokSUQCeMDHIQ8dbxu7na0iV5Kh+F+Mn
wDYAnAwg5IDc36fW4rz9hiYEUqg7btjS
=nNie
-----END PGP SIGNATURE-----


You received this message because you are subscribed to the Google Groups
“Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Hi Ohad,

After applying that patch, the service is now refusing to start:

root@monitor1:/usr/share/foreman# /etc/init.d/foreman start
/usr/lib/ruby/vendor_ruby/bundler/resolver.rb:287:in resolve': Could not find gem 'audited-activerecord (= 3.0.0.rc1) ruby' in the gems available on this machine. (Bundler::GemNotFound) from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:161:instart'
from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in resolve' from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:incatch'
from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in resolve' from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:192:inresolve'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:127:in specs' from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:172:inspecs_for'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:161:in
requested_specs' from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:23:inrequested_specs'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:11:in setup' from /usr/lib/ruby/vendor_ruby/bundler.rb:107:insetup'
from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17
root@monitor1:/usr/share/foreman# gem install audited-activerecord
ERROR: Could not find a valid gem 'audited-activerecord' (>= 0) in any
repository
ERROR: Possible alternatives: ordered-active-record,
sskirby-activerecord, reactive-activerecord, ambitious-activerecord,
appetizer-activerecord

I'm figuring I have a dependancy missing, but not sure where to get it from?

-Darryl

Run:

cd /usr/share/foreman && bundle install

Bundler will make sure you have the right version (3.0.0.rc1) of
audited-activerecord.

··· On Wed, Jul 11, 2012 at 9:54 AM, Darryl Ross wrote:

Hi Ohad,

After applying that patch, the service is now refusing to start:

root@monitor1:/usr/share/**foreman# /etc/init.d/foreman start
/usr/lib/ruby/vendor_ruby/**bundler/resolver.rb:287:in resolve': Could not find gem 'audited-activerecord (= 3.0.0.rc1) ruby' in the gems available on this machine. (Bundler::GemNotFound) from /usr/lib/ruby/vendor_ruby/**bundler/resolver.rb:161:instart’
from /usr/lib/ruby/vendor_ruby/**bundler/resolver.rb:128:in
resolve' from /usr/lib/ruby/vendor_ruby/**bundler/resolver.rb:127:incatch’
from /usr/lib/ruby/vendor_ruby/**bundler/resolver.rb:127:in
resolve' from /usr/lib/ruby/vendor_ruby/**bundler/definition.rb:192:inresolve’
from /usr/lib/ruby/vendor_ruby/**bundler/definition.rb:127:in
specs' from /usr/lib/ruby/vendor_ruby/**bundler/definition.rb:172:inspecs_for’
from /usr/lib/ruby/vendor_ruby/**bundler/definition.rb:161:in
requested_specs' from /usr/lib/ruby/vendor_ruby/**bundler/environment.rb:23:inrequested_specs’
from /usr/lib/ruby/vendor_ruby/**bundler/runtime.rb:11:in setup' from /usr/lib/ruby/vendor_ruby/**bundler.rb:107:insetup’
from /usr/lib/ruby/vendor_ruby/**bundler/setup.rb:17
root@monitor1:/usr/share/**foreman# gem install audited-activerecord
ERROR: Could not find a valid gem ‘audited-activerecord’ (>= 0) in any
repository
ERROR: Possible alternatives: ordered-active-record,
sskirby-activerecord, reactive-activerecord, ambitious-activerecord,
appetizer-activerecord

I’m figuring I have a dependancy missing, but not sure where to get it
from?

-Darryl


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com**.
To unsubscribe from this group, send email to foreman-users+unsubscribe@**
googlegroups.com foreman-users%2Bunsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/**
group/foreman-users?hl=enhttp://groups.google.com/group/foreman-users?hl=en
.

Great, thanks, appears to be working now.
Love the responsive help on this list, should have joined ages ago!

-Darryl

··· On 11/07/2012 11:31 PM, Sam Kottler wrote: > Run: > > cd /usr/share/foreman && bundle install > > Bundler will make sure you have the right version (3.0.0.rc1) of > audited-activerecord. > > On Wed, Jul 11, 2012 at 9:54 AM, Darryl Ross > wrote: > > Hi Ohad, > > After applying that patch, the service is now refusing to start: > > root@monitor1:/usr/share/foreman# /etc/init.d/foreman start > /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:287:in `resolve': > Could not find gem 'audited-activerecord (= 3.0.0.rc1) ruby' in > the gems available on this machine. (Bundler::GemNotFound) > from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:161:in > `start' > from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in > `resolve' > from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in > `catch' > from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in > `resolve' > from > /usr/lib/ruby/vendor_ruby/bundler/definition.rb:192:in `resolve' > from > /usr/lib/ruby/vendor_ruby/bundler/definition.rb:127:in `specs' > from > /usr/lib/ruby/vendor_ruby/bundler/definition.rb:172:in `specs_for' > from > /usr/lib/ruby/vendor_ruby/bundler/definition.rb:161:in > `requested_specs' > from > /usr/lib/ruby/vendor_ruby/bundler/environment.rb:23:in > `requested_specs' > from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:11:in > `setup' > from /usr/lib/ruby/vendor_ruby/bundler.rb:107:in `setup' > from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17 > root@monitor1:/usr/share/foreman# gem install audited-activerecord > ERROR: Could not find a valid gem 'audited-activerecord' (>= 0) > in any repository > ERROR: Possible alternatives: ordered-active-record, > sskirby-activerecord, reactive-activerecord, > ambitious-activerecord, appetizer-activerecord > > I'm figuring I have a dependancy missing, but not sure where to > get it from? > > -Darryl > > > -- > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > To post to this group, send email to > foreman-users@googlegroups.com > . > To unsubscribe from this group, send email to > foreman-users+unsubscribe@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en. > > > -- > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to > foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en.

Is there anything new related to this?

I am having the same issue:

Failed to process report for test-7785.xxxx.net due to:PG::Error: ERROR:
null value in column "name" violates not-null constraint
: INSERT INTO "hosts" ("updated_at", "comment", "model_id", "hostgroup_id",
"mac", "owner_type", "organization_id", "uuid", "puppet_ca_proxy_id",
"last_freshcheck", "domain_id", "medium_id", "managed", "location_id",
"puppet_status", "created_at", "root_pass", "ip", "subnet_id",
"compute_resource_id", "certname", "serial", "ptable_id", "disk",
"last_compile", "operatingsystem_id", "environment_id", "name", "build",
"puppet_proxy_id", "enabled", "owner_id", "architecture_id", "image_id",
"source_file_id", "use_image", "last_report", "installed_at", "image_file",
"environment") VALUES ('2013-08-26 11:25:31.474321', NULL, NULL, NULL, '',
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4096, '2013-08-26
11:25:31.474321', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, 'f', NULL, 't', NULL, NULL, NULL, NULL, NULL, '2013-08-26
11:25:28.133707', NULL, NULL, NULL) RETURNING "id"

I have removed all gems and installed them with Bundler with no success. I
see that the insert does not insert any hostname but I do not know why.

Client machine does have an FQDN defined…

··· On Thursday, May 16, 2013 5:04:57 PM UTC+2, Lavinia Darlea wrote: > > Hi guys, > > I'm new around here, so please bare with me... > > I have the exact problem, though I have the rc1 audited-activerecord > version installed (rpm): > > yum list rubygem-audited-activerecord > Installed Packages > rubygem-audited-activerecord.noarch 3.0.0.rc1-1.el6 > > I'm using mysql instead, but I guess the heart of the problem is the same > since the error message looks identical except for* due to:PG::Error*becoming > *due to:Mysql::Error*. Maybe the "rc1*-1*" is the problem and I actually > need to downgrade it? That would be a shame... Any advice would be highly > appreciated! > > Thanks, > Lavinia > > On Wednesday, July 11, 2012 4:09:31 PM UTC+2, Darryl Ross wrote: >> >> Great, thanks, appears to be working now. >> Love the responsive help on this list, should have joined ages ago! >> >> -Darryl >> >> >> On 11/07/2012 11:31 PM, Sam Kottler wrote: >> >> Run: >> >> cd /usr/share/foreman && bundle install >> >> Bundler will make sure you have the right version (3.0.0.rc1) of >> audited-activerecord. >> >> On Wed, Jul 11, 2012 at 9:54 AM, Darryl Ross wrote: >> >>> Hi Ohad, >>> >>> After applying that patch, the service is now refusing to start: >>> >>> root@monitor1:/usr/share/foreman# /etc/init.d/foreman start >>> /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:287:in `resolve': Could >>> not find gem 'audited-activerecord (= 3.0.0.rc1) ruby' in the gems >>> available on this machine. (Bundler::GemNotFound) >>> from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:161:in `start' >>> from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in >>> `resolve' >>> from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in `catch' >>> from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:127:in >>> `resolve' >>> from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:192:in >>> `resolve' >>> from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:127:in >>> `specs' >>> from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:172:in >>> `specs_for' >>> from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:161:in >>> `requested_specs' >>> from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:23:in >>> `requested_specs' >>> from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:11:in `setup' >>> from /usr/lib/ruby/vendor_ruby/bundler.rb:107:in `setup' >>> from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17 >>> root@monitor1:/usr/share/foreman# gem install audited-activerecord >>> ERROR: Could not find a valid gem 'audited-activerecord' (>= 0) in any >>> repository >>> ERROR: Possible alternatives: ordered-active-record, >>> sskirby-activerecord, reactive-activerecord, ambitious-activerecord, >>> appetizer-activerecord >>> >>> I'm figuring I have a dependancy missing, but not sure where to get it >>> from? >>> >>> -Darryl >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To post to this group, send email to forema...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> foreman-user...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/foreman-users?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To post to this group, send email to forema...@googlegroups.com. >> To unsubscribe from this group, send email to >> foreman-user...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> >> >> >>