title: How to authenticate in Remedy using Java
body: <p>I need to authenticate myself in Remedy. I'm following the documentation, but I still getting some errors.
  <a href="https://communities.bmc.com/docs/DOC-17514" rel="nofollow">https://communities.bmc.com/docs/DOC-17514</a></p>
  
  <p>This is my code:</p>
  
  <pre><code>import com.bmc.arsys.api.ARException;
  import com.bmc.arsys.api.ARServerUser;
  
  public class Tutorial {
      public static void main(String[] args) {
          ARServerUser ctx = new ARServerUser();
          ctx.setServer("127.0.0.1");
          ctx.setUser("myusername");
          ctx.setPassword("mypassword");
          ctx.setPort(8080);
  
          try {
              ctx.verifyUser();
          } catch (ARException e) {
              System.out.println(e.getMessage());
          }
      }
  }
  </code></pre>
  
  <p>I'm receiving this error:
  <code>ERROR (91): RPC call failed; 127.0.0.1:8080 can not receive ONC/RPC data</code></p>
  
  <p>How can I fix that? I need to set the instance, like <code>127.0.0.1/arsys</code>. My Remedy instance is arsys. </p>
  
  <p>I can authenticate using the browser: <code>http://127.0.0.1:8080/arsys</code></p>
  
  <p>Thanks in advance.</p>