I am having problem to connect to OPC-UA Server

java.lang.Exception: no anonymous token policy found
	at org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider.lambda$getIdentityToken$2(AnonymousProvider.java:47)
	at java.base/java.util.Optional.orElseThrow(Unknown Source)
	at org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider.getIdentityToken(AnonymousProvider.java:47)
	at org.eclipse.milo.opcua.sdk.client.session.SessionFsmFactory.activateSession(SessionFsmFactory.java:925)
	at org.eclipse.milo.opcua.sdk.client.session.SessionFsmFactory.lambda$configureActivatingState$19(SessionFsmFactory.java:353)
	at com.digitalpetri.strictmachine.dsl.ActionBuilder$PredicatedTransitionAction.execute(ActionBuilder.java:119)
	at com.digitalpetri.strictmachine.StrictMachine$PollAndEvaluate.lambda$run$0(StrictMachine.java:242)
	at java.base/java.util.ArrayList.forEach(Unknown Source)
	at com.digitalpetri.strictmachine.StrictMachine$PollAndEvaluate.run(StrictMachine.java:227)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

8.1.35 (b2023120517)
Azul Systems, Inc. 17.0.8

Looks like the server you are connecting to doesn’t allow anonymous identities and you didn’t provide a username and password.

I am having the same issue on kpedirect on ignition, should the userid password be same as the ignition gateway login ?

No, Ignition's OPC UA server has its own authentication profile. The default username and password are opcuauser / password.

I changed the username and password to the default and it still didnot work. I have a feeling I might be a little confused on the endpoints... what should be the end points,
Should my OPC-UA endpoints for the ignition and kepware have the same network ID?, and just different end points? They're both installed on the same PC

Give support a call and let them walk you through it.