I am trying to deploy a web application (RODA 2.0) as WAR on a debian stretch into tomcat 8.5 and openjdk 8, and I get a java.net.BindException: Address already in use
when starting up (see full stacktrace at https://pastebin.com/SSDJX6yc). Now, the webapp really tries to listen on port 2552, but it is not used, and running lsof -ni :2552
in a loop shows that at no point is it actually used. On osx it succeeds starting even in tomcat, and successfully listens on the given port.
I realized that maybe tomcat security policies prevent this, but trying to use the catalina.policy from the osx machine yielded the same result. I also tried to add a grant entry to the original debian policy files:
grant codeBase "war:file:${catalina.base}/webapps/ROOT.war*" {
permission java.net.SocketPermission "192.168.*:2552", "listen, connect, accept, resolve";
};
Do you have any idea what the actual problem could be, and how to solve it (aside from trying to modify RODA to not try to connect on the given port)?