Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Chatwoot
  3. Super admin Console problem

Super admin Console problem

Scheduled Pinned Locked Moved Solved Chatwoot
11 Posts 4 Posters 2.0k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote on last edited by
    #2

    Have you tried to follow the steps mentioned in the link you posted? On Cloudron you can open a webterminal into the app via the Cloudron dashboard and then run the mentioned commands there. If this is a production instance of the app, maybe first create a fresh backup.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cHAp
      wrote on last edited by
      #3

      Yes, I have and get the following statement back:

      root@807d143a-8##################55cc2ef4804:/app/code# RAILS_ENV=production bundle exec rails c
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Scout Agent [4.1.2] Initialized
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Not Loading Instruments
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Scout Agent [4.1.2] Installed
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Monitoring isn't enabled for the [production] environment.
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Agent attempting to load in interactive mode.
      [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Deferring agent start. Standing by for first request
      /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:603:in `validate_secret_key_base': Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:437:in `secret_key_base'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-4.8.0/lib/devise/secret_key_finder.rb:24:in `key_exists?'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-4.8.0/lib/devise/secret_key_finder.rb:16:in `find'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-4.8.0/lib/devise/rails.rb:37:in `block in <class:Engine>'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `each'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `call'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
              from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in `run_initializers'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
              from /app/code/config/environment.rb:5:in `<main>'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:367:in `require_environment!'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/actions.rb:28:in `require_environment!'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/console/console_command.rb:101:in `perform'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
              from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
              from bin/rails:4:in `<main>'
      
      v_shnuV 1 Reply Last reply
      0
      • C cHAp

        Yes, I have and get the following statement back:

        root@807d143a-8##################55cc2ef4804:/app/code# RAILS_ENV=production bundle exec rails c
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Scout Agent [4.1.2] Initialized
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Not Loading Instruments
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Scout Agent [4.1.2] Installed
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Monitoring isn't enabled for the [production] environment.
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Agent attempting to load in interactive mode.
        [12/16/21 10:37:10 +0000 8##################55cc2ef4804 (295)] INFO : Deferring agent start. Standing by for first request
        /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:603:in `validate_secret_key_base': Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:437:in `secret_key_base'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-4.8.0/lib/devise/secret_key_finder.rb:24:in `key_exists?'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-4.8.0/lib/devise/secret_key_finder.rb:16:in `find'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/devise-4.8.0/lib/devise/rails.rb:37:in `block in <class:Engine>'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `each'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `call'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
                from /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in `run_initializers'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
                from /app/code/config/environment.rb:5:in `<main>'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:367:in `require_environment!'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/actions.rb:28:in `require_environment!'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/console/console_command.rb:101:in `perform'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
                from /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
                from bin/rails:4:in `<main>'
        
        v_shnuV Offline
        v_shnuV Offline
        v_shnu
        wrote on last edited by v_shnu
        #4

        @chap @nebulon My guess is this is due to the location of the .env file right now. It should be at /app/code/.env.

        an MR for the same --> https://git.cloudron.io/cloudron/chatwoot-app/-/merge_requests/1

        This also means env variable set using .env were not taking effect. Have there been users reporting issues related to that ?

        nebulonN 1 Reply Last reply
        0
        • v_shnuV v_shnu

          @chap @nebulon My guess is this is due to the location of the .env file right now. It should be at /app/code/.env.

          an MR for the same --> https://git.cloudron.io/cloudron/chatwoot-app/-/merge_requests/1

          This also means env variable set using .env were not taking effect. Have there been users reporting issues related to that ?

          nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #5

          @v_shnu thanks for the merge-request. I have built a new package version and this is published now. @cHAp can you check if this solves your issue after updating?

          C 1 Reply Last reply
          1
          • nebulonN nebulon

            @v_shnu thanks for the merge-request. I have built a new package version and this is published now. @cHAp can you check if this solves your issue after updating?

            C Offline
            C Offline
            cHAp
            wrote on last edited by cHAp
            #6

            @nebulon Hi there,
            very dear thanks! Now that looks like it should be, am I assuming?

            root@8+++++++55cc2ef4804:/app/code# RAILS_ENV=production bundle exec rails c
            [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
            [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Scout Agent [4.1.2] Initialized
            [12/16/21 18:17:01 +0000 +++++++55cc2ef4804 (53)] INFO : Not Loading Instruments
            [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Scout Agent [4.1.2] Installed
            [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Monitoring isn't enabled for the [production] environment.
            [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Agent attempting to load in interactive mode.
            [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Deferring agent start. Standing by for first request
            W, [2021-12-16T18:17:03.020736 #53]  WARN -- : Creating scope :open. Overwriting existing method Conversation.open.
            Loading production environment (Rails 6.1.4.1)
            irb(main):001:0>
            

            Why is that now?

            irb(main):001:0> s = SuperAdmin.create!(email: "mail@########.de", password: "##########")
            /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
                    Is the server running on that host and accepting TCP/IP connections?
            connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                    Is the server running on that host and accepting TCP/IP connections?
            /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (PG::ConnectionBad)
                    Is the server running on that host and accepting TCP/IP connections?
            connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                    Is the server running on that host and accepting TCP/IP connections?
            
            girishG 1 Reply Last reply
            0
            • C cHAp

              @nebulon Hi there,
              very dear thanks! Now that looks like it should be, am I assuming?

              root@8+++++++55cc2ef4804:/app/code# RAILS_ENV=production bundle exec rails c
              [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
              [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Scout Agent [4.1.2] Initialized
              [12/16/21 18:17:01 +0000 +++++++55cc2ef4804 (53)] INFO : Not Loading Instruments
              [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Scout Agent [4.1.2] Installed
              [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Monitoring isn't enabled for the [production] environment.
              [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Agent attempting to load in interactive mode.
              [12/16/21 18:17:01 +0000 8+++++++55cc2ef4804 (53)] INFO : Deferring agent start. Standing by for first request
              W, [2021-12-16T18:17:03.020736 #53]  WARN -- : Creating scope :open. Overwriting existing method Conversation.open.
              Loading production environment (Rails 6.1.4.1)
              irb(main):001:0>
              

              Why is that now?

              irb(main):001:0> s = SuperAdmin.create!(email: "mail@########.de", password: "##########")
              /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
                      Is the server running on that host and accepting TCP/IP connections?
              connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                      Is the server running on that host and accepting TCP/IP connections?
              /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (PG::ConnectionBad)
                      Is the server running on that host and accepting TCP/IP connections?
              connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                      Is the server running on that host and accepting TCP/IP connections?
              
              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by girish
              #7

              @chap not 100% sure, but can you set -o allexport; source /app/data/env; set +o allexport and then try the rails console again?

              We have to put this in the docs if that works.

              C 1 Reply Last reply
              0
              • girishG girish

                @chap not 100% sure, but can you set -o allexport; source /app/data/env; set +o allexport and then try the rails console again?

                We have to put this in the docs if that works.

                C Offline
                C Offline
                cHAp
                wrote on last edited by cHAp
                #8

                @girish Doesn't seem to work, does it?

                root@8074804:/app/code# RAILS_ENV=production bundle exec rails c
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Scout Agent [4.1.2] Initialized
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Not Loading Instruments
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Scout Agent [4.1.2] Installed
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Monitoring isn't enabled for the [production] environment.
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Agent attempting to load in interactive mode.
                [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Deferring agent start. Standing by for first request
                W, [2021-12-16T22:33:11.046679 #71]  WARN -- : Creating scope :open. Overwriting existing method Conversation.open.
                Loading production environment (Rails 6.1.4.1)
                
                
                irb(main):001:0> set -o allexport; source /app/data/env; set +o allexport
                /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/irb/workspace.rb:116:in `eval': (irb):1: syntax error, unexpected local variable or method, expecting `do' or '{' or '(' (SyntaxError)
                set -o allexport; source /app/data/env; set +...
                       ^~~~~~~~~
                (irb):1: unknown regexp options - data
                ... -o allexport; source /app/data/env; set +o allexport
                ...                          ^~~~~
                (irb):1: syntax error, unexpected local variable or method, expecting `do' or '{' or '('
                .../app/data/env; set +o allexport
                ...                      ^~~~~~~~~
                
                
                
                irb(main):002:0> s = SuperAdmin.create!(email: "mail@#####.de", password: "PASSWORD")
                /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
                        Is the server running on that host and accepting TCP/IP connections?
                connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                        Is the server running on that host and accepting TCP/IP connections?
                /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (PG::ConnectionBad)
                        Is the server running on that host and accepting TCP/IP connections?
                connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                        Is the server running on that host and accepting TCP/IP connections?
                irb(main):003:0> 
                

                If I enter the command in front of the rails, there is no output! If I go to Rails, I'm in there, but I can't set up a Super_Admin. Mistake the same!

                girishG 1 Reply Last reply
                0
                • C cHAp

                  @girish Doesn't seem to work, does it?

                  root@8074804:/app/code# RAILS_ENV=production bundle exec rails c
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Scout Agent [4.1.2] Initialized
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Not Loading Instruments
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Scout Agent [4.1.2] Installed
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Monitoring isn't enabled for the [production] environment.
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Agent attempting to load in interactive mode.
                  [12/16/21 22:33:09 +0000 8074804 (71)] INFO : Deferring agent start. Standing by for first request
                  W, [2021-12-16T22:33:11.046679 #71]  WARN -- : Creating scope :open. Overwriting existing method Conversation.open.
                  Loading production environment (Rails 6.1.4.1)
                  
                  
                  irb(main):001:0> set -o allexport; source /app/data/env; set +o allexport
                  /root/.rbenv/versions/3.0.2/lib/ruby/3.0.0/irb/workspace.rb:116:in `eval': (irb):1: syntax error, unexpected local variable or method, expecting `do' or '{' or '(' (SyntaxError)
                  set -o allexport; source /app/data/env; set +...
                         ^~~~~~~~~
                  (irb):1: unknown regexp options - data
                  ... -o allexport; source /app/data/env; set +o allexport
                  ...                          ^~~~~
                  (irb):1: syntax error, unexpected local variable or method, expecting `do' or '{' or '('
                  .../app/data/env; set +o allexport
                  ...                      ^~~~~~~~~
                  
                  
                  
                  irb(main):002:0> s = SuperAdmin.create!(email: "mail@#####.de", password: "PASSWORD")
                  /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
                          Is the server running on that host and accepting TCP/IP connections?
                  connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                          Is the server running on that host and accepting TCP/IP connections?
                  /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize': connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (PG::ConnectionBad)
                          Is the server running on that host and accepting TCP/IP connections?
                  connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
                          Is the server running on that host and accepting TCP/IP connections?
                  irb(main):003:0> 
                  

                  If I enter the command in front of the rails, there is no output! If I go to Rails, I'm in there, but I can't set up a Super_Admin. Mistake the same!

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #9

                  @chap a temporary workaround.

                  • Open a Web Terminal
                  • Run in the terminal/bash (and not inside rails console)
                  export POSTGRES_DATABASE="${CLOUDRON_POSTGRESQL_DATABASE}"
                  export POSTGRES_USERNAME="${CLOUDRON_POSTGRESQL_USERNAME}"
                  export POSTGRES_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}"
                  export POSTGRES_HOST="${CLOUDRON_POSTGRESQL_HOST}"
                  export POSTGRES_PORT="${CLOUDRON_POSTGRESQL_PORT}"
                  

                  IMPORTANT: do not run the above commands inside the rails console. It should be in the initial bash shell.

                  • Now open the rails console:
                  # RAILS_ENV=production bundle exec rails c
                  

                  I can confirm the above works

                  C 1 Reply Last reply
                  1
                  • girishG girish

                    @chap a temporary workaround.

                    • Open a Web Terminal
                    • Run in the terminal/bash (and not inside rails console)
                    export POSTGRES_DATABASE="${CLOUDRON_POSTGRESQL_DATABASE}"
                    export POSTGRES_USERNAME="${CLOUDRON_POSTGRESQL_USERNAME}"
                    export POSTGRES_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}"
                    export POSTGRES_HOST="${CLOUDRON_POSTGRESQL_HOST}"
                    export POSTGRES_PORT="${CLOUDRON_POSTGRESQL_PORT}"
                    

                    IMPORTANT: do not run the above commands inside the rails console. It should be in the initial bash shell.

                    • Now open the rails console:
                    # RAILS_ENV=production bundle exec rails c
                    

                    I can confirm the above works

                    C Offline
                    C Offline
                    cHAp
                    wrote on last edited by
                    #10

                    @girish Hi there,
                    Thank you very much! Can confirm it too! Everything looks much, much better and the login also works in Super_Admin!

                    Connecting...
                    If you resize the browser window, press Ctrl+D to start a new session with the current size.
                    root@807d143a-f55cc2ef4804:/app/code# export POSTGRES_DATABASE="${CLOUDRON_POSTGRESQL_DATABASE}"
                    root@807d143a-f55cc2ef4804:/app/code# export POSTGRES_USERNAME="${CLOUDRON_POSTGRESQL_USERNAME}"
                    root@807d143a-f55cc2ef4804:/app/code# export POSTGRES_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}"
                    root@807d143a-f55cc2ef4804:/app/code# export POSTGRES_HOST="${CLOUDRON_POSTGRESQL_HOST}"
                    root@807d143a-f55cc2ef4804:/app/code# export POSTGRES_PORT="${CLOUDRON_POSTGRESQL_PORT}"
                    root@807d143a-f55cc2ef4804:/app/code# RAILS_ENV=production bundle exec rails c
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : No configuration file loaded, and no configuration found in ENV. For assistance configuring Scout, visit https://docs.scoutapm.com/#ruby-configuration-options
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : Scout Agent [4.1.2] Initialized
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : Not Loading Instruments
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : Scout Agent [4.1.2] Installed
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : Monitoring isn't enabled for the [production] environment.
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : Agent attempting to load in interactive mode.
                    [12/17/21 09:41:06 +0000 807d143a-f55cc2ef4804 (111)] INFO : Deferring agent start. Standing by for first request
                    W, [2021-12-17T09:41:07.947941 #111]  WARN -- : Creating scope :open. Overwriting existing method Conversation.open.
                    Loading production environment (Rails 6.1.4.1)
                    irb(main):001:0> s = SuperAdmin.create!(email: "E_MAIL_ADRESSE", password: PASSWORD")
                    => #<SuperAdmin id: 1, email: "E_MAIL_ADRESSE", created_at: "2021-12-17 09:41:39.296219000 +0000", updated_at: "2021-12-17 09:41:39.296219000 +0000">
                    irb(main):002:0> quit
                    root@807d143a-f55cc2ef4804:/app/code#
                    
                    1 Reply Last reply
                    1
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #11

                      The latest package fixes this. Docs are at https://docs.cloudron.io/apps/chatwoot/#rails-console

                      1 Reply Last reply
                      2
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search