Learning fails for Tomcat 9 due to read-write permission
Tomcat 9 security manager requires ReadWritePaths to include /opt/vfunction, otherwise, the learning will fail with an error similar to:
{“level”:“error”,“time”:“2021-08-10T15:13:33Z”,“caller”:"/src/vfapi/clients/controller/connections/jmxclient.go:58",“message”:“Failed to save, val: /opt/vfunction/controller/instances/default/temp/snap-PART0001.jsonl, err: java.lang.Exception : Error opening /opt/vfunction/controller/instances/default/temp/snap-PART0001.jsonl - Read-only file system”}
To do that edit the file /etc/systemd/system/tomcat9.service.d/override.conf (this is in Linux)
Add a line under [Service]
ReadWritePaths=/path/to/the/directory/
Save and exit the file and do:
systemctl daemon-reload
systemctl restart tomcat9