Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Connect to MongoDB on the master server in this case the (second-primary):

    Code Block
    mongosh --username opUserRW --password op42flow42 admin
  2. Update member priorities:

    Code Block
    cfg = rs.conf()
    cfg.members[0].priority = 0.6
    cfg.members[1].priority = 0.5
    rs.reconfig(cfg)

Enable logging:

  1. ophad logging : /usr/local/omk/conf/opCommon.json under “opha” add the line
    "ophad_logfile" : "/usr/local/omk/log/ophad.log",

    Code Block
     
     
    "opha" : {
          "opha_role" : "Main Primary",
          "ophad_logfile" : "/usr/local/omk/log/ophad.log",
          "ophad_streaming_apps" : [
             "nmis",
             "opevents"
          ],
  2. nats-server logging : add the lines to /etc/nats-server.conf
    log_file: "/var/log/nats-server.log"

    Code Block
    shankarn@opha-dev4:~$ cat /etc/nats-server.conf
    server_name: "opha-dev4.opmantek.net"
    http_port: 8222
    listen: 4222
    jetstream: enabled
    
    #tls {
    #    cert_file: "<path>"
    #    key_file:  "<path>"
    #    #ca_file:   "<path>"
    #    verify: true
    #}
    
    log_file: "/var/log/nats-server.log"

Debugging guide:

Scenario 1 : ophad doesn’t come up

...