MongoDB: why the mongod service is shutdown? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Come Celebrate our 10 Year Anniversary!mongoDB - Linux Service Startup/Shutdown is Failing (possible unclean shutdown)mongod autostartI have a mongod process but i did not install mongodb, what could this be?mongo server does not start on Centos 6.4How to set ulimits for mongod?mongod service not starting'mongod wiredTiger' on Ubuntu?Enabling WiredTiger engine in MongoDB 3MongoDB replica set: Why the last remaining server becomes secondary?Can't start mongod service on Ubuntu

Can each chord in a progression create its own key?

Homework question about an engine pulling a train

Is an up-to-date browser secure on an out-of-date OS?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

"... to apply for a visa" or "... and applied for a visa"?

Why can't devices on different VLANs, but on the same subnet, communicate?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Circular reasoning in L'Hopital's rule

Why are PDP-7-style microprogrammed instructions out of vogue?

Accepted by European university, rejected by all American ones I applied to? Possible reasons?

Fixing different display colors within string

Simulating Exploding Dice

Is 'stolen' appropriate word?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

Do working physicists consider Newtonian mechanics to be "falsified"?

Working through the single responsibility principle (SRP) in Python when calls are expensive

How to determine omitted units in a publication

How many Rusted Keys do you need to get red items most of the time?

What does "spokes" mean in this context?

Single author papers against my advisor's will?

What can I do if neighbor is blocking my solar panels intentionally?

Can we generate random numbers using irrational numbers like π and e?

Would an alien lifeform be able to achieve space travel if lacking in vision?

number sequence puzzle deep six



MongoDB: why the mongod service is shutdown?



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!mongoDB - Linux Service Startup/Shutdown is Failing (possible unclean shutdown)mongod autostartI have a mongod process but i did not install mongodb, what could this be?mongo server does not start on Centos 6.4How to set ulimits for mongod?mongod service not starting'mongod wiredTiger' on Ubuntu?Enabling WiredTiger engine in MongoDB 3MongoDB replica set: Why the last remaining server becomes secondary?Can't start mongod service on Ubuntu



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















When I use daemon service to start mongodb, MongoDB is always received kill signal by system(CentOS7.3) after about 2 minutes:



Log: [signalProcessingThread] got signal 15 (Terminated)



But when I run it Manually in shell: /data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf --fork , it runs ok.



My mongodb daemon service: /usr/lib/systemd/system/mongod.service



[Unit]
Description=mongodb
After=network.target·
After=syslog.target

[Service]|
Type=forking
User=mongo
ExecStart=/data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf
PrivateTmp=true
PIDFile=/data/mongo/pid/mongod_27019.pid
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=32000
LimitNPROC=32000

[Install]
WantedBy=multi-user.target


Which process is terminate mongod service ?



2017-08-08T14:57:55.638+0800 I NETWORK [conn12] received client metadata from 10.10.9.51:56714 conn12: driver: name: "mongo-java-driver", version: "3T_5.0.0-74-g1de6631-dirty" , os: type: "Windows", name: "Windows Server 2012 R2", architecture: "amd64", version: "6.3" , platform: "Java/Oracle Corporation/1.8.0_121-b13" 
2017-08-08T14:59:14.169+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2017-08-08T14:59:14.169+0800 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...









share|improve this question
























  • Remove the --fork option. That should only be used on command line execution. Using systemd it "daemonizes" automatically, so you don't need the option.

    – Neil Lunn
    Aug 8 '17 at 7:46











  • but when I Remove the --fork option, it also shutdown after 2 minutes

    – BlueSky
    Aug 8 '17 at 7:50











  • You might also need to run mongod under an strace to track down where the kill signal is coming from. However the --fork option has no place here and should be removed. See stackoverflow.com/questions/4078089/… and general usages of strace google.com/search?q=centos+trace+sigterm

    – Neil Lunn
    Aug 8 '17 at 7:54

















1















When I use daemon service to start mongodb, MongoDB is always received kill signal by system(CentOS7.3) after about 2 minutes:



Log: [signalProcessingThread] got signal 15 (Terminated)



But when I run it Manually in shell: /data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf --fork , it runs ok.



My mongodb daemon service: /usr/lib/systemd/system/mongod.service



[Unit]
Description=mongodb
After=network.target·
After=syslog.target

[Service]|
Type=forking
User=mongo
ExecStart=/data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf
PrivateTmp=true
PIDFile=/data/mongo/pid/mongod_27019.pid
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=32000
LimitNPROC=32000

[Install]
WantedBy=multi-user.target


Which process is terminate mongod service ?



2017-08-08T14:57:55.638+0800 I NETWORK [conn12] received client metadata from 10.10.9.51:56714 conn12: driver: name: "mongo-java-driver", version: "3T_5.0.0-74-g1de6631-dirty" , os: type: "Windows", name: "Windows Server 2012 R2", architecture: "amd64", version: "6.3" , platform: "Java/Oracle Corporation/1.8.0_121-b13" 
2017-08-08T14:59:14.169+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2017-08-08T14:59:14.169+0800 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...









share|improve this question
























  • Remove the --fork option. That should only be used on command line execution. Using systemd it "daemonizes" automatically, so you don't need the option.

    – Neil Lunn
    Aug 8 '17 at 7:46











  • but when I Remove the --fork option, it also shutdown after 2 minutes

    – BlueSky
    Aug 8 '17 at 7:50











  • You might also need to run mongod under an strace to track down where the kill signal is coming from. However the --fork option has no place here and should be removed. See stackoverflow.com/questions/4078089/… and general usages of strace google.com/search?q=centos+trace+sigterm

    – Neil Lunn
    Aug 8 '17 at 7:54













1












1








1








When I use daemon service to start mongodb, MongoDB is always received kill signal by system(CentOS7.3) after about 2 minutes:



Log: [signalProcessingThread] got signal 15 (Terminated)



But when I run it Manually in shell: /data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf --fork , it runs ok.



My mongodb daemon service: /usr/lib/systemd/system/mongod.service



[Unit]
Description=mongodb
After=network.target·
After=syslog.target

[Service]|
Type=forking
User=mongo
ExecStart=/data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf
PrivateTmp=true
PIDFile=/data/mongo/pid/mongod_27019.pid
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=32000
LimitNPROC=32000

[Install]
WantedBy=multi-user.target


Which process is terminate mongod service ?



2017-08-08T14:57:55.638+0800 I NETWORK [conn12] received client metadata from 10.10.9.51:56714 conn12: driver: name: "mongo-java-driver", version: "3T_5.0.0-74-g1de6631-dirty" , os: type: "Windows", name: "Windows Server 2012 R2", architecture: "amd64", version: "6.3" , platform: "Java/Oracle Corporation/1.8.0_121-b13" 
2017-08-08T14:59:14.169+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2017-08-08T14:59:14.169+0800 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...









share|improve this question
















When I use daemon service to start mongodb, MongoDB is always received kill signal by system(CentOS7.3) after about 2 minutes:



Log: [signalProcessingThread] got signal 15 (Terminated)



But when I run it Manually in shell: /data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf --fork , it runs ok.



My mongodb daemon service: /usr/lib/systemd/system/mongod.service



[Unit]
Description=mongodb
After=network.target·
After=syslog.target

[Service]|
Type=forking
User=mongo
ExecStart=/data/mongo/bin/3.4/mongod -f /data/mongo/config/uxdb_27019.conf
PrivateTmp=true
PIDFile=/data/mongo/pid/mongod_27019.pid
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=32000
LimitNPROC=32000

[Install]
WantedBy=multi-user.target


Which process is terminate mongod service ?



2017-08-08T14:57:55.638+0800 I NETWORK [conn12] received client metadata from 10.10.9.51:56714 conn12: driver: name: "mongo-java-driver", version: "3T_5.0.0-74-g1de6631-dirty" , os: type: "Windows", name: "Windows Server 2012 R2", architecture: "amd64", version: "6.3" , platform: "Java/Oracle Corporation/1.8.0_121-b13" 
2017-08-08T14:59:14.169+0800 I CONTROL [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2017-08-08T14:59:14.169+0800 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...






centos mongodb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 8 '17 at 8:56







BlueSky

















asked Aug 8 '17 at 7:43









BlueSkyBlueSky

12615




12615












  • Remove the --fork option. That should only be used on command line execution. Using systemd it "daemonizes" automatically, so you don't need the option.

    – Neil Lunn
    Aug 8 '17 at 7:46











  • but when I Remove the --fork option, it also shutdown after 2 minutes

    – BlueSky
    Aug 8 '17 at 7:50











  • You might also need to run mongod under an strace to track down where the kill signal is coming from. However the --fork option has no place here and should be removed. See stackoverflow.com/questions/4078089/… and general usages of strace google.com/search?q=centos+trace+sigterm

    – Neil Lunn
    Aug 8 '17 at 7:54

















  • Remove the --fork option. That should only be used on command line execution. Using systemd it "daemonizes" automatically, so you don't need the option.

    – Neil Lunn
    Aug 8 '17 at 7:46











  • but when I Remove the --fork option, it also shutdown after 2 minutes

    – BlueSky
    Aug 8 '17 at 7:50











  • You might also need to run mongod under an strace to track down where the kill signal is coming from. However the --fork option has no place here and should be removed. See stackoverflow.com/questions/4078089/… and general usages of strace google.com/search?q=centos+trace+sigterm

    – Neil Lunn
    Aug 8 '17 at 7:54
















Remove the --fork option. That should only be used on command line execution. Using systemd it "daemonizes" automatically, so you don't need the option.

– Neil Lunn
Aug 8 '17 at 7:46





Remove the --fork option. That should only be used on command line execution. Using systemd it "daemonizes" automatically, so you don't need the option.

– Neil Lunn
Aug 8 '17 at 7:46













but when I Remove the --fork option, it also shutdown after 2 minutes

– BlueSky
Aug 8 '17 at 7:50





but when I Remove the --fork option, it also shutdown after 2 minutes

– BlueSky
Aug 8 '17 at 7:50













You might also need to run mongod under an strace to track down where the kill signal is coming from. However the --fork option has no place here and should be removed. See stackoverflow.com/questions/4078089/… and general usages of strace google.com/search?q=centos+trace+sigterm

– Neil Lunn
Aug 8 '17 at 7:54





You might also need to run mongod under an strace to track down where the kill signal is coming from. However the --fork option has no place here and should be removed. See stackoverflow.com/questions/4078089/… and general usages of strace google.com/search?q=centos+trace+sigterm

– Neil Lunn
Aug 8 '17 at 7:54










2 Answers
2






active

oldest

votes


















2














I resolved this by:




  1. Modify the daemon: mongod.service: from forking to oneshot



    [Service]
    Type=oneshot



  2. Modify config/Mongodb.conf: remark the follow line:



    #processManagement:
    #fork: true


But I don't know why, but it works well now.






share|improve this answer






























    1














    Please check the valie of PIDFile in your mongod.service :



    [Service]



    ... deleted ...



    Type=forking



    PIDFile=/data/mongo/pid/mongod_27019.pid



    ... deleted ...



    Must have the same value with pidFilePath in /etc/mongod.conf:



    processManagement:



    fork: true
    pidFilePath: /data/mongo/pid/mongod_27019.pid



    Hope this can help your problem.






    share|improve this answer








    New contributor




    CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "2"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f867444%2fmongodb-why-the-mongod-service-is-shutdown%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      I resolved this by:




      1. Modify the daemon: mongod.service: from forking to oneshot



        [Service]
        Type=oneshot



      2. Modify config/Mongodb.conf: remark the follow line:



        #processManagement:
        #fork: true


      But I don't know why, but it works well now.






      share|improve this answer



























        2














        I resolved this by:




        1. Modify the daemon: mongod.service: from forking to oneshot



          [Service]
          Type=oneshot



        2. Modify config/Mongodb.conf: remark the follow line:



          #processManagement:
          #fork: true


        But I don't know why, but it works well now.






        share|improve this answer

























          2












          2








          2







          I resolved this by:




          1. Modify the daemon: mongod.service: from forking to oneshot



            [Service]
            Type=oneshot



          2. Modify config/Mongodb.conf: remark the follow line:



            #processManagement:
            #fork: true


          But I don't know why, but it works well now.






          share|improve this answer













          I resolved this by:




          1. Modify the daemon: mongod.service: from forking to oneshot



            [Service]
            Type=oneshot



          2. Modify config/Mongodb.conf: remark the follow line:



            #processManagement:
            #fork: true


          But I don't know why, but it works well now.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 8 '17 at 9:48









          BlueSkyBlueSky

          12615




          12615























              1














              Please check the valie of PIDFile in your mongod.service :



              [Service]



              ... deleted ...



              Type=forking



              PIDFile=/data/mongo/pid/mongod_27019.pid



              ... deleted ...



              Must have the same value with pidFilePath in /etc/mongod.conf:



              processManagement:



              fork: true
              pidFilePath: /data/mongo/pid/mongod_27019.pid



              Hope this can help your problem.






              share|improve this answer








              New contributor




              CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                1














                Please check the valie of PIDFile in your mongod.service :



                [Service]



                ... deleted ...



                Type=forking



                PIDFile=/data/mongo/pid/mongod_27019.pid



                ... deleted ...



                Must have the same value with pidFilePath in /etc/mongod.conf:



                processManagement:



                fork: true
                pidFilePath: /data/mongo/pid/mongod_27019.pid



                Hope this can help your problem.






                share|improve this answer








                New contributor




                CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  1












                  1








                  1







                  Please check the valie of PIDFile in your mongod.service :



                  [Service]



                  ... deleted ...



                  Type=forking



                  PIDFile=/data/mongo/pid/mongod_27019.pid



                  ... deleted ...



                  Must have the same value with pidFilePath in /etc/mongod.conf:



                  processManagement:



                  fork: true
                  pidFilePath: /data/mongo/pid/mongod_27019.pid



                  Hope this can help your problem.






                  share|improve this answer








                  New contributor




                  CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  Please check the valie of PIDFile in your mongod.service :



                  [Service]



                  ... deleted ...



                  Type=forking



                  PIDFile=/data/mongo/pid/mongod_27019.pid



                  ... deleted ...



                  Must have the same value with pidFilePath in /etc/mongod.conf:



                  processManagement:



                  fork: true
                  pidFilePath: /data/mongo/pid/mongod_27019.pid



                  Hope this can help your problem.







                  share|improve this answer








                  New contributor




                  CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered Apr 8 at 9:49









                  CakEkoLCakEkoL

                  111




                  111




                  New contributor




                  CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  CakEkoL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Server Fault!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f867444%2fmongodb-why-the-mongod-service-is-shutdown%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

                      What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

                      Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?