OPNsense Alias Error
Posted: 30 May 2021, 22:41
It doesn't appear that DynFi appear to work with OPNsense 21.1.6 correctly. I can not get the Devices-> Aliases section to populate on multiple OPNsense boxes.
UI Error: "We are sorry, but something went really wrong while connecting to aliases/device/9f49c1b8-8dbe-491b-b196-a3ac4608e7bc endpoint. Server logs should be checked."
/var/log/dynfi/dynfi.log:
2021-05-30 20:30:34.176 UTC [grizzly-http-server-2] ERROR com.dynfi.rest.DynFiExceptionMapper [DynFiExceptionMapper.java:75] - Exception when creating response
com.dynfi.aliases.exceptions.ParsingException: Cannot parse aliases
at com.dynfi.aliases.AliasParserNew$.parse(AliasParserNew.scala:36)
at com.dynfi.aliases.AliasCollectionWithConfigContext$.apply(AliasCollectionWithConfigContext.scala:22)
at com.dynfi.services.AliasesServiceImpl.getAliasesForDevice(AliasesServiceImpl.scala:151)
at com.dynfi.rest.AliasResource.get(AliasResource.java:42)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:353)
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.dynfi.aliases.exceptions.ParsingException: Proto [] not supported
at com.dynfi.aliases.Proto$.valueOf(Proto.scala:21)
at com.dynfi.aliases.AliasParserNew$.$anonfun$protos$1(AliasParserNew.scala:80)
at scala.collection.ArrayOps$.map$extension(ArrayOps.scala:924)
at com.dynfi.aliases.AliasParserNew$.protos(AliasParserNew.scala:80)
at com.dynfi.aliases.AliasParserNew$.parseAlias(AliasParserNew.scala:53)
at com.dynfi.aliases.AliasParserNew$.$anonfun$parse$1(AliasParserNew.scala:42)
at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100)
at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
at scala.xml.NodeSeq.map(NodeSeq.scala:47)
at com.dynfi.aliases.AliasParserNew$.parse(AliasParserNew.scala:41)
at com.dynfi.aliases.AliasParserNew$.parse(AliasParserNew.scala:34)
... 29 common frames omitted
Any suggestions on how to populate aliases from OPNsense? I even tried to push a collection to a OPNsense firewall and it failed as well. pfSense firewall running 2.4.5p1 works just fine when working with aliases.
UI Error: "We are sorry, but something went really wrong while connecting to aliases/device/9f49c1b8-8dbe-491b-b196-a3ac4608e7bc endpoint. Server logs should be checked."
/var/log/dynfi/dynfi.log:
2021-05-30 20:30:34.176 UTC [grizzly-http-server-2] ERROR com.dynfi.rest.DynFiExceptionMapper [DynFiExceptionMapper.java:75] - Exception when creating response
com.dynfi.aliases.exceptions.ParsingException: Cannot parse aliases
at com.dynfi.aliases.AliasParserNew$.parse(AliasParserNew.scala:36)
at com.dynfi.aliases.AliasCollectionWithConfigContext$.apply(AliasCollectionWithConfigContext.scala:22)
at com.dynfi.services.AliasesServiceImpl.getAliasesForDevice(AliasesServiceImpl.scala:151)
at com.dynfi.rest.AliasResource.get(AliasResource.java:42)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:353)
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.dynfi.aliases.exceptions.ParsingException: Proto [] not supported
at com.dynfi.aliases.Proto$.valueOf(Proto.scala:21)
at com.dynfi.aliases.AliasParserNew$.$anonfun$protos$1(AliasParserNew.scala:80)
at scala.collection.ArrayOps$.map$extension(ArrayOps.scala:924)
at com.dynfi.aliases.AliasParserNew$.protos(AliasParserNew.scala:80)
at com.dynfi.aliases.AliasParserNew$.parseAlias(AliasParserNew.scala:53)
at com.dynfi.aliases.AliasParserNew$.$anonfun$parse$1(AliasParserNew.scala:42)
at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100)
at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
at scala.xml.NodeSeq.map(NodeSeq.scala:47)
at com.dynfi.aliases.AliasParserNew$.parse(AliasParserNew.scala:41)
at com.dynfi.aliases.AliasParserNew$.parse(AliasParserNew.scala:34)
... 29 common frames omitted
Any suggestions on how to populate aliases from OPNsense? I even tried to push a collection to a OPNsense firewall and it failed as well. pfSense firewall running 2.4.5p1 works just fine when working with aliases.