【问题标题】:Openshift application stopped and restarted automaticlally with catridge of type DIYOpenshift 应用程序使用 DIY 类型的墨盒自动停止并重新启动
【发布时间】:2016-07-27 13:08:52
【问题描述】:

使用 DIY 类型的墨盒打开轮班应用程序停止并自动重新启动,因此我的应用程序继续停机,因为我使用 PostgreSQL 数据库运行 spring boot 应用程序并且服务器启动并且可以看到应用程序正在运行但在服务器关闭之后为什么然后然后它自动启动并自动关闭,我在日志目录中也只看到很少的日志,以下是日志

these are some logs for application---->

rhc 尾巴 tiworld

==> app-root/logs/diy.log <==
[2016-07-22 08:55:41] INFO  WEBrick 1.3.1
[2016-07-22 08:55:41] INFO  ruby 1.8.7 (2013-06-27) [x86_64-linux]
[2016-07-22 08:55:41] INFO  WEBrick::HTTPServer#start: pid=380495 port=8080
127.3.82.129 - - [22/Jul/2016:09:10:32 EDT] "HEAD / HTTP/1.1" 200 0
- -> /
127.3.82.129 - - [22/Jul/2016:09:10:32 EDT] "HEAD / HTTP/1.1" 200 0
- -> /
[2016-07-22 09:21:58] INFO  going to shutdown ...
[2016-07-22 09:21:58] INFO  WEBrick::HTTPServer#start done.


==> app-root/logs/postgresql.log <==
2016-07-27 12:51:12 GMT LOG:  could not bind socket for statistics collector: Cannot assign requested address
2016-07-27 12:51:12 GMT LOG:  disabling statistics collector for lack of working socket
2016-07-27 12:51:12 GMT WARNING:  autovacuum not started because of misconfiguration
2016-07-27 12:51:12 GMT HINT:  Enable the "track_counts" option.
2016-07-27 12:51:12 GMT LOG:  database system was interrupted; last known up at 2016-07-27 12:45:45 GMT
2016-07-27 12:51:12 GMT FATAL:  the database system is starting up
2016-07-27 12:51:12 GMT LOG:  database system was not properly shut down; automatic recovery in progress
2016-07-27 12:51:12 GMT LOG:  record with zero length at 0/198F218
2016-07-27 12:51:12 GMT LOG:  redo is not required
2016-07-27 12:51:12 GMT LOG:  database system is ready to accept connections
You can tail this application directly with:
ssh -t 579217552d5271eaa80000c0@programmers-pvb.rhcloud.com 'tail */log*/*'
/var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/ruby_compat.rb:30:in `select': closed stream (IOError)
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/ruby_compat.rb:30:in `io_select'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/transport/packet_stream.rb:75:in `available_for_read?'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/transport/packet_stream.rb:87:in `next_packet'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:183:in `block in poll_message'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:178:in `loop'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:178:in `poll_message'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:461:in `dispatch_incoming_packets'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:206:in `process'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `block in loop'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/ssh_helpers.rb:198:in `block in ssh_ruby'
    from /var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:215:in `start'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/ssh_helpers.rb:173:in `ssh_ruby'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/commands/tail.rb:40:in `tail'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/commands/tail.rb:21:in `run'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/commands.rb:294:in `execute'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
    from /var/lib/gems/2.3.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /var/lib/gems/2.3.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
    from /var/lib/gems/2.3.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/command_runner.rb:72:in `run!'
    from /var/lib/gems/2.3.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/lib/rhc/cli.rb:37:in `start'
    from /var/lib/gems/2.3.0/gems/rhc-1.38.4/bin/rhc:20:in `<top (required)>'
    from /usr/local/bin/rhc:23:in `load'
    from /usr/local/bin/rhc:23:in `<main>

【问题讨论】:

    标签: postgresql spring-boot cloud openshift openshift-cartridge


    【解决方案1】:

    如果你在一个小齿轮上运行它特别是如果你在同一个齿轮上有 java 和一个数据库,变化是你的资源耗尽并且齿轮正在重新启动(一段时间后它不会再自动重启)。 您可以查看这篇文章以获取有关检查内存利用率的更多信息:https://developers.openshift.com/faq/troubleshooting.html#_why_is_my_application_restarting_automatically_or_having_memory_issues

    【讨论】:

    • 是的,我没有资源了,所以我怎样才能把 postgress 放在不同的齿轮上并用小齿轮访问它,我不能升级我的计划,我必须用小齿轮来做我怎么能?帮助
    • 您需要将其创建为可扩展的应用程序(只要您有足够的齿轮),它会自动将数据库放在它自己的齿轮上。
    • 我正在使用免费试用版,我有 3 个齿轮,我可以扩展这三个齿轮,如果如何请给我最好的资源
    • 除了 Do-It-Yourself、Jenkins 和 Zend 墨盒之外,大多数标准 OpenShift Web 墨盒都可以使用 HAProxy 进行扩展。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多