Can't get Tomcat 8 started on CentOS 7











up vote
2
down vote

favorite












I’m trying to start up Apache Tomcat on a Google cloud server. It’s a CentOS 7 server and has Apache Tomcat 8 on it. Instructions are https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7 but when I get to:



sudo systemctl start tomcat


I get the message:



Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.


For systemctl status tomcat.service I get:



tomcat.service - Apache Tomcat Web Application Container
Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2017-12-29 17:04:47 UTC; 639ms ago
Process: 3526 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=203/EXEC)

Dec 29 17:04:47 jira-dev systemd[1]: Unit tomcat.service entered failed state.


Dec 29 17:04:47 jira-dev systemd[1]: tomcat.service failed.





For journalctl -xe I can't post all of it because it "looks like spam" but I get:



-- The error number returned by this process is 13.
Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
Dec 29 16:55:33 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
-- Subject: Unit tomcat.service has failed
-- Defined-By: systemd


and



-- The result is failed.
Dec 29 16:55:33 jira-dev systemd[1]: Unit tomcat.service entered failed state.
Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service failed.
Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service holdoff time over, scheduling restart.
Dec 29 16:55:44 jira-dev systemd[1]: Starting Apache Tomcat Web Application Container...
-- Subject: Unit tomcat.service has begun start-up
-- Defined-By: systemd


and



-- Unit tomcat.service has begun starting up. Dec 29 16:55:44 jira-dev systemd[3317]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied
-- Subject: Process /opttomcat/bin/startup.sh could not be executed
-- Defined-By: systemd/


and



-- The error number returned by this process is 13.
Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
Dec 29 16:55:44 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
-- Subject: Unit tomcat.service has failed
-- Defined-By: systemd


The /etc/system/system/tomcat.service file looks like the one from the instructions.



I have also set JAVA_HOME, just in case.



I see the permission error, but I have given the tomcat user ownership of the tomcat directory as per CentOs 7.1 - Install Tomcat 8 with the command cd /opt && sudo chown -R tomcat tomcat/



I have also tried commenting out the Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' line from the tomcat.service file, although it didn't help, so I un-commented it.



I'm running as root.










share|improve this question




























    up vote
    2
    down vote

    favorite












    I’m trying to start up Apache Tomcat on a Google cloud server. It’s a CentOS 7 server and has Apache Tomcat 8 on it. Instructions are https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7 but when I get to:



    sudo systemctl start tomcat


    I get the message:



    Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.


    For systemctl status tomcat.service I get:



    tomcat.service - Apache Tomcat Web Application Container
    Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: disabled)
    Active: activating (auto-restart) (Result: exit-code) since Fri 2017-12-29 17:04:47 UTC; 639ms ago
    Process: 3526 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=203/EXEC)

    Dec 29 17:04:47 jira-dev systemd[1]: Unit tomcat.service entered failed state.


    Dec 29 17:04:47 jira-dev systemd[1]: tomcat.service failed.





    For journalctl -xe I can't post all of it because it "looks like spam" but I get:



    -- The error number returned by this process is 13.
    Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
    Dec 29 16:55:33 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
    -- Subject: Unit tomcat.service has failed
    -- Defined-By: systemd


    and



    -- The result is failed.
    Dec 29 16:55:33 jira-dev systemd[1]: Unit tomcat.service entered failed state.
    Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service failed.
    Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service holdoff time over, scheduling restart.
    Dec 29 16:55:44 jira-dev systemd[1]: Starting Apache Tomcat Web Application Container...
    -- Subject: Unit tomcat.service has begun start-up
    -- Defined-By: systemd


    and



    -- Unit tomcat.service has begun starting up. Dec 29 16:55:44 jira-dev systemd[3317]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied
    -- Subject: Process /opttomcat/bin/startup.sh could not be executed
    -- Defined-By: systemd/


    and



    -- The error number returned by this process is 13.
    Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
    Dec 29 16:55:44 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
    -- Subject: Unit tomcat.service has failed
    -- Defined-By: systemd


    The /etc/system/system/tomcat.service file looks like the one from the instructions.



    I have also set JAVA_HOME, just in case.



    I see the permission error, but I have given the tomcat user ownership of the tomcat directory as per CentOs 7.1 - Install Tomcat 8 with the command cd /opt && sudo chown -R tomcat tomcat/



    I have also tried commenting out the Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' line from the tomcat.service file, although it didn't help, so I un-commented it.



    I'm running as root.










    share|improve this question


























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I’m trying to start up Apache Tomcat on a Google cloud server. It’s a CentOS 7 server and has Apache Tomcat 8 on it. Instructions are https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7 but when I get to:



      sudo systemctl start tomcat


      I get the message:



      Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.


      For systemctl status tomcat.service I get:



      tomcat.service - Apache Tomcat Web Application Container
      Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: disabled)
      Active: activating (auto-restart) (Result: exit-code) since Fri 2017-12-29 17:04:47 UTC; 639ms ago
      Process: 3526 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=203/EXEC)

      Dec 29 17:04:47 jira-dev systemd[1]: Unit tomcat.service entered failed state.


      Dec 29 17:04:47 jira-dev systemd[1]: tomcat.service failed.





      For journalctl -xe I can't post all of it because it "looks like spam" but I get:



      -- The error number returned by this process is 13.
      Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
      Dec 29 16:55:33 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
      -- Subject: Unit tomcat.service has failed
      -- Defined-By: systemd


      and



      -- The result is failed.
      Dec 29 16:55:33 jira-dev systemd[1]: Unit tomcat.service entered failed state.
      Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service failed.
      Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service holdoff time over, scheduling restart.
      Dec 29 16:55:44 jira-dev systemd[1]: Starting Apache Tomcat Web Application Container...
      -- Subject: Unit tomcat.service has begun start-up
      -- Defined-By: systemd


      and



      -- Unit tomcat.service has begun starting up. Dec 29 16:55:44 jira-dev systemd[3317]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied
      -- Subject: Process /opttomcat/bin/startup.sh could not be executed
      -- Defined-By: systemd/


      and



      -- The error number returned by this process is 13.
      Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
      Dec 29 16:55:44 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
      -- Subject: Unit tomcat.service has failed
      -- Defined-By: systemd


      The /etc/system/system/tomcat.service file looks like the one from the instructions.



      I have also set JAVA_HOME, just in case.



      I see the permission error, but I have given the tomcat user ownership of the tomcat directory as per CentOs 7.1 - Install Tomcat 8 with the command cd /opt && sudo chown -R tomcat tomcat/



      I have also tried commenting out the Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' line from the tomcat.service file, although it didn't help, so I un-commented it.



      I'm running as root.










      share|improve this question















      I’m trying to start up Apache Tomcat on a Google cloud server. It’s a CentOS 7 server and has Apache Tomcat 8 on it. Instructions are https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7 but when I get to:



      sudo systemctl start tomcat


      I get the message:



      Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.


      For systemctl status tomcat.service I get:



      tomcat.service - Apache Tomcat Web Application Container
      Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: disabled)
      Active: activating (auto-restart) (Result: exit-code) since Fri 2017-12-29 17:04:47 UTC; 639ms ago
      Process: 3526 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=203/EXEC)

      Dec 29 17:04:47 jira-dev systemd[1]: Unit tomcat.service entered failed state.


      Dec 29 17:04:47 jira-dev systemd[1]: tomcat.service failed.





      For journalctl -xe I can't post all of it because it "looks like spam" but I get:



      -- The error number returned by this process is 13.
      Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
      Dec 29 16:55:33 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
      -- Subject: Unit tomcat.service has failed
      -- Defined-By: systemd


      and



      -- The result is failed.
      Dec 29 16:55:33 jira-dev systemd[1]: Unit tomcat.service entered failed state.
      Dec 29 16:55:33 jira-dev systemd[1]: tomcat.service failed.
      Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service holdoff time over, scheduling restart.
      Dec 29 16:55:44 jira-dev systemd[1]: Starting Apache Tomcat Web Application Container...
      -- Subject: Unit tomcat.service has begun start-up
      -- Defined-By: systemd


      and



      -- Unit tomcat.service has begun starting up. Dec 29 16:55:44 jira-dev systemd[3317]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied
      -- Subject: Process /opttomcat/bin/startup.sh could not be executed
      -- Defined-By: systemd/


      and



      -- The error number returned by this process is 13.
      Dec 29 16:55:44 jira-dev systemd[1]: tomcat.service: control process exited, code=exited status=203
      Dec 29 16:55:44 jira-dev systemd[1]: Failed to start Apache Tomcat Web Application Container.
      -- Subject: Unit tomcat.service has failed
      -- Defined-By: systemd


      The /etc/system/system/tomcat.service file looks like the one from the instructions.



      I have also set JAVA_HOME, just in case.



      I see the permission error, but I have given the tomcat user ownership of the tomcat directory as per CentOs 7.1 - Install Tomcat 8 with the command cd /opt && sudo chown -R tomcat tomcat/



      I have also tried commenting out the Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' line from the tomcat.service file, although it didn't help, so I un-commented it.



      I'm running as root.







      linux centos tomcat






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 29 '17 at 20:27









      DavidPostill

      103k25220255




      103k25220255










      asked Dec 29 '17 at 20:23









      MSChase

      112




      112






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Since I ended up here and spent hours to figure it out



          Error message




          systemd[5189]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied




          I solved it by giving execute permission to bin folder.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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',
            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%2fsuperuser.com%2fquestions%2f1281019%2fcant-get-tomcat-8-started-on-centos-7%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Since I ended up here and spent hours to figure it out



            Error message




            systemd[5189]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied




            I solved it by giving execute permission to bin folder.






            share|improve this answer

























              up vote
              0
              down vote













              Since I ended up here and spent hours to figure it out



              Error message




              systemd[5189]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied




              I solved it by giving execute permission to bin folder.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Since I ended up here and spent hours to figure it out



                Error message




                systemd[5189]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied




                I solved it by giving execute permission to bin folder.






                share|improve this answer












                Since I ended up here and spent hours to figure it out



                Error message




                systemd[5189]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: Permission denied




                I solved it by giving execute permission to bin folder.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 2 at 16:08









                Andi Baso

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2fsuperuser.com%2fquestions%2f1281019%2fcant-get-tomcat-8-started-on-centos-7%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

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕