<div dir="ltr">Hello Ivan, <div><br></div><div>Thanks for your reply. It turns out that the password in the jmx file did have a new line character. I can't believe I missed that. Everything works great now. </div><div><br></div><div>Thanks, </div><div>-F </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 10, 2016 at 12:13 AM, Ivan Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@evolveum.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi Florin,<br>
    <br>
    the configuration looks ok to me, I just tried to revive my old
    cluster on my machine and it still works with midPoint 3.4<br>
    Please double check the password in jmxremote.password, from what I
    see there might be a trailing space at the end of line. (But it
    might be also just displayed incorrectly in my email client..)<br>
    If I fouled my jmxpassword file, the other node was not able to
    connect to the first one with the error you posted.<br>
    <br>
    If the file was not readable, Tomcat would refuse to start.<br>
    <br>
    Regards,<br>
    Ivan<div><div class="h5"><br>
    <br>
    <div>On 05/09/2016 11:22 PM, Florin.
      Stingaciu wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello, 
        <div><br>
        </div>
        <div>I'm following this <a href="https://wiki.evolveum.com/display/midPoint/Failover+setup" target="_blank">guide</a> to
          setup Midpoint in a failover environment. After setting
          everything up and navigating to /tasks I get the following
          error:</div>
        <div><br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
          <p><span>2016-05-09 21:05:40,778 []
              [http-bio-8080-exec-1] ERROR
              (com.evolveum.midpoint.web.page.admin.server.dto.NodeDtoProvider):
              Unhandled exception when listing nodes, reason: Subresult
              com.evolveum.midpoint.task.api.TaskManager..searchObjects
              of operation
              com.evolveum.midpoint.model.api.ModelService.searchObjects
              is still UNKNOWN during cleanup; during handling of
              exception java.lang.SecurityException: Authentication
              failed! Invalid username or password (class
              java.lang.IllegalStateException)</span></p>
        </blockquote>
        <div><br>
        </div>
        <div>I'm fairly positive, I've set up everything correctly.
          Here's the relevant config.xml: </div>
        <div><br>
        </div>
        <div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 
                  <repository><br>
                     
<repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass><br>
                            <database>mysql</database><br>
                           
            <jdbcUsername>midpoint</jdbcUsername><br>
                           
            <jdbcPassword>myDBPass</jdbcPassword><br>
                           
            <jdbcUrl>jdbc:mysql://DBSERVER:3306/midpoint</jdbcUrl><br>
                            <embedded>false</embedded><br>
                           
            <driverClassName>com.mysql.jdbc.Driver</driverClassName><br>
                           
            <hibernateHbm2ddl>validate</hibernateHbm2ddl><br>
                           
<hibernateDialect>org.hibernate.dialect.MySQLDialect</hibernateDialect><br>
                    </repository><br>
                    <taskManager><br>
                      <clustered>true</clustered><br>
                     
<jdbcUrl>jdbc:mysql://DBSERVER:3306/midpoint_quartz</jdbcUrl><br>
                      <jmxUsername>midpoint</jmxUsername><br>
                      <jmxPassword>password</jmxPassword><br>
                    </taskManager></blockquote>
        </div>
        <div><br>
        </div>
        <div>On both Midpoint instances I have the following two files:</div>
        <div><br>
        </div>
        <div>/var/opt/midpoint/jmxremote.password<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
          <p><span>midpoint password </span></p>
        </blockquote>
        <div>/var/opt/midpoint/jmxremote.access</div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">midpoint
          readwrite</blockquote>
        <div><br>
        </div>
        <div> Also, the permissions for these files:</div>
        <div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">-rwx------
            1 tomcat7 tomcat7 19 May  9 19:40 jmxremote.access<br>
            -rwx------ 1 tomcat7 tomcat7 19 May  9 20:55
            jmxremote.password</blockquote>
          <div><br>
          </div>
          <div>Lastly, I have the following entries in JAVA_OPTS:</div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">-Dcom.sun.management.jmxremote=true <br>
-Dcom.sun.management.jmxremote.password.file=/var/opt/midpoint/jmxremote.password <br>
-Dcom.sun.management.jmxremote.access.file=/var/opt/midpoint/jmxremote.access <br>
            -Dmidpoint.nodeId=002
            -Dcom.sun.management.jmxremote.port=20001 </blockquote>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">-Dcom.sun.management.jmxremote.ssl=false</blockquote>
          <div><br>
          </div>
          <div>The only difference is the nodeId. </div>
          <div><br>
          </div>
          <div>Also, upon server startup I see the following entries,
            which indicate the connection to the DB works fine:</div>
          <div><br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
              2016-05-09 21:04:45,822 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.Initializer): Task
              Manager initialization.<br>
              2016-05-09 21:04:45,829 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.Initializer): Task
              Manager: Quartz Job Store: JDBC, clustered. Threads: 10<br>
              2016-05-09 21:04:45,830 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.TaskManagerConfiguration):
              Quartz database is at
              jdbc:mysql://DBSERVER:3306/midpoint_quartz (a JDBC URL)<br>
              2016-05-09 21:04:45,840 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.cluster.NodeRegistrar):
              Registering this node in the repository as 001 at <a href="http://100.80.134.132:20001" target="_blank">100.80.134.132:20001</a><br>
              2016-05-09 21:04:46,199 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.execution.TaskSynchronizer):
              Synchronizing Quartz job store with midPoint repository.<br>
              2016-05-09 21:04:46,398 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.execution.TaskSynchronizer):
              Synchronization of midpoint and Quartz task store
              finished. 3 task(s) existing in midPoint repository
              successfully processed, resulting in 0 updated Quartz
              job(s). 0 task(s) removed from Quartz job store.
              Processing of 0 task(s) failed.<br>
              2016-05-09 21:04:46,398 [] [localhost-startStop-1] INFO
              (com.evolveum.midpoint.task.quartzimpl.Initializer): Task
              Manager initialized </blockquote>
          </div>
        </div>
        <div><br>
        </div>
        <div>You can find the full stack trace here: <a href="http://pastebin.com/kHnN3frr" target="_blank"></a><a href="http://pastebin.com/kHnN3frr" target="_blank">http://pastebin.com/kHnN3frr</a>.
          Any help would be greatly appreciated. <br>
        </div>
        <div><br>
        </div>
        <div>Also, as a side question. This guide uses the word failover
          configuration, however from my understanding this
          configuration could be used as an active/active mode of
          operation. Is this correct?</div>
        <div><br>
        </div>
        <div>Thanks, </div>
        <div>-F </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer & IDM Architect
  <a href="http://evolveum.com" target="_blank">evolveum.com</a>                     <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
  ___________________________________________________
  "Semper ID(e)M Vix."
</pre>
  </font></span></div>

<br>_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>