3

I'm getting an error at communicate/authenticate methods when executed, to send the Access-Request

I followed the exact same steps as guided in http://tinyradius.sourceforge.net/

    RadiusClient rc=new RadiusClient(InetAddress.getByName("server 
                            address").getHostName(),"sharedSecret");

    AccessRequest accessRequest=new AccessRequest("someName$3", "TWffeicH");
    accessRequest.setAuthProtocol(AccessRequest.AUTH_PAP);
    accessRequest.addAttribute("NAS-Port-Id", "my machines' IP address");
    accessRequest.addAttribute("NAS-IP-Address", "NAS IP Address");
    accessRequest.addAttribute("Service-Type", "Login-User");

    RadiusPacket response=rc.authenticate(accessRequest);

The exception i'm getting is;

2019-06-14 11:04:23.349  INFO 11244 --- [nio-8080-exec-1] org.tinyradius.util.RadiusClient         : communication failure, retry 1
2019-06-14 11:04:26.350  INFO 11244 --- [nio-8080-exec-1] org.tinyradius.util.RadiusClient         : communication failure, retry 2
2019-06-14 11:04:29.351 ERROR 11244 --- [nio-8080-exec-1] org.tinyradius.util.RadiusClient         : communication failure (timeout), no more retries
2019-06-14 11:04:29.376 ERROR 11244 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [/tinyradius] threw exception

java.net.SocketTimeoutException: Receive timed out
Dilrukshi Perera
  • 917
  • 3
  • 17
  • 31
  • Capture the communication using something like wireshark, look at what is going on at network level. You should mostly be interested in where (ip:port) the communication went and whether there is actually something listening on the other side (did it answer?). –  Jun 14 '19 at 11:09

0 Answers0