OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: zephiriz on August 14, 2024, 08:03:15 PM

Title: Aliases and Geoip not working.
Post by: zephiriz on August 14, 2024, 08:03:15 PM
Whenever I try to add an aliase for a blocklist or some other ban list it never downloads the list. I also get the error below in my log anytime I try to do anything with aliases. Same with geoip. It never downloadd the list. I have tried maxmind and ip2location urls.

I have tried deleting all aliases other than system/restarted sevral times times. The error talks about tables and have incressed the table limit in the firewall to what should be 2x the lists im trying to download.Even tried very small lists. Saw another post similer talking about dns settings in genral. I have added one even though I have a tls dns set. My DNSBL looks fine and downloads fine and looks like it adds entrys to the table. Im not sure what else to do.

Thank you for you help!

Script action failed with Command '/usr/local/bin/flock -n -E 0 -o /tmp/filter_update_tables.lock /usr/local/opnsense/scripts/filter/update_tables.py ' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 76, in execute subprocess.check_call(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/flock -n -E 0 -o /tmp/filter_update_tables.lock /usr/local/opnsense/scripts/filter/update_tables.py ' returned non-zero exit status 1.
Title: Re: Aliases and Geoip not working.
Post by: meyergru on August 14, 2024, 08:49:34 PM
Did you experiment on the commandline, like extracting something from a tar file to /tmp?

It sounds like your /tmp directory is not writeable. You can check with "ls -lad /tmp/". Maybe your file system is full, check with "df".
Title: Re: Aliases and Geoip not working.
Post by: zephiriz on August 14, 2024, 09:51:28 PM
root@OPNsense:~ # ls -lad /tmp/
drwxrwxrwt  6 root wheel 62 Aug 14 12:40 /tmp/


I am only using like 2% Of the SSD I have in the system.
Title: Re: Aliases and Geoip not working.
Post by: meyergru on August 14, 2024, 10:20:36 PM
What happens when you call '/usr/local/bin/flock -n -E 0 -o /tmp/filter_update_tables.lock /usr/local/opnsense/scripts/filter/update_tables.py' from the commandline?
Title: Re: Aliases and Geoip not working.
Post by: zephiriz on August 14, 2024, 10:29:13 PM

Well this is interesting.
No idea how to go about fixing this.



root@OPNsense:~ # /usr/local/bin/flock -n -E 0 -o /tmp/filter_update_tables.lock /usr/local/opnsense/scripts/filter/update_tables.py
Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/filter/update_tables.py", line 39, in <module>
    from lib.alias import AliasParser
  File "/usr/local/opnsense/scripts/filter/lib/__init__.py", line 27, in <module>
    import dns.resolver
  File "/usr/local/lib/python3.11/site-packages/dns/resolver.py", line 30, in <module>
    import dns._ddr
  File "/usr/local/lib/python3.11/site-packages/dns/_ddr.py", line 12, in <module>
    import dns.nameserver
  File "/usr/local/lib/python3.11/site-packages/dns/nameserver.py", line 5, in <module>
    import dns.asyncquery
  File "/usr/local/lib/python3.11/site-packages/dns/asyncquery.py", line 38, in <module>
    from dns.query import (
  File "/usr/local/lib/python3.11/site-packages/dns/query.py", line 44, in <module>
    import dns.xfr
  File "/usr/local/lib/python3.11/site-packages/dns/xfr.py", line 29, in <module>
    import dns.zone
  File "/usr/local/lib/python3.11/site-packages/dns/zone.py", line 867
    return Transaction(self, False, Version(self, 1
                                           ^
SyntaxError: '(' was never closed
Title: Re: Aliases and Geoip not working.
Post by: franco on August 14, 2024, 10:35:59 PM
Is this on 24.7.1?

# pkg which /usr/local/lib/python3.11/site-packages/dns/zone.py
/usr/local/lib/python3.11/site-packages/dns/zone.py was installed by package py311-dnspython-2.6.1,1

It could mean the upstream package is containing a syntax error. Do a health check to be sure.


Cheers,
Franco
Title: Re: Aliases and Geoip not working.
Post by: newsense on August 14, 2024, 10:37:06 PM
You might have some updates that didn't finish installing. What is the full output when you check for updates ?
Title: Re: Aliases and Geoip not working.
Post by: franco on August 14, 2024, 10:38:50 PM
2.6.1 has been in there for at least 24.1.10. It might already help to reinstall the py311-dnspython package. The health output would definitely tell about a mismatch.


Cheers,
Franco
Title: Re: Aliases and Geoip not working.
Post by: zephiriz on August 14, 2024, 10:45:42 PM
Ill check the packages themselves in a bit. got to head to store.


***GOT REQUEST TO CHECK FOR UPDATES***
Currently running OPNsense 24.7.1 at Wed Aug 14 13:40:30 PDT 2024
Fetching changelog information, please wait... done
Updating OPNsense repository catalogue...
Fetching meta.conf: . done
Fetching packagesite.pkg: .......... done
Processing entries: .......... done
OPNsense repository update completed. 838 packages processed.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.
Checking for upgrades (118 candidates): .......... done
Processing candidates (118 candidates): . done
Checking integrity... done (0 conflicting)
Your packages are up to date.
***DONE***
Title: Re: Aliases and Geoip not working.
Post by: newsense on August 14, 2024, 11:13:08 PM
Try this command, then rerun the flock one

pkg install -f py311-dnspython
Title: Re: Aliases and Geoip not working.
Post by: zephiriz on August 15, 2024, 02:18:39 AM
I guess I should add Check system integrity to my list of trouble shooting steps. It was a pretty fresh install and didn't think about it. I just made the switch from PFsense. I must of had a bad hick-up during the update process as I had many Fail the health Check.

;D Thank you all for the help!!!  ;)

For future people with a similar issue.

System>Firmware>Status    Health Check.

System>Firmware>Packages     Reinstall all that Failed Health Check.

Did a reboot just to make sure. All fixed.

I did not manage to capture all the logs but this is a good chunk.

>>> Check for missing or altered package files
Checking all packages:
boost-libs-1.84.0: checksum mismatch for /usr/local/include/boost/preprocessor/list/limits/fold_left_256.hpp
Checking all packages....
glib-2.80.4,2: checksum mismatch for /usr/local/bin/glib-compile-resources
Checking all packages....
libcjson-1.7.18_2: checksum mismatch for /usr/local/lib/libcjson.a
Checking all packages......
perl5-5.36.3_1: checksum mismatch for /usr/local/lib/perl5/5.36/Unicode/Collate/Locale/cu.pl
perl5-5.36.3_1: checksum mismatch for /usr/local/lib/perl5/5.36/mach/auto/NDBM_File/NDBM_File.so
Checking all packages.....
py311-httpx-0.27.0_1: checksum mismatch for /usr/local/lib/python3.11/site-packages/httpx/__pycache__/_auth.cpython-311.opt-1.pyc
Checking all packages.....
python311-3.11.9_1: checksum mismatch for /usr/local/include/python3.11/internal/pycore_opcode.h
Checking all packages.... done
>>> Check for core packages consistency
Core package "opnsense" has 68 dependencies to check.
Checking packages: ..................................................................... done


Thank you all again for the help!
Title: Re: Aliases and Geoip not working.
Post by: franco on August 15, 2024, 07:32:34 AM
Ok, good to know it's solved now. :)