EasyG0ing1 / Migration

Migration is a tool to assist with migrating your OPNsense DHCP static mappings over to the new Kea DHCP server that comes with version 24 of OPNsense.
43 stars 1 forks source link

Getting error in both Linux and Windows versions #1

Closed arraylabs closed 5 months ago

arraylabs commented 6 months ago

Getting the following on Win11 and Ubuntu Server 22.04LTS, encountered during the migrate portion, check runs fine. Fresh install of Ubuntu.

Your config file has the necessary information to do the migration. Exception in thread "main" java.lang.NullPointerException at com.simtechdata.App.main(App.java:59) at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)


OPNsense 24.1.3_1-amd64 FreeBSD 13.2-RELEASE-p10 OpenSSL 3.0.13

GarmonBz commented 6 months ago

Getting the following on Win11 and Ubuntu Server 22.04LTS, encountered during the migrate portion, check runs fine. Fresh install of Ubuntu.

Your config file has the necessary information to do the migration. Exception in thread "main" java.lang.NullPointerException at com.simtechdata.App.main(App.java:59) at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)

OPNsense 24.1.3_1-amd64 FreeBSD 13.2-RELEASE-p10 OpenSSL 3.0.13

Getting the same error. Came here to see if anyone had a solution.

EasyG0ing1 commented 5 months ago

@arraylabs @GarmonBz I've made changes to the code so that it will provide more detail when it throws an error so that I can track it down properly. I'll post updated binaries within the hour.

EasyG0ing1 commented 5 months ago

@arraylabs @GarmonBz I've posted updated binaries which can be found here

Simply run the program again like you did, and the error that it spits out should have more detail.

Also, if it is possible that you can share your config.xml file with me, that would be helpful.

EasyG0ing1 commented 5 months ago

@arraylabs @GarmonBz Just an FYI - I completely re-wrote the core of the code and it now spits out a file that you can import into OPNsense directly without needing to edit any text files.

Let me know if you are still having problems. If you are, I'm fairly certain it would have something to do with the config file, but the way it does things now, it builds everything in memory then it just does a search and replace on your exported config file and then it saves that to a new file, so in theory, there should be fewer things for it to error out on.

Any problems it finds, it will now give you a plain English explanation of what went wrong and it will explain to you what you need to do to solve the problem.

Thanks,

Mike

EasyG0ing1 commented 5 months ago

The program was re-written so that as it is extracting information from config.xml and building new_config.xml it verifies the accuracy of each step and it checks to see if anything from the original that needs to be in the new actually exists. If any of those steps encounters a problem it will throw an error specific to that step, which should then be a problem that the user can address on their own and the explanation will tell the user what to do to fix the problem. the problem described in this Issue should not happen again.

Here is the latest release set of downloads