• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Mango Service not working on Windows 10

    User help
    4
    17
    4.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      KLN
      last edited by phildunlap

      Hi phildunlap,

      Please find attached Environmental Setup screen shot.

      0_1555482256287_env.png

      Mango path on my PC as below.

      C:\Mango
      ![alt text]0_1555483009417_mango path.jpg

      My Wrapper.conf file details are below..

      # WARNING - Do not modify any of the properties when an application
      #  using this configuration file has been installed as a service or daemon.
      #  Please uninstall the service before modifying this file.  The
      #  service must then be reinstalled.
      
      
      #********************************************************************
      # working directory
      #********************************************************************
      
      ## Edit:
      wrapper.working.dir=C:\\Mango\\bin\\
      
      
      #********************************************************************
      # tmp folder
      # yajsw creates temporary files named in_.. out_.. err_.. jna..
      # per default these are placed in jna.tmpdir.
      # jna.tmpdir is set in setenv batch file to <yajsw>/tmp
      #********************************************************************
      wrapper.tmp.path = ${jna_tmpdir}
      
      
      #********************************************************************
      # Application main class or native executable
      # One of the following properties MUST be defined
      #********************************************************************
      
      # Java Application main class
      wrapper.java.app.mainclass=com.serotonin.m2m2.Main
      
      
      #********************************************************************
      # Wrapper Logging Properties
      #********************************************************************
      # Log Level for console output.  (See docs for log levels)
      wrapper.console.loglevel=INFO
      
      # Log file to use for wrapper output logging.
      wrapper.logfile=${wrapper_home}\/log\/wrapper.log
      
      # Maximum size that the log file will be allowed to grow to before
      #  the log is rolled. Size is specified in bytes.  The default value
      #  of 0, disables log rolling by size.  May abbreviate with the 'k' (kB) or
      #  'm' (mB) suffix.  For example: 10m = 10 megabytes.
      # If wrapper.logfile does not contain the string ROLLNUM it will be automatically added as suffix of the file name
      wrapper.logfile.maxsize=10m
      
      # Maximum number of rolled log files which will be allowed before old
      #  files are deleted.  The default value of 0 implies no limit.
      wrapper.logfile.maxfiles=10
      
      #********************************************************************
      # Application Console Properties
      #********************************************************************
      # Title to use when running as a console
      wrapper.console.title=com.serotonin.m2m2.Main
      
      #********************************************************************
      # Wrapper Windows Service and Posix Daemon Properties
      #********************************************************************
      # Name of the service
      wrapper.ntservice.name=Mango
      
      # Display name of the service
      wrapper.ntservice.displayname=Mango
      
      # Description of the service
      wrapper.ntservice.description=Mango Automation
      
      #********************************************************************
      # Wrapper Posix Daemon Properties
      #********************************************************************
      # The following grooy script should set it correctly for most distros
      wrapper.daemon.run_level_dir=${if (new File('\/etc\/rc0.d').exists()) return '\/etc\/rcX.d' else return '\/etc\/init.d\/rcX.d'}
      
      #********************************************************************
      # Wrapper System Tray Properties
      #********************************************************************
      # enable system tray
      wrapper.tray = true
      
      # TCP/IP port. If none is defined multicast discovery is used to find the port
      # Set the port in case multicast is not possible.
      wrapper.tray.port = 15002
      
      #********************************************************************
      # Exit Code Properties
      # Restart on non zero exit code
      #********************************************************************
      wrapper.on_exit.0=SHUTDOWN
      wrapper.on_exit.default=RESTART
      
      #********************************************************************
      # Trigger actions on console output
      #********************************************************************
      # On Exception show message in system tray
      wrapper.filter.trigger.0=Exception
      wrapper.filter.script.0=scripts\/trayMessage.gv
      wrapper.filter.script.0.args=Exception
      
      
      #********************************************************************
      # genConfig: further Properties generated by genConfig
      #********************************************************************
      placeHolderSoGenPropsComeHere=
      wrapper.java.command = java
      
      # Edit:
      wrapper.java.classpath.1 = C:\\Mango\\overrides\\classes
      wrapper.java.classpath.2 = C:\\Mango\\classes
      wrapper.java.classpath.3 = C:\\Mango\\overrides\\properties
      wrapper.java.classpath.4 = C:\\Mango\\overrides\\lib\\*.jar
      wrapper.java.classpath.5 = C:\\Mango\\lib\\*.jar
      wrapper.java.additional.1 = -server
      wrapper.java.additional.2 = -Dma.home=C:\\Mango
      
      1 Reply Last reply Reply Quote 0
      • CraigWebC
        CraigWeb
        last edited by

        What is in your C:\Mango\yajsw\log\wrapper file when you start the service ?

        1 Reply Last reply Reply Quote 0
        • K
          KLN
          last edited by

          Hi,
          I just freshly installed service and below are the log file ( C:\Mango\yajsw\log\wrapper)

          ................

          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:17|ahessian jmx service bound to port 15002
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:17|working dir C:\Mango\bin
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:17|started process with pid 9028
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:18|restart process due to default exit code rule
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:18|restart internal RUNNING
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:18|stopping process with pid/timeout 9028 45000
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:18|process exit code: 4
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:23|working dir C:\Mango\bin
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:23|started process with pid 8384
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:24|restart process due to default exit code rule
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:24|restart internal RUNNING
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:24|stopping process with pid/timeout 8384 45000
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:24|process exit code: 4
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:29|working dir C:\Mango\bin
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:29|started process with pid 10676
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:30|restart process due to default exit code rule
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:30|restart internal RUNNING
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:30|stopping process with pid/timeout 10676 45000
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:30|process exit code: 4
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:35|working dir C:\Mango\bin
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:35|started process with pid 504
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:36|restart process due to default exit code rule
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:36|restart internal RUNNING
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:36|stopping process with pid/timeout 504 45000
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:36|process exit code: 4
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:41|working dir C:\Mango\bin
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:41|started process with pid 4200
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:42|restart process due to default exit code rule
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:42|restart internal RUNNING
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:42|stopping process with pid/timeout 4200 45000
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:42|process exit code: 4
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:47|working dir C:\Mango\bin
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:47|started process with pid 2528
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|too many restarts
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|process not in state RUNNING -> Delaying stop
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|calling onStop
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|Win service stop - timeout: 30000
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|Win service wrapper.control -> stopping application
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|Win service stop - after shutdown
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|Win service stop - before notify
          INFO|wrapper|Service com.serotonin.m2m2.Main|19-04-17 15:36:48|Win service terminated

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            Why did you show me the JAVA_HOME variable when I asked about the Path variable? If you run java -version in a command prompt, what do you get?

            You can see in the wrapper.conf that
            wrapper.java.command = java
            so it's not going through the Mango startup scripts as would normally be done, it's invoking java directly.

            1 Reply Last reply Reply Quote 0
            • K
              KLN
              last edited by

              My variable name:JAVA_HOME
              0_1555568250060_java version.png

              Now I changed back to
              wrapper.java.command = %JAVA_HOME%/bin/java

              While Starting Service Now I am getting error as

              Error2: The system cannot find the file specified

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                One problem with that is that you've apparently defined JAVA_HOME in the User variables instead of the system variables.

                Now I changed back to
                wrapper.java.command = %JAVA_HOME%/bin/java

                I don't know what you mean, "changed back to" as the zip you'd have gotten from our instructions on the setup had,

                wrapper.java.command = java

                So please check the Path variable for the system user. I am not sure if you could use JAVA_HOME as you have tried, but you would certainly have to define it as a variable for the system user to do so.

                1 Reply Last reply Reply Quote 0
                • J
                  JAST
                  last edited by

                  I am having the same problem. I've been following this thread as well as a post from three years ago: https://forum.infiniteautomation.com/topic/2270/windows-service-setup/7

                  We've set our JAVA_Home variable and edited the PATH variable as well:
                  0_1557940234016_Screen Shot 2019-05-15 at 1.09.24 PM.png

                  Where would we find our wrapper.config file?

                  Is there currently a patch for this or in the works? We are getting this issue with every Windows 10 device we try to load Mango 3 to.
                  0_1557940396791_Screen Shot 2019-05-14 at 9.02.45 PM.png

                  Thank you.

                  1 Reply Last reply Reply Quote 0
                  • phildunlapP
                    phildunlap
                    last edited by

                    Hi gquiroz,

                    Where would we find our wrapper.config file?

                    If you downloaded the yajsw from the link on this page: https://help.infiniteautomation.com/installing-services

                    the wrapper.conf would be mostly set up for Mango, and would be in yajsw/conf/

                    You may find the suggestion in this thread useful as an alternative to doing a yajsw service, since it has its own issues like not restarting when restarted via the modules page or during an upgrade: https://forum.infiniteautomation.com/topic/4168/mango-not-starting-back-up-after-restart-within-mango/5

                    1 Reply Last reply Reply Quote 0
                    • J
                      JAST
                      last edited by

                      Thanks!

                      I was able to get the service up and running with a system power cycle.

                      1 Reply Last reply Reply Quote 0
                      • J
                        JAST
                        last edited by

                        @phildunlap said in Mango Service not working on Windows 10:

                        https://forum.infiniteautomation.com/topic/4168/mango-not-starting-back-up-after-restart-within-mango/5

                        We are experiencing this issue again. As KLN describes, the service does successfully install and we can see that it is running. But when trying to run mango on the browser, it cannot connect to local host. From your recommendation on https://forum.infiniteautomation.com/topic/4168/mango-not-starting-back-up-after-restart-within-mango/4 where would the event handler to create the Mango/RESTART file go?

                        1 Reply Last reply Reply Quote 0
                        • phildunlapP
                          phildunlap
                          last edited by

                          where would the event handler to create the Mango/RESTART file go?

                          On the system startup event.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post