Discourse AI-Installation schlägt fehl

Weiß jemand, was die folgende Fehlermeldung verursachen könnte, wenn versucht wird, das Discourse AI-Plugin zu installieren?

Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate' fehlgeschlagen mit Rückgabe #<Process::Status: pid 1675 exit 1> Ort des Fehlschlags: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec fehlgeschlagen mit den Parametern {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]} Bootstrap fehlgeschlagen mit Exit-Code 1

Ref: Discourse AI

Vielen Dank für jede Hilfe.

1 „Gefällt mir“

Ist es definitiv das KI-Plugin? Haben Sie mehr vom letzten Teil der Protokolle, damit wir den/die Fehler sehen können?

2 „Gefällt mir“

Ich erinnere mich, ein ähnliches Problem hier gesehen zu haben:

1 „Gefällt mir“

Hier ist eine vollständigere Liste der Log-Einträge, ganz am Ende des Logs. Ich habe jetzt alle 575 Zeilen, also lassen Sie es mich wissen, wenn Sie die vollständige Liste wünschen.

1. 98:M 15 Jul 2024 15:46:33.090 # User requested shutdown...

2. 98:M 15 Jul 2024 15:46:33.090 * Saving the final RDB snapshot before exiting.

3. 2024-07-15 15:46:33.103 UTC [36] LOG: database system is shut down

4. 98:M 15 Jul 2024 15:46:33.205 * DB saved on disk

5. 98:M 15 Jul 2024 15:46:33.205 # Redis is now ready to exit, bye bye...

* FAILED

6. --------------------

7. Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1676 exit 1>

8. Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'

9. exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}

10. bootstrap failed with exit code 1

11. ** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

12. ./discourse-doctor may help diagnose the problem.

13. 1143b37805d37aeca127453b4c978fff71efca2bd2ed56be58acd404c7ea8f49

Weiter oben sollte ein Fehler aufgetreten sein, deshalb werden Sie am Ende des Protokolls aufgefordert:

Hier bitte. Hier scheinen die Fehler zu beginnen.

1. I, [2024-07-15T15:46:21.288666 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf

2. I, [2024-07-15T15:46:21.290036 #1] INFO -- : > sleep 10

3. 1673:C 15 Jul 2024 15:46:21.296 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

4. 1673:C 15 Jul 2024 15:46:21.296 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=1673, just started

5. 1673:C 15 Jul 2024 15:46:21.296 # Configuration loaded

6. 1673:M 15 Jul 2024 15:46:21.297 * monotonic clock: POSIX clock_gettime

7. 1673:M 15 Jul 2024 15:46:21.297 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use

8. 1673:M 15 Jul 2024 15:46:21.297 # Failed listening on port 6379 (TCP), aborting.

9. I, [2024-07-15T15:46:31.293903 #1] INFO -- :

10. I, [2024-07-15T15:46:31.294204 #1] INFO -- : > cd /var/www/discourse & bundle exec rake db:migrate

11. rake aborted!

12. LoadError: cannot load such file -- tokenizers/tokenizers (LoadError)

13. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'

14. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'

15. /var/www/discourse/plugins/discourse-ai/gems/3.3.3/gems/tokenizers-0.4.2-x86_64-linux/lib/tokenizers.rb:5:in `rescue in <main>'

16. /var/www/discourse/plugins/discourse-ai/gems/3.3.3/gems/tokenizers-0.4.2-x86_64-linux/lib/tokenizers.rb:2:in `<main>'

17. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'

18. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'

19. /var/www/discourse/lib/plugin_gem.rb:27:in `load'

20. /var/www/discourse/lib/plugin/instance.rb:857:in `gem'

21. /var/www/discourse/plugins/discourse-ai/plugin.rb:11:in `activate!'

22. /var/www/discourse/lib/plugin/instance.rb:754:in `instance_eval'

23. /var/www/discourse/lib/plugin/instance.rb:754:in `activate!'

24. /var/www/discourse/lib/discourse.rb:347:in `block in activate_plugins!'

25. /var/www/discourse/lib/discourse.rb:344:in `each'

26. /var/www/discourse/lib/discourse.rb:344:in `activate_plugins!'

27. /var/www/discourse/config/application.rb:227:in `block in <class:Application>'

28. /var/www/discourse/lib/plugin.rb:6:in `initialization_guard'

29. /var/www/discourse/config/application.rb:227:in `<class:Application>'

30. /var/www/discourse/config/application.rb:75:in `<module:Discourse>'

31. /var/www/discourse/config/application.rb:74:in `<top (required)>'

32. /var/www/discourse/Rakefile:7:in `<top (required)>'

33. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'

34. /usr/local/bin/bundle:25:in `load'

35. /usr/local/bin/bundle:25:in `<main>'

* Caused by:

36. LoadError: cannot load such file -- tokenizers/3.3/tokenizers (LoadError)

37. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'

38. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'

39. /var/www/discourse/plugins/discourse-ai/gems/3.3.3/gems/tokenizers-0.4.2-x86_64-linux/lib/tokenizers.rb:3:in `<main>'

40. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'

41. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'

42. /var/www/discourse/lib/plugin_gem.rb:27:in `load'

43. /var/www/discourse/lib/plugin/instance.rb:857:in `gem'

44. /var/www/discourse/plugins/discourse-ai/plugin.rb:11:in `activate!'

45. /var/www/discourse/lib/plugin/instance.rb:754:in `instance_eval'

46. /var/www/discourse/lib/plugin/instance.rb:754:in `activate!'

47. /var/www/discourse/lib/discourse.rb:347:in `block in activate_plugins!'

48. /var/www/discourse/lib/discourse.rb:344:in `each'

49. /var/www/discourse/lib/discourse.rb:344:in `activate_plugins!'

50. /var/www/discourse/config/application.rb:227:in `block in <class:Application>'

51. /var/www/discourse/lib/plugin.rb:6:in `initialization_guard'

52. /var/www/discourse/config/application.rb:227:in `<class:Application>'

53. /var/www/discourse/config/application.rb:75:in `<module:Discourse>'

54. /var/www/discourse/config/application.rb:74:in `<top (required)>'

55. /var/www/discourse/Rakefile:7:in `<top (required)>'

56. /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'

57. /usr/local/bin/bundle:25:in `load'

58. /usr/local/bin/bundle:25:in `<main>'

59. (See full trace by running task with --trace)

60. I, [2024-07-15T15:46:33.013894 #1] INFO -- : gem install tokenizers -v 0.4.2 -i /var/www/discourse/plugins/discourse-ai/gems/3.3.3 --no-document --ignore-dependencies --no-user-install

61. Successfully installed tokenizers-0.4.2-x86_64-linux

62. 1 gem installed

* I, [2024-07-15T15:46:33.014198 #1] INFO -- : Terminating async processes

63. I, [2024-07-15T15:46:33.014218 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 36

64. I, [2024-07-15T15:46:33.014237 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 98

65. 98:signal-handler (1721058393) Received SIGTERM scheduling shutdown...

66. 2024-07-15 15:46:33.014 UTC [36] LOG: received fast shutdown request

67. 2024-07-15 15:46:33.045 UTC [36] LOG: aborting any active transactions

68. 2024-07-15 15:46:33.046 UTC [36] LOG: background worker "logical replication launcher" (PID 51) exited with exit code 1

69. 2024-07-15 15:46:33.048 UTC [46] LOG: shutting down

70. 98:M 15 Jul 2024 15:46:33.090 # User requested shutdown...

71. 98:M 15 Jul 2024 15:46:33.090 * Saving the final RDB snapshot before exiting.

72. 2024-07-15 15:46:33.103 UTC [36] LOG: database system is shut down

73. 98:M 15 Jul 2024 15:46:33.205 * DB saved on disk

74. 98:M 15 Jul 2024 15:46:33.205 # Redis is now ready to exit, bye bye...

* FAILED

75. --------------------

76. Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1676 exit 1>

77. Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'

78. exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}

79. bootstrap failed with exit code 1

80. ** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

81. ./discourse-doctor may help diagnose the problem.

82. 1143b37805d37aeca127453b4c978fff71efca2bd2ed56be58acd404c7ea8f49
1 „Gefällt mir“

Sieht fast identisch aus mit dem, was ich in Cannot rebuild with Discourse AI geteilt habe. Während beide Fehlerprotokolle ein gemeinsames Problem mit der tokenizers-Bibliothek aufweisen, das den Befehl rake db:migrate fehlschlagen lässt, enthält Ihr Fehler eine zusätzliche Fehlermeldung beim Starten des Redis-Servers, die bei mir nicht vorhanden ist.\n\n@JammyDodger, wie ich in Cannot rebuild with Discourse AI geteilt habe, ist es definitiv das KI-Plugin.

1 „Gefällt mir“

Ja, dies scheint auch ein Problem mit den Tokenizern zu sein. Ich werde sehen, was ich herausfinden kann. :eyes:

3 „Gefällt mir“

@PeakProsperity - Welchem Discourse-Zweig folgt Ihre Website? Sind Sie zufällig auf beta oder stable?

Wir sind derzeit auf 3.2.1.

Ich bin auf 3.2.4. Diesmal ist bei mir auch der Redis-Fehler aufgetreten. Ich glaube, die Logs, die ich zuvor geteilt habe, waren von 3.2.1. Alles funktionierte einwandfrei, als ich Discourse (unwissentlich) aus den neuesten Commits auf main erstellte. Es brach, als ich aus dem stabilen Branch neu erstellte.

Wir haben Ruby kürzlich auf 3.3 aktualisiert, und da Sie sich auf 3.2.1 befinden, ist das Plugin aus Kompatibilitätsgründen an einen älteren Commit angeheftet. In diesem Commit sind die zusätzlichen Gems, die das Plugin benötigt, inkompatibel mit 3.3.

Discourse 3.3 steht kurz bevor und sollte das Problem beheben, aber ich wollte Sie nicht hängen lassen oder Sie zwingen, beta/tests-passed zu folgen. Ich hefte das Plugin an einen Commit an, der Ruby 3.3-kompatibel ist:

Bitte lassen Sie mich wissen, ob Sie beim Neuerstellen immer noch Fehler auftreten.

3 „Gefällt mir“

Vielen Dank für die schnelle Fehlerbehebung! :pray: Das tokenizers-Gem wurde erfolgreich installiert, aber ich erhalte einen neuen Fehler:

NoMethodError: undefined method `commands=' for an instance of AiPersona (NoMethodError)
Details

I, [2024-07-17T22:56:15.152388 #1] INFO – : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-07-17T22:56:15.154420 #1] INFO – : > sleep 10
1718:C 17 Jul 2024 22:56:15.172 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1718:C 17 Jul 2024 22:56:15.172 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=1718, just started
1718:C 17 Jul 2024 22:56:15.172 # Configuration loaded
1718:M 17 Jul 2024 22:56:15.173 * monotonic clock: POSIX clock_gettime
1718:M 17 Jul 2024 22:56:15.174 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
1718:M 17 Jul 2024 22:56:15.174 # Failed listening on port 6379 (TCP), aborting.
I, [2024-07-17T22:56:25.158167 #1] INFO – :
I, [2024-07-17T22:56:25.158535 #1] INFO – : > cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’
97:M 17 Jul 2024 22:58:13.874 * 100 changes in 300 seconds. Saving…
97:M 17 Jul 2024 22:58:13.877 * Background saving started by pid 3947
3947:C 17 Jul 2024 22:58:14.323 * DB saved on disk
3947:C 17 Jul 2024 22:58:14.326 * Fork CoW for RDB: current 2 MB, peak 2 MB, average 1 MB
97:M 17 Jul 2024 22:58:14.379 * Background saving terminated with success
rake aborted!
NoMethodError: undefined method `commands=’ for an instance of AiPersona (NoMethodError)

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:58:in block in open' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in open’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in open' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:36:in block in run_file’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/transaction.rb:319:in block in within_new_transaction' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/transaction.rb:317:in within_new_transaction’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in transaction' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/transactions.rb:209:in transaction’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:35:in run_file' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:26:in block in run’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in each' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in run’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/discourse-seed-fu-2.3.12/lib/discourse-seed-fu.rb:29:in seed' /var/www/discourse/lib/tasks/db.rake:259:in block (2 levels) in ’
/var/www/discourse/lib/distributed_mutex.rb:53:in block in synchronize' /var/www/discourse/lib/distributed_mutex.rb:49:in synchronize’
/var/www/discourse/lib/distributed_mutex.rb:49:in synchronize' /var/www/discourse/lib/distributed_mutex.rb:34:in synchronize’
/var/www/discourse/lib/tasks/db.rake:231:in block in <main>' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in <top (required)>’
/usr/local/bin/bundle:25:in load' /usr/local/bin/bundle:25:in
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I, [2024-07-17T22:58:15.868384 #1] INFO – : Terminating async processes
I, [2024-07-17T22:58:15.869101 #1] INFO – : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 35
I, [2024-07-17T22:58:15.869356 #1] INFO – : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 97
97:signal-handler (1721257095) Received SIGTERM scheduling shutdown…
2024-07-17 22:58:15.869 UTC [35] LOG: received fast shutdown request
2024-07-17 22:58:15.874 UTC [35] LOG: aborting any active transactions
2024-07-17 22:58:15.880 UTC [35] LOG: background worker “logical replication launcher” (PID 50) exited with exit code 1
2024-07-17 22:58:15.880 UTC [45] LOG: shutting down
97:M 17 Jul 2024 22:58:15.887 # User requested shutdown…
97:M 17 Jul 2024 22:58:15.887 * Saving the final RDB snapshot before exiting.
2024-07-17 22:58:15.917 UTC [35] LOG: database system is shut down
97:M 17 Jul 2024 22:58:16.349 * DB saved on disk
97:M 17 Jul 2024 22:58:16.349 # Redis is now ready to exit, bye bye…

FAILED

Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 1722 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn’
exec failed with the params {“cd”=>“$home”, “tag”=>“migrate”, “hook”=>“db_migrate”, “cmd”=>[“su discourse -c ‘bundle exec rake db:migrate’”]}
bootstrap failed with exit code 1

Hmm, das ist unerwartet.

@aas - Können Sie prüfen, ob Sie ausstehende Migrationen haben?

./launcher enter app
LOAD_PLUGINS=1 bundle exec rake db:migrate

Im Grunde verwenden Sie das Plugin aus diesem Branch, und Personas hat dort die Spalte command.

Das hat den Trick gemacht! Wir konnten die Installation abschließen. Ich gehe davon aus, dass beim nächsten Mal, wenn wir ein Discourse-Update ausführen, die aktuellste Version übernommen wird, oder?

2 „Gefällt mir“

Here is the output. Not sure what’s up with this because my Discourse instance is up and running just fine.

LOAD_PLUGINS=1 bundle exec rake db:migrate

root@forum-app:/var/www/discourse# LOAD_PLUGINS=1 bundle exec rake db:migrate
kfatal: detected dubious ownership in repository at ‘/var/www/discourse’
To add an exception for this directory, call:

git config --global --add safe.directory /var/www/discourse

rake aborted!
ActiveRecord::NoDatabaseError: We could not find your database: discourse. Which can be found in the database configuration file located at config/database.yml. (ActiveRecord::NoDatabaseError)

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in rescue in new_client' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in new_client’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in postgresql_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in public_send’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in new_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in checkout_new_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in try_to_checkout_new_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in acquire_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in checkout' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in retrieve_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:313:in retrieve_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:280:in connection' /var/www/discourse/lib/site_settings/db_provider.rb:58:in table_exists?’
/var/www/discourse/lib/site_settings/db_provider.rb:14:in all' /var/www/discourse/lib/site_settings/defaults_provider.rb:30:in db_all’
/var/www/discourse/lib/site_setting_extension.rb:260:in block in refresh!' /var/www/discourse/lib/site_setting_extension.rb:253:in synchronize’
/var/www/discourse/lib/site_setting_extension.rb:253:in refresh!' /var/www/discourse/lib/site_setting_extension.rb:528:in block in setup_methods’
/var/www/discourse/config/initializers/100-push-notifications.rb:13:in block in <main>' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:445:in instance_exec’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:445:in block in make_lambda' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:199:in block (2 levels) in halting’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:687:in block (2 levels) in default_terminator' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:686:in catch’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:686:in block in default_terminator' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:200:in block in halting’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:595:in block in invoke_before' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:595:in each’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:595:in invoke_before' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:106:in run_callbacks’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/reloader.rb:88:in prepare!' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application/finisher.rb:68:in block in module:Finisher
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:32:in instance_exec' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:32:in run’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:61:in block in run_initializers' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:60:in run_initializers’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application.rb:372:in initialize!' /var/www/discourse/config/environment.rb:7:in
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in require’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application.rb:348:in require_environment!' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application.rb:506:in block in run_tasks_blocks’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in <top (required)>' /usr/local/bin/bundle:25:in load’
/usr/local/bin/bundle:25:in `’

Caused by:
PG::ConnectionBad: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: FATAL: Peer authentication failed for user “discourse” (PG::ConnectionBad)
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.4/lib/pg/connection.rb:696:in async_connect_or_reset' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.4/lib/pg/connection.rb:824:in connect_to_hosts’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.4/lib/pg/connection.rb:759:in new' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.4/lib/pg.rb:63:in connect’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:78:in new_client' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in postgresql_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in public_send' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in new_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in checkout_new_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in try_to_checkout_new_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in acquire_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in checkout’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in retrieve_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:313:in retrieve_connection' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8/lib/active_record/connection_handling.rb:280:in connection’
/var/www/discourse/lib/site_settings/db_provider.rb:58:in table_exists?' /var/www/discourse/lib/site_settings/db_provider.rb:14:in all’
/var/www/discourse/lib/site_settings/defaults_provider.rb:30:in db_all' /var/www/discourse/lib/site_setting_extension.rb:260:in block in refresh!’
/var/www/discourse/lib/site_setting_extension.rb:253:in synchronize' /var/www/discourse/lib/site_setting_extension.rb:253:in refresh!’
/var/www/discourse/lib/site_setting_extension.rb:528:in block in setup_methods' /var/www/discourse/config/initializers/100-push-notifications.rb:13:in block in ’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:445:in instance_exec' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:445:in block in make_lambda’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:199:in block (2 levels) in halting' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:687:in block (2 levels) in default_terminator’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:686:in catch' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:686:in block in default_terminator’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:200:in block in halting' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:595:in block in invoke_before’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:595:in each' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:595:in invoke_before’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/callbacks.rb:106:in run_callbacks' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8/lib/active_support/reloader.rb:88:in prepare!’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application/finisher.rb:68:in block in <module:Finisher>' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:32:in instance_exec’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:32:in run' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:61:in block in run_initializers’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/initializable.rb:60:in run_initializers' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application.rb:372:in initialize!’
/var/www/discourse/config/environment.rb:7:in <main>' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in require' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application.rb:348:in require_environment!’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.0.8/lib/rails/application.rb:506:in block in run_tasks_blocks' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in <top (required)>’
/usr/local/bin/bundle:25:in load' /usr/local/bin/bundle:25:in
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)

Is there something I need to do to build the plugin from this branch? I just have git clone https://github.com/discourse/discourse-ai.git in my app.yaml.

EDIT: Sounds like I can do that by changing it to git clone -b security/backport-ssrf-protection https://github.com/discourse/discourse-ai.git. However, that doesn’t seem necessary since the PR referenced above was merged in the main branch. :thinking:

1 „Gefällt mir“

Ja. Sobald Discourse v3.3 veröffentlicht wird, verwenden Sie die neueste Version des Plugins.

Nicht nötig. Das wird automatisch erledigt. Versuchen Sie, erneut zu rebuilden, und sehen wir, ob die fehlenden Migrationen ausgeführt werden.

Leider habe ich das gleiche Ergebnis erhalten :sadpanda:

1719:M 18 Jul 2024 14:58:24.143 # Warnung: Konnte keinen TCP-Server-Listener-Socket erstellen *:6379: bind: Adresse bereits in Verwendung
1719:M 18 Jul 2024 14:58:24.143 # Fehler beim Lauschen auf Port 6379 (TCP), Abbruch.
I, [2024-07-18T14:58:34.132729 #1]  INFO -- :
I, [2024-07-18T14:58:34.133090 #1]  INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
97:M 18 Jul 2024 15:00:31.873 * 100 Änderungen in 300 Sekunden. Speichere...
97:M 18 Jul 2024 15:00:31.876 * Hintergrundspeicherung gestartet von PID 3948
3948:C 18 Jul 2024 15:00:32.356 * DB auf Festplatte gespeichert
3948:C 18 Jul 2024 15:00:32.358 * Fork CoW für RDB: aktuell 1 MB, Spitze 1 MB, Durchschnitt 1 MB
97:M 18 Jul 2024 15:00:32.378 * Hintergrundspeicherung erfolgreich beendet
rake aborted!
NoMethodError: undefinierte Methode `commands=' für eine Instanz von AiPersona (NoMethodError)
.
.
.
I, [2024-07-18T15:00:33.541391 #1]  INFO -- : Asynchrone Prozesse werden beendet
I, [2024-07-18T15:00:33.541460 #1]  INFO -- : Sende INT an HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 35
I, [2024-07-18T15:00:33.541515 #1]  INFO -- : Sende TERM an exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 97
2024-07-18 15:00:33.542 UTC [35] LOG:  schnelle Herunterfahr-Anforderung empfangen
97:signal-handler (1721314833) SIGTERM empfangen, Herunterfahren wird geplant...
2024-07-18 15:00:33.546 UTC [35] LOG:  aktive Transaktionen werden abgebrochen
2024-07-18 15:00:33.550 UTC [35] LOG:  Hintergrundarbeiter "logical replication launcher" (PID 50) mit Exit-Code 1 beendet
2024-07-18 15:00:33.555 UTC [45] LOG:  wird heruntergefahren
97:M 18 Jul 2024 15:00:33.585 # Benutzer hat Herunterfahren angefordert...
97:M 18 Jul 2024 15:00:33.585 * Speichere den finalen RDB-Snapshot vor dem Beenden.
2024-07-18 15:00:33.586 UTC [35] LOG:  Datenbanksystem wird heruntergefahren
97:M 18 Jul 2024 15:00:34.067 * DB auf Festplatte gespeichert
97:M 18 Jul 2024 15:00:34.067 # Redis ist nun bereit zum Beenden, auf Wiedersehen...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate' fehlgeschlagen mit Rückgabe #<Process::Status: pid 1722 exit 1>
Ort des Fehlschlags: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec fehlgeschlagen mit den Parametern {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap fehlgeschlagen mit Exit-Code 1
** BOOTSTRAP FEHLGESCHLAGEN ** bitte scrollen Sie nach oben und suchen Sie nach früheren Fehlermeldungen, es kann mehr als eine geben.

Wir haben das per PM geklärt. Dies geschah, weil die Instanz zuvor tests-passed gefolgt hat und dann zu stable gewechselt ist. Ein Downgrade wird nicht empfohlen, da Ihr Datenbankschema von dem abweicht, was der App-Code erwartet.

4 „Gefällt mir“

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.