[opendmarc-users] Solved: Update to opendmarc-import errors on OSX 10.11.2. Seems Solved
Dan Mahoney, System Admin
danm at prime.gushi.org
Fri Dec 11 03:34:05 PST 2015
On Fri, 11 Dec 2015, Robert Chalmers wrote:
> The thing is, it was NULL, and it was failing. I Changed the field to 0 (zero) and it started working…
Yup, because in the perl DBI, null returns undef. The error you were
getting is what you get when you compare undef (i.e. an "uninitialized
value") with a string.
-Dan
>
> Maybe I’ll look into the code. Maybe not.
> Thanks
>
>
> On 11 Dec 2015, at 11:17, Dan Mahoney, System Admin <danm at prime.gushi.org> wrote:
>
> On Fri, 11 Dec 2015, Robert Chalmers wrote:
>
> Well, you can alter the table so the default value for that field is null. It may be you're running a more recent perl/dbi/dbd that is more strict about this and is failing out.
>
> Alternatively, you can edit the code so it checks for this. In the perl DBI, NULL values in a db are returned as undef(), which is probably not what anyone wants, so you should be
> checking this with code like:
>
> if (defined $var && $var ne $othervar), which is what you'd pretty much have to do all over the place with "use strict" and "use warnings" turned on.
>
> -Dan
>
>
>
> Previously I was having problems with this.
>
> opendmarc-import: updating at line 19
> Use of uninitialized value in string ne at /usr/local/sbin/opendmarc-import line 278, <STDIN> line 19.
> opendmarc-import: updating at line 37
> Use of uninitialized value in string ne at /usr/local/sbin/opendmarc-import line 278, <STDIN> line 37.
> opendmarc-import: updating at line 55
> Use of uninitialized value in string ne at /usr/local/sbin/opendmarc-import line 278, <STDIN> line 55.
> opendmarc-import: updating at line 73
> Use of uninitialized value in string ne at /usr/local/sbin/opendmarc-import line 278, <STDIN> line 73.
> opendmarc-import: updating at line 90
> Use of uninitialized value in string ne at /usr/local/sbin/opendmarc-import line 278, <STDIN> line 90.
> opendmarc-import: terminating at Thu Dec 10 17:36:14 2015
> opendmarc-reports: started at Thu Dec 10 17:36:15 2015
> opendmarc-reports: selected 8 domain(s)
>
>
> So I went into the opendmarc MySql database, and looked in ‘requests’ -> ‘locked’ - which is the area of the problem.
> The setup sql file that comes with opendmarc sets all empty table fields to NULL - which it doesn’t like. It can’t compare NULL with a value.
> So I set all the ‘locked’ fields to ‘0’ (zero)
>
> mysql> show tables;
> +---------------------+
> | Tables_in_opendmarc |
> +---------------------+
> | domains |
> | ipaddr |
> | messages |
> | reporters |
> | requests |
> | signatures |
> +---------------------+
> 6 rows in set (0.00 sec)
>
> mysql> update requests set locked='0';
> Query OK, 25 rows affected (0.01 sec)
> Rows matched: 27 Changed: 25 Warnings: 0
>
>
> Now when I run the script, with reporting commented out, and expiring commented out, there are no more errors.
>
> zeus:bin robert$ sudo /usr/local/bin/opendmarc-send-reports.sh
> opendmarc-import: started at Fri Dec 11 09:17:07 2015
> opendmarc-import: connected to database
> opendmarc-import: updating at line 19
> opendmarc-import: updating at line 37
> opendmarc-import: updating at line 54
> opendmarc-import: terminating at Fri Dec 11 09:17:07 2015
> /tmp/opendmarc.32062
>
> … and it tells me that the /tmp file is now actually being removed.
>
> So next step. Run the whole thing complete - nothing commented out.
>
> zeus:bin robert$ sudo /usr/local/bin/opendmarc-send-reports.sh
> opendmarc-import: started at Fri Dec 11 09:26:37 2015
> opendmarc-import: connected to database
> opendmarc-import: terminating at Fri Dec 11 09:26:37 2015
> opendmarc-reports: started at Fri Dec 11 09:26:38 2015
> opendmarc-reports: selected 5 domain(s)
> opendmarc-reports: terminating at Fri Dec 11 09:26:38 2015
> opendmarc-expire: started at Fri Dec 11 09:26:38 2015
> opendmarc-expire: connected to database
> opendmarc-expire: expiring messages older than 180 day(s)
> opendmarc-expire: no rows deleted
> opendmarc-expire: expiring signatures on expired messages (id < 1)
> opendmarc-expire: no rows deleted
> opendmarc-expire: expiring request data older than 180 days
> opendmarc-expire: no rows deleted
> opendmarc-expire: terminating at Fri Dec 11 09:26:38 2015
> /tmp/opendmarc.32277
>
>
> and presto bumpo - it appears to be working. At least - I am not getting errors reported anymore.
>
>
>
>
>
> Robert Chalmers
> robert at chalmers.com.au Quantum Radio: http://tinyurl.com/lwwddov
> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of -
> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay
>
>
>
>
> _______________________________________________
> opendmarc-users mailing list
> opendmarc-users at trusteddomain.org
> http://www.trusteddomain.org/mailman/listinfo/opendmarc-users
>
>
> --
>
> "When I'm lost, and confused, and trying to make a U-turn, nothing annoys
> me more than someone telling me to watch out for the tombstone!"
>
> "How often does that happen, Fab?"
>
> -David Feld & Tom Fabry, sometime in High School.
>
> --------Dan Mahoney--------
> Techie, Sysadmin, WebGeek
> Gushi on efnet/undernet IRC
> ICQ: 13735144 AIM: LarpGM
> Site: http://www.gushi.org
> ---------------------------
>
>
> Robert Chalmers
> robert at chalmers.com.au Quantum Radio: http://tinyurl.com/lwwddov
> Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB Storage made up of -
> Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower Bay
>
>
>
>
>
--
"One...plus two...plus one...plus one."
-Tim Curry, Clue
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
More information about the opendmarc-users
mailing list