Executed an external process which logged to STDERR: /etc/puppetlabs/puppet/node.rb:447:

hi all,

the puppetserver.log is full of below error, does anyone have an idea why?

2023-09-06T09:17:30.410+02:00 WARN  [qtp2121333850-320] [c.p.p.ShellUtils] Executed an external process which logged to STDERR: /etc/puppetlabs/puppet/node.rb:447: warning: constant ::TimeoutError is deprecated
Serving cached ENC: execution expired

And I cannot start foreman.
production.log


2023-09-06T09:21:27 [I|app|] Rails cache backend: File
2023-09-06T09:21:27 [I|app|] Rails cache backend: File
2023-09-06T09:21:28 [I|app|] Rails cache backend: File
2023-09-06T09:21:28 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2023-09-06T09:21:28 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2023-09-06T09:21:28 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2023-09-06T09:21:29 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2023-09-06T09:21:29 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2023-09-06T09:21:29 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2023-09-06T09:21:29 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2023-09-06T09:21:29 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2023-09-06T09:21:29 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2023-09-06T09:21:42 [I|app|] Rails cache backend: File
2023-09-06T09:21:42 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2023-09-06T09:21:42 [I|app|] Rails cache backend: File
2023-09-06T09:21:42 [I|app|] Rails cache backend: File
2023-09-06T09:21:43 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2023-09-06T09:21:43 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
2023-09-06T09:21:43 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2023-09-06T09:21:43 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2023-09-06T09:21:44 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2023-09-06T09:21:44 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2023-09-06T09:21:44 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2023-09-06T09:21:44 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.

Foreman and Proxy versions: foreman 3.6.1 , foreman-proxy 3.6.1
Distribution and version: Ubuntu 20.04.4 LTS

thanks in advance

That’s an unexpected one. I wonder if clearing the sessions helps (foreman-rake db:sessions:clear).

1 Like

should I stop foreman/puppetserver and then run it or its doesnt matter?

grep -i error puppetserver.log its full with below error


  "error": {"message":"PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"sessions_pkey\"\nDETAIL:  Key (id)=(189461019) already exists.\n"}
/etc/puppetlabs/puppet/node.rb:447: warning: constant ::TimeoutError is deprecated
Serving cached ENC: Error retrieving node central.centre-d-imagerie-medicale.fr: Net::HTTPInternalServerError
2023-09-06T09:40:30.932+02:00 WARN  [qtp2121333850-271] [c.p.p.ShellUtils] Executed an external process which logged to STDERR: sr00021125.medi.local: During the fact upload the server responded with: 500 Internal Server Error. Err
or is ignored and the execution continues.
  "error": {"message":"PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"sessions_pkey\"\nDETAIL:  Key (id)=(189461022) already exists.\n"}
/etc/puppetlabs/puppet/node.rb:447: warning: constant ::TimeoutError is deprecated
Serving cached ENC: Error retrieving node sr00021125.medi.local: Net::HTTPInternalServerError
2023-09-06T09:40:31.342+02:00 WARN  [qtp2121333850-153] [c.p.p.ShellUtils] Executed an external process which logged to STDERR: grbaji01: During the fact upload the server responded with: 500 Internal Server Error. Error is ignored
 and the execution continues.
  "error": {"message":"PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"sessions_pkey\"\nDETAIL:  Key (id)=(189461026) already exists.\n"}
/etc/puppetlabs/puppet/node.rb:447: warning: constant ::TimeoutError is deprecated
Serving cached ENC: Error retrieving node grbaji01: Net::HTTPInternalServerError

Shouldn’t matter.

1 Like

@ekohl I get now below errors in production.log:


2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact macaddress_Ethernet could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [I|app|8f73eb91] Started POST "/api/hosts/facts" for 195.62.121.79 at 2023-09-06 10:06:23 +0200
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact timezone could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact system_uptime::days could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [I|app|8f73eb91] Processing by Api::V2::HostsController#facts as JSON
2023-09-06T10:06:23 [E|app|1937c51e] Fact rubyversion could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact system_uptime::hours could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 

2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact system_uptime::seconds could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact rubyplatform could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact system_uptime::uptime could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact uptime_seconds could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact rubysitedir could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact uptime could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact aio_agent_version could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact facterversion could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact identity::user could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact mtu_Ethernet could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact netmask_Ethernet could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact kernel could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact identity::privileged could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact id could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact networking::primary could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 6d7e1d9e | 
2023-09-06T10:06:23 [E|app|1937c51e] Fact processor0 could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
 1937c51e | 
2023-09-06T10:06:23 [E|app|6d7e1d9e] Fact networking::network could not be imported because of PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block

This is probably all related to Upgrade Foreman 3.6 to 3.7 but Postgresql 10
Since you have somehow managed to switch to a broken DB import, I would expect some components not to work. The ENC script is probably reporting errors since fact uploads are not working.

1 Like

yes you are right and thanks for your help, its “solved”