• 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

    Java update to 1.8 162 has caused Mango ES 3.2.2 to become unreachable.

    MangoES Hardware
    2
    13
    3.9k
    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.
    • raylatbasixR
      raylatbasix
      last edited by

      ma.log file error:

      ERROR 2018-02-13T10:48:32,418 (com.serotonin.m2m2.Main.main:129) - Error during initialization 
      java.lang.RuntimeException: java.net.SocketException: Permission denied
      	at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:922) ~[ma-priv-3.2.2.jar:?]
      	at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:199) ~[ma-priv-3.2.2.jar:?]
      	at com.serotonin.m2m2.Main.main(Main.java:125) [ma-priv-3.2.2.jar:?]
      Caused by: java.net.SocketException: Permission denied
      	at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_131]
      	at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_131]
      	at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_131]
      	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:1.8.0_131]
      	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[?:1.8.0_131]
      	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:317) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
      	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
      	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
      	at org.eclipse.jetty.server.Server.doStart(Server.java:390) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
      	at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:919) ~[ma-priv-3.2.2.jar:?]
      	... 2 more
      INFO  2018-02-13T10:48:32,431 (com.serotonin.m2m2.Lifecycle.terminate:361) - Mango Lifecycle terminating... 
      ERROR 2018-02-13T10:48:32,447 (com.serotonin.m2m2.Lifecycle.terminate:436) - com.serotonin.provider.InputStreamEPollProvider 
      ERROR 2018-02-13T10:48:32,449 (com.serotonin.m2m2.Lifecycle.terminate:444) - com.serotonin.provider.ProcessEPollProvider 
      FATAL 2018-02-13T10:48:32,459 (com.infiniteautomation.zwave.rt.ZwaveControlCenter.<init>:62) - Z-Wave Device configuration directory at:  does not exist! 
      FATAL 2018-02-13T10:48:32,459 (com.infiniteautomation.zwave.rt.ZwaveControlCenter.<init>:68) - Z-Wave user data directory at:  does not exist, Mango will shutodwn.! 
      INFO  2018-02-13T10:48:32,466 (com.serotonin.m2m2.Lifecycle.terminate:480) - Mango Lifecycle terminated. 
      
      

      So it was some sort of permission issue. How do you recommend updating java ??

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

        I will go add a step to those directions. Those were written originally when Mango ran under the root user, and since the default port in a MangoES is 80 that's a privileged port for a lesser user, and one need give it permissions somehow. We chose to solve that by giving the java executable cap_net_bind_service privileges.

        So, after the cp -rf newJdk/* java-8-oracle/ overwrite, you need to sudo setcap 'cap_net_bind_service=+ep' java-8-oracle/bin/java to give the new Java executable permissions to open the port.

        Thanks for bringing those instruction being out of date to our attention.

        1 Reply Last reply Reply Quote 0
        • raylatbasixR
          raylatbasix
          last edited by

          Thanks Phil,

          So I should be safe to attempt a java update back to 1.8 162, and perform you additional steps??

          Also, it seems all of my licensing on the modules page shows as "Unlicensed" or free mode now. Any Idea how to fix that? I'm guessing in this mode, I'm limited on my point count to 300, and I am well over that.

          Thanks.

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

            Yes, that extra step is what was missing. I just upgraded Java on an ES I have to confirm.

            I would suspect you ran it under the root user, and that's why your license isn't appearing. You may need to chown -R mango:mango /opt/mango to get all the files back to the mango user's ownership, and then start mango as the mango user or through the service.

            1 Reply Last reply Reply Quote 0
            • raylatbasixR
              raylatbasix
              last edited by

              @phildunlap said in Java update to 1.8 162 has caused Mango ES 3.2.2 to become unreachable.:

              sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java

              Just upgraded to 1.8 162. Having an issue with the:

              sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java
              

              Throws an invalid argument error for setcap:

              > sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java
              fatal error: Invalid argument
              usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
              
               Note <filename> must be a regular (non-symlink) file.
              

              Any ideas?

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

                Try the absolute path if you weren't in the parent directory of java-8-oracle, /usr/lib/jvm/java-8-oracle/bin/java

                1 Reply Last reply Reply Quote 0
                • raylatbasixR
                  raylatbasix
                  last edited by

                  I was in the parent directory for the java-8-oracle. Tried it both ways, still no luck.

                   Note <filename> must be a regular (non-symlink) file.
                  > cd /usr/lib/jvm/
                  > sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java
                  fatal error: Invalid argument
                  usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
                  
                   Note <filename> must be a regular (non-symlink) file.
                  > sudo setcap 'cap_net_bind_sevice=+ep' /usr/lib/jvm/java-8-oracle/bin/java
                  fatal error: Invalid argument
                  usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
                  
                   Note <filename> must be a regular (non-symlink) file.
                  
                  1 Reply Last reply Reply Quote 0
                  • phildunlapP
                    phildunlap
                    last edited by phildunlap

                    We connected and resolved the issue with a few extra steps...

                    1. sudo setcap 'cap_net_bind_service=+ep' java-8-oracle/bin/java I missed the R in service when writing that! D'oh.
                    2. sudo setcap 'cap_net_bind_service=+ep' java-8-oracle/jre/bin/java
                    3. For some reason we also had to chown -R mango:mango java-8-oracle as, despite appearing to have permissions in an ls -l, his Mango user was not able to travel into the java-8-oracle directory. There are no downsides to chowning that directory to the mango user, but it shouldn't have been necessary and wasn't on my test system.

                    The license issue was resolved once the mango user was launching Mango.

                    1 Reply Last reply Reply Quote 0
                    • raylatbasixR
                      raylatbasix
                      last edited by

                      Thanks for the excellent support today Phil!!

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

                        You are most welcome!

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