Address already in use error on stop and start AG
search cancel

Address already in use error on stop and start AG

book

Article ID: 370703

calendar_today

Updated On:

Products

CA Single Sign On Agents (SiteMinder)

Issue/Introduction


When restarting the CA Access Gateway (SPS or AG), this one refuses to start and it reports the error:

  [17/Jun/2024:10:54:25-507] [INFO] - CA Access Gateway
  [17/Jun/2024:10:54:25-513] [INFO] - Version 12.8 , Update 0800 , Label 2892
  [17/Jun/2024:10:54:25-513] [INFO] - File Version: 12.8 .0800 .2892

  [...]

  [17/Jun/2024:10:54:27-371] [ERROR] - InitCatalina failed ('Protocol handler initialization failed')
  [17/Jun/2024:10:54:27-372] [ERROR] - org.apache.catalina.LifecycleException: Protocol handler initialization failed

  [...omitted for brevity...]

  [17/Jun/2024:10:54:27-373] [ERROR] - Caused by: java.net.BindException: Address already in use
  [17/Jun/2024:10:54:27-374] [ERROR] - ProxyServer initialization failed.

Stopping and starting again the CA Access Gateway (SPS) using the command:

    # systemctl restart accessgateway.service

solved the issue.

 

Cause


When stopping the CA Access Gateway (SPS), at the stop command, the web application <name> cannot be stopped completely at 10:54:13:

  messages:

    Jun 17 10:54:12 systemd[1]: Stopping Access Gateway Service...

  nohup.out:

    Jun 17, 2024 10:54:13 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    WARNING: The web application [<name>] appears to have started a thread named [<name>] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
     sun.misc.Unsafe.park(Native Method)
     java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
     java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
     java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
     java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
     java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
     java.lang.Thread.run(Thread.java:748)

 

Resolution


As the web application [<name>] is Custom code, debug that custom code to understand in which function it was hanging, preventing the CA Access Gateway (SPS) to shut down completely.