芝加哥老板无法在生产模式下启动

时间:2016-05-20 22:38:36

标签: erlang chicagoboss

我可以在开发模式下运行它,但不能在生产模式下运行它。

我看不到错误日志和访问日志中的任何错误

为什么开发工作,而不是生产?

老板版:0.8.15

控制台中的最后一行

2016-05-28 16:00:08.538 [info] <0.7.0> Application lager started on node letsparty@localhost
2016-05-28 16:00:08.554 [info] <0.59.0> Starting Boss in production mode....

2016-05-28 16:00:08.562 [info] <0.59.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.635 [info] <0.59.0> Starting master services on letsparty@localhost

2016-05-28 16:00:08.672 [info] <0.7.0> Application tinymq started on node letsparty@localhost
2016-05-28 16:00:08.715 [info] <0.59.0> SSL:[{cacertfile,"ssl/cacert.pem"},{certfile,"ssl/newcert.pem"},{keyfile,"ssl/privkey.pem"},{verify,verify_peer},{fail_if_no_peer_cert,false},{ciphers,[{rsa,aes_128_cbc,sha}]}]

2016-05-28 16:00:08.724 [info] <0.59.0> Starting cowboy... on letsparty@localhost

2016-05-28 16:00:08.733 [info] <0.7.0> Application cowlib started on node letsparty@localhost
2016-05-28 16:00:08.746 [info] <0.7.0> Application ranch started on node letsparty@localhost
2016-05-28 16:00:08.770 [info] <0.7.0> Application cowboy started on node letsparty@localhost
2016-05-28 16:00:08.770 [info] <0.59.0> Starting http listener... on 0.0.0.0:8444 

2016-05-28 16:00:08.777 [notice] <0.71.0>@lager_app:132 Deprecated lager_file_backend config detected, please consider updating it
2016-05-28 16:00:08.824 [info] <0.262.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.844 [info] <0.412.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.864 [info] <0.562.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.880 [info] <0.712.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.893 [info] <0.862.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.908 [info] <0.1012.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.927 [info] <0.1162.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.944 [info] <0.1312.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.961 [info] <0.1462.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]
2016-05-28 16:00:08.980 [info] <0.1612.0>@boss_db:start:77 Start Database Adapter boss_db_adapter_riaks2 options [{adapter,riaks2},{cache_enable,false},{cache_prefix,db},{shards,[]},{is_master_node,true},{db_host,"127.0.0.1"},{db_port,8087}]

它正在尝试连接到riak数据库,但它似乎悬而未决。我该怎么调试这个,为什么这适用于开发模式?

1 个答案:

答案 0 :(得分:0)

我终于找到了问题的答案。这是我介绍的一个错误。在boss模板文件中,我扩展了一个父模板文件,后来我在开发过程中更改了它的名称。

即便如此,我运行init-dev.sh确定并编译以进行生产。我看到的唯一日志是老板无法连接到数据库。

最后,我开始重新组装我的所有代码,看看在什么时候,老板拒绝我去制作。经过几个小时的尝试,我终于找到了模板文件。实际上,只是尝试删除src / view / lib / tag_html /中的一些文件,如果你使用它们,你会得到相同的日志。

糟糕的经历。为什么当我使用./rebar compile进行编译时,它没有检查模板文件是否真的存在。

模板的东西不是Erlang,但我猜的更多是boss。