Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed 500 Internal Server Error in Xms #20

Open
a1exus opened this issue Oct 30, 2024 · 0 comments
Open

Completed 500 Internal Server Error in Xms #20

a1exus opened this issue Oct 30, 2024 · 0 comments

Comments

@a1exus
Copy link

a1exus commented Oct 30, 2024

hello,

i'm trying to follow the quick start, however this time instead of going make route, I tried using existing image:

$ uname -a
Linux gamma 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux
$ cat /etc/debian_version 
12.7
$ docker --version
Docker version 27.3.1, build ce12230
$ docker compose version
Docker Compose version v2.29.7
$ 
$ cat docker-compose.yaml 
services:
  lobster:
    container_name: lobsters
    env_file: lobsters.env
    expose:
      - 3000
    image: utensils/lobsters
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_traefik"
      - "traefik.http.routers.lobster.entrypoints=websecure"
      - 'traefik.http.routers.lobster.rule=Host(`FQDN`)'
      - "traefik.http.routers.lobster.tls.certresolver=myresolver"
    networks:
      - mailserver
      - mariadb
      - traefik
    restart: always
networks:
  mailserver:
    name: mailserver_mailserver
    external: true
  mariadb:
    name: mariadb_mariadb
    external: true
  traefik:
    name: traefik_traefik
    external: true
$ cat lobsters.env 
LOBSTER_DATABASE=X
LOBSTER_HOSTNAME=FQDN
LOBSTER_SITE_NAME="X"
MARIADB_HOST=mariadb
MARIADB_PASSWORD=X
MARIADB_USER=X
RAILS_ENV=production
SECRET_KEY=X
SMTP_HOST=mailserver
SMTP_PASSWORD=X
SMTP_PORT=587
SMTP_USERNAME='X@FQDN'
$ 

and even though it starts, I'm getting 500 error as soon as I hit the frontpage((

lobsters  | 2024-10-30 01:38:26 - Running cron jobs.
lobsters  | /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_methods/time_zone_conversion.rb:82:in `create_time_zone_conversion_attribute?': undefined method `to_sym' for 0.0:BigDecimal (NoMethodError)
lobsters  | Did you mean?  to_s
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_methods/time_zone_conversion.rb:73:in `block (2 levels) in inherited'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:83:in `block in matching'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:82:in `select'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:82:in `matching'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:78:in `decorators_for'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:70:in `apply'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:52:in `block in load_schema!'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:51:in `each'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:51:in `load_schema!'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:478:in `block in load_schema'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:475:in `synchronize'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:475:in `load_schema'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:362:in `attribute_types'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/querying.rb:48:in `find_by_sql'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:821:in `block in exec_queries'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:808:in `exec_queries'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:626:in `load'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:250:in `records'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/delegation.rb:87:in `each'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/query_methods.rb:271:in `select'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/query_methods.rb:271:in `select'
lobsters  |     from script/mail_new_activity.rb:65:in `<main>'
lobsters  | /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_methods/time_zone_conversion.rb:82:in `create_time_zone_conversion_attribute?': undefined method `to_sym' for 0.0:BigDecimal (NoMethodError)
lobsters  | Did you mean?  to_s
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_methods/time_zone_conversion.rb:73:in `block (2 levels) in inherited'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:83:in `block in matching'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:82:in `select'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:82:in `matching'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:78:in `decorators_for'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:70:in `apply'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:52:in `block in load_schema!'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:51:in `each'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:51:in `load_schema!'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:478:in `block in load_schema'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:475:in `synchronize'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:475:in `load_schema'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:362:in `attribute_types'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:386:in `type_for_attribute'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/table_metadata.rb:33:in `type'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:51:in `build'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:109:in `block in expand_from_hash'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:68:in `each'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:68:in `flat_map'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:68:in `expand_from_hash'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:21:in `build_from_hash'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/where_clause_factory.rb:19:in `build'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/query_methods.rb:656:in `where!'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation/query_methods.rb:649:in `where'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/querying.rb:21:in `where'
lobsters  |     from /lobsters/app/models/story.rb:95:in `block in <class:Story>'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:412:in `instance_exec'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:412:in `block in _exec_scope'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:784:in `_scoping'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/relation.rb:412:in `_exec_scope'
lobsters  |     from /lobsters/.bundle/ruby/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/scoping/named.rb:192:in `block in scope'
lobsters  |     from script/post_to_twitter:10:in `<main>'
lobsters  | I, [2024-10-30T13:34:19.801024 #44]  INFO -- : Started GET "/" for 172.20.0.1 at 2024-10-30 13:34:19 +0000
lobsters  | I, [2024-10-30T13:34:19.804553 #44]  INFO -- : Processing by HomeController#index as */*
lobsters  | I, [2024-10-30T13:34:19.804633 #44]  INFO -- :   Parameters: {"protocol"=>"http://"}
lobsters  | I, [2024-10-30T13:34:19.805632 #44]  INFO -- :   Request 172.20.0.1 GET / user: 0 nobody
lobsters  | I, [2024-10-30T13:34:19.812784 #44]  INFO -- : Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.8ms | Allocations: 1432)
lobsters  | F, [2024-10-30T13:34:19.813606 #44] FATAL -- :   
lobsters  | NoMethodError (undefined method `to_sym' for 0.0:BigDecimal
lobsters  | Did you mean?  to_s):
lobsters  |   
lobsters  | app/models/keystore.rb:13:in `value_for'
lobsters  | app/models/keystore.rb:81:in `readthrough_cache'
lobsters  | app/helpers/traffic_helper.rb:68:in `cached_current_intensity'
lobsters  | app/controllers/application_controller.rb:73:in `set_traffic_style'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant