Send Netdot-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."


Today's Topics:

   1. Re: System error looking for a mac address (Anton Berezin)
   2. Re: System error looking for a mac address (Michael T. Voity)
   3. Re: System error looking for a mac address (Carlos Vicente)
   4. Re: System error looking for a mac address (Michael T. Voity)


----------------------------------------------------------------------

Message: 1
Date: Wed, 29 Jan 2014 17:42:40 +0100
From: Anton Berezin <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: "Michael T. Voity" <[email protected]>
Cc: Carlos Vicente <[email protected]>,
        "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

Michael,

Would
http://stackoverflow.com/questions/1457305/mysql-creating-tables-with-foreign-keys-giving-errno-150
be of help, by any chance?

\Anton.

On Wed, Jan 29, 2014 at 11:36:39AM -0500, Michael T. Voity wrote:
> Carlos,
> 
> I did use the user 'root' to execute the sql statements.
> 
> -Mike
> 
> Michael T. Voity
> Network Engineer
> University of Vermont
> (802) 656-8112
> 
> On 1/29/2014 11:35 AM, Carlos Vicente wrote:
> > Michael,
> >
> > I incorrectly suggested to use the ?netdot_user? user, which does not have 
> > the permissions to create tables. Please try again using the DBA user (e.g. 
> > root) and let me know if that doesn?t work.
> >
> > Sorry,
> >
> > cv
> >
> > On Jan 29, 2014, at 11:32 AM, Michael T. Voity <[email protected]> wrote:
> >
> >> Carlos,
> >>
> >> Thanks for your response!   I tried to do do the sql statement but was 
> >> returned this error, I also tried it from the  schema.mysql file too.
> >>
> >> I verified that the reference tables are there.    It sounds like i need 
> >> to drop the reference table and then rebuild the reference tables.
> >>
> >> Ideas?
> >>
> >> -Mike
> >>
> >> mysql> CREATE TABLE `fwtableentry` (
> >>     ->   `fwtable` bigint NOT NULL,
> >>     ->   `id` bigint NOT NULL auto_increment,
> >>     ->   `interface` bigint NOT NULL,
> >>     ->   `physaddr` bigint NOT NULL,
> >>     ->   INDEX `FWTableEntry1` (`fwtable`),
> >>     ->   INDEX `FWTableEntry2` (`interface`),
> >>     ->   INDEX `FWTableEntry3` (`physaddr`),
> >>     ->   PRIMARY KEY (`id`),
> >>     ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
> >> `fwtable`
> >>     -> (`id`),
> >>     ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
> >>     -> `interface` (`id`),
> >>     ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
> >>     -> `physaddr` (`id`)
> >>     -> ) ENGINE=InnoDB;
> >> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
> >> mysql> CREATE TABLE `fwtableentry` (
> >>     ->   `fwtable` bigint NOT NULL,
> >>     ->   `id` bigint NOT NULL auto_increment,
> >>     ->   `interface` bigint NOT NULL,
> >>     ->   `physaddr` bigint NOT NULL,
> >>     ->   INDEX `FWTableEntry1` (`fwtable`),
> >>     ->   INDEX `FWTableEntry2` (`interface`),
> >>     ->   INDEX `FWTableEntry3` (`physaddr`),
> >>     ->   PRIMARY KEY (`id`),
> >>     ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
> >> `fwtable` (`id`),
> >>     ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES 
> >> `interface` (`id`),
> >>     ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES 
> >> `physaddr` (`id`)
> >>     -> ) ENGINE=InnoDB;
> >> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
> >>
> >> Michael T. Voity
> >> Network Engineer
> >> University of Vermont
> >> (802) 656-8112
> >>
> >> On 1/27/2014 9:52 PM, Carlos Vicente wrote:
> >>> Hello Michael,
> >>>
> >>> That's odd.
> >>>
> >>> The easiest way would be to copy the table definition from the
> >>> etc/schema.mysql file. You should have a copy from when you installed.
> >>> But here it is for your convenience:
> >>>
> >>> CREATE TABLE `fwtableentry` (
> >>>    `fwtable` bigint NOT NULL,
> >>>    `id` bigint NOT NULL auto_increment,
> >>>    `interface` bigint NOT NULL,
> >>>    `physaddr` bigint NOT NULL,
> >>>    INDEX `FWTableEntry1` (`fwtable`),
> >>>    INDEX `FWTableEntry2` (`interface`),
> >>>    INDEX `FWTableEntry3` (`physaddr`),
> >>>    PRIMARY KEY (`id`),
> >>>    CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
> >>> (`id`),
> >>>    CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
> >>> `interface` (`id`),
> >>>    CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
> >>> `physaddr` (`id`)
> >>> ) ENGINE=InnoDB;
> >>>
> >>>
> >>> Then you need to paste it into your mysql client, like:
> >>>
> >>> # mysql -u netdot_user -p <netdot_password> netdot
> >>>> [paste here]
> >>>> quit;
> >>> Best,
> >>>
> >>> cv
> >>>
> >>> On 1/27/14, 10:45 AM, Michael T. Voity wrote:
> >>>> Hello Again,
> >>>>
> >>>> So I think I found my problem.   The table 'fwtableentry' is missing.
> >>>>
> >>>> What is the easiest way to get this table back?    Is there a script I
> >>>> can run?    Can I manually add the table and fields?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> -Mike
> >>>>
> >>>>
> >>>> Michael T. Voity
> >>>> Network Engineer
> >>>> University of Vermont
> >>>> On 1/15/2014 12:47 PM, Michael T. Voity wrote:
> >>>>> Hello list,
> >>>>>
> >>>>> I think I have seen this error before and might have seen a solution
> >>>>> before, but I cant seem to find the solution in the archives.
> >>>>>
> >>>>> I think I have to delete a table or dump a table in the MySQL DB?
> >>>>>
> >>>>> Here is the error:
> >>>>>
> >>>>> *error:*        DBD::mysql::db selectall_arrayref failed: Table
> >>>>> 'netdot.fwtableentry' doesn't exist [for Statement "SELECT ft.tstamp
> >>>>> FROM physaddr p, interface i, fwtableentry fte, fwtable ft
> >>>>> WHERE p.id=213716
> >>>>> AND fte.physaddr=p.id
> >>>>> AND fte.interface=i.id
> >>>>> AND fte.fwtable=ft.id
> >>>>> GROUP BY ft.tstamp
> >>>>> ORDER BY ft.tstamp DESC
> >>>>> LIMIT 10"] at /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm line 687.
> >>>>> *context:*      
> >>>>> *...*   
> >>>>> *683:*          GROUP BY ft.tstamp
> >>>>> *684:*          ORDER BY ft.tstamp DESC
> >>>>> *685:*          LIMIT $limit";
> >>>>> *686:*          
> >>>>> *687:*          my @tstamps = @{ $dbh->selectall_arrayref($q1) };
> >>>>> *688:*          return unless @tstamps;
> >>>>> *689:*          my $tstamps = join ',', map { "'$_'" } map { $_->[0] }
> >>>>> @tstamps;
> >>>>> *690:*          
> >>>>> *691:*          my $q2 = "SELECT ft.tstamp, i.id
> >>>>> *...*   
> >>>>>
> >>>>> *code stack:*   /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm:687
> >>>>> /usr/local/netdot/htdocs/management/mac.html:108
> >>>>> /usr/local/netdot/htdocs/management/device_tasks.html:60
> >>>>> /usr/local/netdot/htdocs/management/autohandler:81
> >>>>> /usr/local/share/perl5/HTML/Mason/Request.pm:951
> >>>>> /usr/local/netdot/htdocs/masondata/obj/1292882063/management/autohandler.obj:21
> >>>>> /usr/local/netdot/htdocs/autohandler:76
> >>>>>
> >>>>>
> >>>>> -Mike
> >>>>> -- 
> >>>>> Michael T. Voity
> >>>>> Network Engineer
> >>>>> University of Vermont
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Netdot-users mailing list
> >>>>> [email protected]
> >>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users
> >>>>
> >>>> _______________________________________________
> >>>> Netdot-users mailing list
> >>>> [email protected]
> >>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users
> 
> _______________________________________________
> Netdot-users mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-users

-- 
Our society can survive even a large amount of irrational regulation.
  -- John McCarthy


------------------------------

Message: 2
Date: Wed, 29 Jan 2014 11:45:54 -0500
From: "Michael T. Voity" <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: Carlos Vicente <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

Here is the ouput of that command -

If i was to guess on a table(s) that needs needs to be droped - fwtable, 
interface or physaddr ?

-Mike

------------------------
LATEST FOREIGN KEY ERROR
------------------------
140129 11:42:05 Error in foreign key constraint of table 
netdot/fwtableentry:
  FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
(`id`),
   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
`interface` (`id`),
   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
`physaddr` (`id`)
) ENGINE=InnoDB:
Cannot resolve table name close to:

(`id`),
   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
`interface` (`id`),
   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
`physaddr` (`id`)
) ENGINE=InnoDB

Michael T. Voity
Network Engineer
University of Vermont
(802) 656-8112

On 1/29/2014 11:39 AM, Carlos Vicente wrote:
> Hmm. OK.
>
> Please get the actual error message by running SHOW ENGINE INNODB STATUS; and 
> then looking for LATEST FOREIGN KEY ERROR in the output.
>
> cv
>
> On Jan 29, 2014, at 11:36 AM, Michael T. Voity <[email protected]> wrote:
>
>> Carlos,
>>
>> I did use the user 'root' to execute the sql statements.
>>
>> -Mike
>>
>> Michael T. Voity
>> Network Engineer
>> University of Vermont
>> (802) 656-8112
>>
>> On 1/29/2014 11:35 AM, Carlos Vicente wrote:
>>> Michael,
>>>
>>> I incorrectly suggested to use the ?netdot_user? user, which does not have 
>>> the permissions to create tables. Please try again using the DBA user (e.g. 
>>> root) and let me know if that doesn?t work.
>>>
>>> Sorry,
>>>
>>> cv
>>>
>>> On Jan 29, 2014, at 11:32 AM, Michael T. Voity <[email protected]> wrote:
>>>
>>>> Carlos,
>>>>
>>>> Thanks for your response!   I tried to do do the sql statement but was 
>>>> returned this error, I also tried it from the  schema.mysql file too.
>>>>
>>>> I verified that the reference tables are there.    It sounds like i need 
>>>> to drop the reference table and then rebuild the reference tables.
>>>>
>>>> Ideas?
>>>>
>>>> -Mike
>>>>
>>>> mysql> CREATE TABLE `fwtableentry` (
>>>>     ->   `fwtable` bigint NOT NULL,
>>>>     ->   `id` bigint NOT NULL auto_increment,
>>>>     ->   `interface` bigint NOT NULL,
>>>>     ->   `physaddr` bigint NOT NULL,
>>>>     ->   INDEX `FWTableEntry1` (`fwtable`),
>>>>     ->   INDEX `FWTableEntry2` (`interface`),
>>>>     ->   INDEX `FWTableEntry3` (`physaddr`),
>>>>     ->   PRIMARY KEY (`id`),
>>>>     ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
>>>> `fwtable`
>>>>     -> (`id`),
>>>>     ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>>>>     -> `interface` (`id`),
>>>>     ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>>>>     -> `physaddr` (`id`)
>>>>     -> ) ENGINE=InnoDB;
>>>> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
>>>> mysql> CREATE TABLE `fwtableentry` (
>>>>     ->   `fwtable` bigint NOT NULL,
>>>>     ->   `id` bigint NOT NULL auto_increment,
>>>>     ->   `interface` bigint NOT NULL,
>>>>     ->   `physaddr` bigint NOT NULL,
>>>>     ->   INDEX `FWTableEntry1` (`fwtable`),
>>>>     ->   INDEX `FWTableEntry2` (`interface`),
>>>>     ->   INDEX `FWTableEntry3` (`physaddr`),
>>>>     ->   PRIMARY KEY (`id`),
>>>>     ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
>>>> `fwtable` (`id`),
>>>>     ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES 
>>>> `interface` (`id`),
>>>>     ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES 
>>>> `physaddr` (`id`)
>>>>     -> ) ENGINE=InnoDB;
>>>> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
>>>>
>>>> Michael T. Voity
>>>> Network Engineer
>>>> University of Vermont
>>>> (802) 656-8112
>>>>
>>>> On 1/27/2014 9:52 PM, Carlos Vicente wrote:
>>>>> Hello Michael,
>>>>>
>>>>> That's odd.
>>>>>
>>>>> The easiest way would be to copy the table definition from the
>>>>> etc/schema.mysql file. You should have a copy from when you installed.
>>>>> But here it is for your convenience:
>>>>>
>>>>> CREATE TABLE `fwtableentry` (
>>>>>    `fwtable` bigint NOT NULL,
>>>>>    `id` bigint NOT NULL auto_increment,
>>>>>    `interface` bigint NOT NULL,
>>>>>    `physaddr` bigint NOT NULL,
>>>>>    INDEX `FWTableEntry1` (`fwtable`),
>>>>>    INDEX `FWTableEntry2` (`interface`),
>>>>>    INDEX `FWTableEntry3` (`physaddr`),
>>>>>    PRIMARY KEY (`id`),
>>>>>    CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
>>>>> (`id`),
>>>>>    CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>>>>> `interface` (`id`),
>>>>>    CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>>>>> `physaddr` (`id`)
>>>>> ) ENGINE=InnoDB;
>>>>>
>>>>>
>>>>> Then you need to paste it into your mysql client, like:
>>>>>
>>>>> # mysql -u netdot_user -p <netdot_password> netdot
>>>>>> [paste here]
>>>>>> quit;
>>>>> Best,
>>>>>
>>>>> cv
>>>>>
>>>>> On 1/27/14, 10:45 AM, Michael T. Voity wrote:
>>>>>> Hello Again,
>>>>>>
>>>>>> So I think I found my problem.   The table 'fwtableentry' is missing.
>>>>>>
>>>>>> What is the easiest way to get this table back?    Is there a script I
>>>>>> can run?    Can I manually add the table and fields?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> -Mike
>>>>>>
>>>>>>
>>>>>> Michael T. Voity
>>>>>> Network Engineer
>>>>>> University of Vermont
>>>>>> On 1/15/2014 12:47 PM, Michael T. Voity wrote:
>>>>>>> Hello list,
>>>>>>>
>>>>>>> I think I have seen this error before and might have seen a solution
>>>>>>> before, but I cant seem to find the solution in the archives.
>>>>>>>
>>>>>>> I think I have to delete a table or dump a table in the MySQL DB?
>>>>>>>
>>>>>>> Here is the error:
>>>>>>>
>>>>>>> *error:*        DBD::mysql::db selectall_arrayref failed: Table
>>>>>>> 'netdot.fwtableentry' doesn't exist [for Statement "SELECT ft.tstamp
>>>>>>> FROM physaddr p, interface i, fwtableentry fte, fwtable ft
>>>>>>> WHERE p.id=213716
>>>>>>> AND fte.physaddr=p.id
>>>>>>> AND fte.interface=i.id
>>>>>>> AND fte.fwtable=ft.id
>>>>>>> GROUP BY ft.tstamp
>>>>>>> ORDER BY ft.tstamp DESC
>>>>>>> LIMIT 10"] at /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm line 687.
>>>>>>> *context:*      
>>>>>>> *...*   
>>>>>>> *683:*          GROUP BY ft.tstamp
>>>>>>> *684:*          ORDER BY ft.tstamp DESC
>>>>>>> *685:*          LIMIT $limit";
>>>>>>> *686:*          
>>>>>>> *687:*          my @tstamps = @{ $dbh->selectall_arrayref($q1) };
>>>>>>> *688:*          return unless @tstamps;
>>>>>>> *689:*          my $tstamps = join ',', map { "'$_'" } map { $_->[0] }
>>>>>>> @tstamps;
>>>>>>> *690:*          
>>>>>>> *691:*          my $q2 = "SELECT ft.tstamp, i.id
>>>>>>> *...*   
>>>>>>>
>>>>>>> *code stack:*   /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm:687
>>>>>>> /usr/local/netdot/htdocs/management/mac.html:108
>>>>>>> /usr/local/netdot/htdocs/management/device_tasks.html:60
>>>>>>> /usr/local/netdot/htdocs/management/autohandler:81
>>>>>>> /usr/local/share/perl5/HTML/Mason/Request.pm:951
>>>>>>> /usr/local/netdot/htdocs/masondata/obj/1292882063/management/autohandler.obj:21
>>>>>>> /usr/local/netdot/htdocs/autohandler:76
>>>>>>>
>>>>>>>
>>>>>>> -Mike
>>>>>>> -- 
>>>>>>> Michael T. Voity
>>>>>>> Network Engineer
>>>>>>> University of Vermont
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Netdot-users mailing list
>>>>>>> [email protected]
>>>>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users
>>>>>> _______________________________________________
>>>>>> Netdot-users mailing list
>>>>>> [email protected]
>>>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users



------------------------------

Message: 3
Date: Wed, 29 Jan 2014 11:53:47 -0500
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: "Michael T. Voity" <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

If you do a ?show tables?, are interface and physaddr in the list?

cv

On Jan 29, 2014, at 11:45 AM, Michael T. Voity <[email protected]> wrote:

> Here is the ouput of that command -
> 
> If i was to guess on a table(s) that needs needs to be droped - fwtable, 
> interface or physaddr ?
> 
> -Mike
> 
> ------------------------
> LATEST FOREIGN KEY ERROR
> ------------------------
> 140129 11:42:05 Error in foreign key constraint of table netdot/fwtableentry:
> FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
> (`id`),
>  CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
> `interface` (`id`),
>  CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
> `physaddr` (`id`)
> ) ENGINE=InnoDB:
> Cannot resolve table name close to:
> 
> (`id`),
>  CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
> `interface` (`id`),
>  CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
> `physaddr` (`id`)
> ) ENGINE=InnoDB
> 
> Michael T. Voity
> Network Engineer
> University of Vermont
> (802) 656-8112
> 
> On 1/29/2014 11:39 AM, Carlos Vicente wrote:
>> Hmm. OK.
>> 
>> Please get the actual error message by running SHOW ENGINE INNODB STATUS; 
>> and then looking for LATEST FOREIGN KEY ERROR in the output.
>> 
>> cv
>> 
>> On Jan 29, 2014, at 11:36 AM, Michael T. Voity <[email protected]> wrote:
>> 
>>> Carlos,
>>> 
>>> I did use the user 'root' to execute the sql statements.
>>> 
>>> -Mike
>>> 
>>> Michael T. Voity
>>> Network Engineer
>>> University of Vermont
>>> (802) 656-8112
>>> 
>>> On 1/29/2014 11:35 AM, Carlos Vicente wrote:
>>>> Michael,
>>>> 
>>>> I incorrectly suggested to use the ?netdot_user? user, which does not have 
>>>> the permissions to create tables. Please try again using the DBA user 
>>>> (e.g. root) and let me know if that doesn?t work.
>>>> 
>>>> Sorry,
>>>> 
>>>> cv
>>>> 
>>>> On Jan 29, 2014, at 11:32 AM, Michael T. Voity <[email protected]> wrote:
>>>> 
>>>>> Carlos,
>>>>> 
>>>>> Thanks for your response!   I tried to do do the sql statement but was 
>>>>> returned this error, I also tried it from the  schema.mysql file too.
>>>>> 
>>>>> I verified that the reference tables are there.    It sounds like i need 
>>>>> to drop the reference table and then rebuild the reference tables.
>>>>> 
>>>>> Ideas?
>>>>> 
>>>>> -Mike
>>>>> 
>>>>> mysql> CREATE TABLE `fwtableentry` (
>>>>>    ->   `fwtable` bigint NOT NULL,
>>>>>    ->   `id` bigint NOT NULL auto_increment,
>>>>>    ->   `interface` bigint NOT NULL,
>>>>>    ->   `physaddr` bigint NOT NULL,
>>>>>    ->   INDEX `FWTableEntry1` (`fwtable`),
>>>>>    ->   INDEX `FWTableEntry2` (`interface`),
>>>>>    ->   INDEX `FWTableEntry3` (`physaddr`),
>>>>>    ->   PRIMARY KEY (`id`),
>>>>>    ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
>>>>> `fwtable`
>>>>>    -> (`id`),
>>>>>    ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>>>>>    -> `interface` (`id`),
>>>>>    ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>>>>>    -> `physaddr` (`id`)
>>>>>    -> ) ENGINE=InnoDB;
>>>>> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
>>>>> mysql> CREATE TABLE `fwtableentry` (
>>>>>    ->   `fwtable` bigint NOT NULL,
>>>>>    ->   `id` bigint NOT NULL auto_increment,
>>>>>    ->   `interface` bigint NOT NULL,
>>>>>    ->   `physaddr` bigint NOT NULL,
>>>>>    ->   INDEX `FWTableEntry1` (`fwtable`),
>>>>>    ->   INDEX `FWTableEntry2` (`interface`),
>>>>>    ->   INDEX `FWTableEntry3` (`physaddr`),
>>>>>    ->   PRIMARY KEY (`id`),
>>>>>    ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
>>>>> `fwtable` (`id`),
>>>>>    ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES 
>>>>> `interface` (`id`),
>>>>>    ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES 
>>>>> `physaddr` (`id`)
>>>>>    -> ) ENGINE=InnoDB;
>>>>> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
>>>>> 
>>>>> Michael T. Voity
>>>>> Network Engineer
>>>>> University of Vermont
>>>>> (802) 656-8112
>>>>> 
>>>>> On 1/27/2014 9:52 PM, Carlos Vicente wrote:
>>>>>> Hello Michael,
>>>>>> 
>>>>>> That's odd.
>>>>>> 
>>>>>> The easiest way would be to copy the table definition from the
>>>>>> etc/schema.mysql file. You should have a copy from when you installed.
>>>>>> But here it is for your convenience:
>>>>>> 
>>>>>> CREATE TABLE `fwtableentry` (
>>>>>>   `fwtable` bigint NOT NULL,
>>>>>>   `id` bigint NOT NULL auto_increment,
>>>>>>   `interface` bigint NOT NULL,
>>>>>>   `physaddr` bigint NOT NULL,
>>>>>>   INDEX `FWTableEntry1` (`fwtable`),
>>>>>>   INDEX `FWTableEntry2` (`interface`),
>>>>>>   INDEX `FWTableEntry3` (`physaddr`),
>>>>>>   PRIMARY KEY (`id`),
>>>>>>   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
>>>>>> (`id`),
>>>>>>   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>>>>>> `interface` (`id`),
>>>>>>   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>>>>>> `physaddr` (`id`)
>>>>>> ) ENGINE=InnoDB;
>>>>>> 
>>>>>> 
>>>>>> Then you need to paste it into your mysql client, like:
>>>>>> 
>>>>>> # mysql -u netdot_user -p <netdot_password> netdot
>>>>>>> [paste here]
>>>>>>> quit;
>>>>>> Best,
>>>>>> 
>>>>>> cv
>>>>>> 
>>>>>> On 1/27/14, 10:45 AM, Michael T. Voity wrote:
>>>>>>> Hello Again,
>>>>>>> 
>>>>>>> So I think I found my problem.   The table 'fwtableentry' is missing.
>>>>>>> 
>>>>>>> What is the easiest way to get this table back?    Is there a script I
>>>>>>> can run?    Can I manually add the table and fields?
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> 
>>>>>>> -Mike
>>>>>>> 
>>>>>>> 
>>>>>>> Michael T. Voity
>>>>>>> Network Engineer
>>>>>>> University of Vermont
>>>>>>> On 1/15/2014 12:47 PM, Michael T. Voity wrote:
>>>>>>>> Hello list,
>>>>>>>> 
>>>>>>>> I think I have seen this error before and might have seen a solution
>>>>>>>> before, but I cant seem to find the solution in the archives.
>>>>>>>> 
>>>>>>>> I think I have to delete a table or dump a table in the MySQL DB?
>>>>>>>> 
>>>>>>>> Here is the error:
>>>>>>>> 
>>>>>>>> *error:*       DBD::mysql::db selectall_arrayref failed: Table
>>>>>>>> 'netdot.fwtableentry' doesn't exist [for Statement "SELECT ft.tstamp
>>>>>>>> FROM physaddr p, interface i, fwtableentry fte, fwtable ft
>>>>>>>> WHERE p.id=213716
>>>>>>>> AND fte.physaddr=p.id
>>>>>>>> AND fte.interface=i.id
>>>>>>>> AND fte.fwtable=ft.id
>>>>>>>> GROUP BY ft.tstamp
>>>>>>>> ORDER BY ft.tstamp DESC
>>>>>>>> LIMIT 10"] at /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm line 687.
>>>>>>>> *context:*     
>>>>>>>> *...*          
>>>>>>>> *683:*         GROUP BY ft.tstamp
>>>>>>>> *684:*         ORDER BY ft.tstamp DESC
>>>>>>>> *685:*         LIMIT $limit";
>>>>>>>> *686:*         
>>>>>>>> *687:*         my @tstamps = @{ $dbh->selectall_arrayref($q1) };
>>>>>>>> *688:*         return unless @tstamps;
>>>>>>>> *689:*         my $tstamps = join ',', map { "'$_'" } map { $_->[0] }
>>>>>>>> @tstamps;
>>>>>>>> *690:*         
>>>>>>>> *691:*         my $q2 = "SELECT ft.tstamp, i.id
>>>>>>>> *...*          
>>>>>>>> 
>>>>>>>> *code stack:*          
>>>>>>>> /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm:687
>>>>>>>> /usr/local/netdot/htdocs/management/mac.html:108
>>>>>>>> /usr/local/netdot/htdocs/management/device_tasks.html:60
>>>>>>>> /usr/local/netdot/htdocs/management/autohandler:81
>>>>>>>> /usr/local/share/perl5/HTML/Mason/Request.pm:951
>>>>>>>> /usr/local/netdot/htdocs/masondata/obj/1292882063/management/autohandler.obj:21
>>>>>>>> /usr/local/netdot/htdocs/autohandler:76
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -Mike
>>>>>>>> -- 
>>>>>>>> Michael T. Voity
>>>>>>>> Network Engineer
>>>>>>>> University of Vermont
>>>>>>>> 
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> Netdot-users mailing list
>>>>>>>> [email protected]
>>>>>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users
>>>>>>> _______________________________________________
>>>>>>> Netdot-users mailing list
>>>>>>> [email protected]
>>>>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users
> 




------------------------------

Message: 4
Date: Wed, 29 Jan 2014 11:59:58 -0500
From: "Michael T. Voity" <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: Carlos Vicente <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

Those tables are there - here is the list -

mysql> show tables;
+-----------------------+
| Tables_in_netdot      |
+-----------------------+
| accessright           |
| arpcache              |
| arpcacheentry         |
| asset                 |
| audit                 |
| availability          |
| backbonecable         |
| backbonecable_history |
| bgppeering            |
| cablestrand           |
| cablestrand_history   |
| cabletype             |
| circuit               |
| circuit_history       |
| circuitstatus         |
| circuittype           |
| closet                |
| closetpicture         |
| contact               |
| contact_history       |
| contactlist           |
| contacttype           |
| datacache             |
| device                |
| device_history        |
| deviceattr            |
| deviceattrname        |
| devicecontacts        |
| devicemodule          |
| dhcpattr              |
| dhcpattrname          |
| dhcpscope             |
| dhcpscopetype         |
| dhcpscopeuse          |
| entity                |
| entity_history        |
| entityrole            |
| entitysite            |
| entitytype            |
| fibertype             |
| floor                 |
| floorpicture          |
| fwtable               |
| groupright            |
| horizontalcable       |
| hostaudit             |
| interface             |
| interface_history     |
| interfacevlan         |
| ipblock               |
| ipblockattr           |
| ipblockattrname       |
| ipblockstatus         |
| ipservice             |
| maintcontract         |
| monitorstatus         |
| oui                   |
| person                |
| person_history        |
| physaddr              |
| physaddrattr          |
| physaddrattrname      |
| product               |
| product_history       |
| producttype           |
| room                  |
| rr                    |
| rraddr                |
| rrcname               |
| rrds                  |
| rrhinfo               |
| rrloc                 |
| rrmx                  |
| rrnaptr               |
| rrns                  |
| rrptr                 |
| rrsrv                 |
| rrtxt                 |
| savedqueries          |
| schemainfo            |
| service               |
| site                  |
| site_history          |
| sitelink              |
| sitelink_history      |
| sitepicture           |
| sitesubnet            |
| splice                |
| stpinstance           |
| strandstatus          |
| subnetzone            |
| userright             |
| usertype              |
| vlan                  |
| vlangroup             |
| vlangroup_history     |
| zone                  |
| zonealias             |
+-----------------------+
98 rows in set (0.00 sec)

Michael T. Voity
Network Engineer
University of Vermont
(802) 656-8112

On 1/29/2014 11:53 AM, Carlos Vicente wrote:
> If you do a ?show tables?, are interface and physaddr in the list?
>
> cv
>
> On Jan 29, 2014, at 11:45 AM, Michael T. Voity <[email protected]> wrote:
>
>> Here is the ouput of that command -
>>
>> If i was to guess on a table(s) that needs needs to be droped - fwtable, 
>> interface or physaddr ?
>>
>> -Mike
>>
>> ------------------------
>> LATEST FOREIGN KEY ERROR
>> ------------------------
>> 140129 11:42:05 Error in foreign key constraint of table netdot/fwtableentry:
>> FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
>> (`id`),
>>   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>> `interface` (`id`),
>>   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>> `physaddr` (`id`)
>> ) ENGINE=InnoDB:
>> Cannot resolve table name close to:
>>
>> (`id`),
>>   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>> `interface` (`id`),
>>   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>> `physaddr` (`id`)
>> ) ENGINE=InnoDB
>>
>> Michael T. Voity
>> Network Engineer
>> University of Vermont
>> (802) 656-8112
>>
>> On 1/29/2014 11:39 AM, Carlos Vicente wrote:
>>> Hmm. OK.
>>>
>>> Please get the actual error message by running SHOW ENGINE INNODB STATUS; 
>>> and then looking for LATEST FOREIGN KEY ERROR in the output.
>>>
>>> cv
>>>
>>> On Jan 29, 2014, at 11:36 AM, Michael T. Voity <[email protected]> wrote:
>>>
>>>> Carlos,
>>>>
>>>> I did use the user 'root' to execute the sql statements.
>>>>
>>>> -Mike
>>>>
>>>> Michael T. Voity
>>>> Network Engineer
>>>> University of Vermont
>>>> (802) 656-8112
>>>>
>>>> On 1/29/2014 11:35 AM, Carlos Vicente wrote:
>>>>> Michael,
>>>>>
>>>>> I incorrectly suggested to use the ?netdot_user? user, which does not 
>>>>> have the permissions to create tables. Please try again using the DBA 
>>>>> user (e.g. root) and let me know if that doesn?t work.
>>>>>
>>>>> Sorry,
>>>>>
>>>>> cv
>>>>>
>>>>> On Jan 29, 2014, at 11:32 AM, Michael T. Voity <[email protected]> wrote:
>>>>>
>>>>>> Carlos,
>>>>>>
>>>>>> Thanks for your response!   I tried to do do the sql statement but was 
>>>>>> returned this error, I also tried it from the  schema.mysql file too.
>>>>>>
>>>>>> I verified that the reference tables are there.    It sounds like i need 
>>>>>> to drop the reference table and then rebuild the reference tables.
>>>>>>
>>>>>> Ideas?
>>>>>>
>>>>>> -Mike
>>>>>>
>>>>>> mysql> CREATE TABLE `fwtableentry` (
>>>>>>     ->   `fwtable` bigint NOT NULL,
>>>>>>     ->   `id` bigint NOT NULL auto_increment,
>>>>>>     ->   `interface` bigint NOT NULL,
>>>>>>     ->   `physaddr` bigint NOT NULL,
>>>>>>     ->   INDEX `FWTableEntry1` (`fwtable`),
>>>>>>     ->   INDEX `FWTableEntry2` (`interface`),
>>>>>>     ->   INDEX `FWTableEntry3` (`physaddr`),
>>>>>>     ->   PRIMARY KEY (`id`),
>>>>>>     ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
>>>>>> `fwtable`
>>>>>>     -> (`id`),
>>>>>>     ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>>>>>>     -> `interface` (`id`),
>>>>>>     ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>>>>>>     -> `physaddr` (`id`)
>>>>>>     -> ) ENGINE=InnoDB;
>>>>>> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
>>>>>> mysql> CREATE TABLE `fwtableentry` (
>>>>>>     ->   `fwtable` bigint NOT NULL,
>>>>>>     ->   `id` bigint NOT NULL auto_increment,
>>>>>>     ->   `interface` bigint NOT NULL,
>>>>>>     ->   `physaddr` bigint NOT NULL,
>>>>>>     ->   INDEX `FWTableEntry1` (`fwtable`),
>>>>>>     ->   INDEX `FWTableEntry2` (`interface`),
>>>>>>     ->   INDEX `FWTableEntry3` (`physaddr`),
>>>>>>     ->   PRIMARY KEY (`id`),
>>>>>>     ->   CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES 
>>>>>> `fwtable` (`id`),
>>>>>>     ->   CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) 
>>>>>> REFERENCES `interface` (`id`),
>>>>>>     ->   CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES 
>>>>>> `physaddr` (`id`)
>>>>>>     -> ) ENGINE=InnoDB;
>>>>>> ERROR 1005 (HY000): Can't create table 'netdot.fwtableentry' (errno: 150)
>>>>>>
>>>>>> Michael T. Voity
>>>>>> Network Engineer
>>>>>> University of Vermont
>>>>>> (802) 656-8112
>>>>>>
>>>>>> On 1/27/2014 9:52 PM, Carlos Vicente wrote:
>>>>>>> Hello Michael,
>>>>>>>
>>>>>>> That's odd.
>>>>>>>
>>>>>>> The easiest way would be to copy the table definition from the
>>>>>>> etc/schema.mysql file. You should have a copy from when you installed.
>>>>>>> But here it is for your convenience:
>>>>>>>
>>>>>>> CREATE TABLE `fwtableentry` (
>>>>>>>    `fwtable` bigint NOT NULL,
>>>>>>>    `id` bigint NOT NULL auto_increment,
>>>>>>>    `interface` bigint NOT NULL,
>>>>>>>    `physaddr` bigint NOT NULL,
>>>>>>>    INDEX `FWTableEntry1` (`fwtable`),
>>>>>>>    INDEX `FWTableEntry2` (`interface`),
>>>>>>>    INDEX `FWTableEntry3` (`physaddr`),
>>>>>>>    PRIMARY KEY (`id`),
>>>>>>>    CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES `fwtable`
>>>>>>> (`id`),
>>>>>>>    CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES
>>>>>>> `interface` (`id`),
>>>>>>>    CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES
>>>>>>> `physaddr` (`id`)
>>>>>>> ) ENGINE=InnoDB;
>>>>>>>
>>>>>>>
>>>>>>> Then you need to paste it into your mysql client, like:
>>>>>>>
>>>>>>> # mysql -u netdot_user -p <netdot_password> netdot
>>>>>>>> [paste here]
>>>>>>>> quit;
>>>>>>> Best,
>>>>>>>
>>>>>>> cv
>>>>>>>
>>>>>>> On 1/27/14, 10:45 AM, Michael T. Voity wrote:
>>>>>>>> Hello Again,
>>>>>>>>
>>>>>>>> So I think I found my problem.   The table 'fwtableentry' is missing.
>>>>>>>>
>>>>>>>> What is the easiest way to get this table back?    Is there a script I
>>>>>>>> can run?    Can I manually add the table and fields?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> -Mike
>>>>>>>>
>>>>>>>>
>>>>>>>> Michael T. Voity
>>>>>>>> Network Engineer
>>>>>>>> University of Vermont
>>>>>>>> On 1/15/2014 12:47 PM, Michael T. Voity wrote:
>>>>>>>>> Hello list,
>>>>>>>>>
>>>>>>>>> I think I have seen this error before and might have seen a solution
>>>>>>>>> before, but I cant seem to find the solution in the archives.
>>>>>>>>>
>>>>>>>>> I think I have to delete a table or dump a table in the MySQL DB?
>>>>>>>>>
>>>>>>>>> Here is the error:
>>>>>>>>>
>>>>>>>>> *error:*      DBD::mysql::db selectall_arrayref failed: Table
>>>>>>>>> 'netdot.fwtableentry' doesn't exist [for Statement "SELECT ft.tstamp
>>>>>>>>> FROM physaddr p, interface i, fwtableentry fte, fwtable ft
>>>>>>>>> WHERE p.id=213716
>>>>>>>>> AND fte.physaddr=p.id
>>>>>>>>> AND fte.interface=i.id
>>>>>>>>> AND fte.fwtable=ft.id
>>>>>>>>> GROUP BY ft.tstamp
>>>>>>>>> ORDER BY ft.tstamp DESC
>>>>>>>>> LIMIT 10"] at /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm line 687.
>>>>>>>>> *context:*    
>>>>>>>>> *...*         
>>>>>>>>> *683:*        GROUP BY ft.tstamp
>>>>>>>>> *684:*        ORDER BY ft.tstamp DESC
>>>>>>>>> *685:*        LIMIT $limit";
>>>>>>>>> *686:*        
>>>>>>>>> *687:*        my @tstamps = @{ $dbh->selectall_arrayref($q1) };
>>>>>>>>> *688:*        return unless @tstamps;
>>>>>>>>> *689:*        my $tstamps = join ',', map { "'$_'" } map { $_->[0] }
>>>>>>>>> @tstamps;
>>>>>>>>> *690:*        
>>>>>>>>> *691:*        my $q2 = "SELECT ft.tstamp, i.id
>>>>>>>>> *...*         
>>>>>>>>>
>>>>>>>>> *code stack:*         
>>>>>>>>> /usr/local/netdot/lib/Netdot/Model/PhysAddr.pm:687
>>>>>>>>> /usr/local/netdot/htdocs/management/mac.html:108
>>>>>>>>> /usr/local/netdot/htdocs/management/device_tasks.html:60
>>>>>>>>> /usr/local/netdot/htdocs/management/autohandler:81
>>>>>>>>> /usr/local/share/perl5/HTML/Mason/Request.pm:951
>>>>>>>>> /usr/local/netdot/htdocs/masondata/obj/1292882063/management/autohandler.obj:21
>>>>>>>>> /usr/local/netdot/htdocs/autohandler:76
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -Mike
>>>>>>>>> -- 
>>>>>>>>> Michael T. Voity
>>>>>>>>> Network Engineer
>>>>>>>>> University of Vermont
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Netdot-users mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users
>>>>>>>> _______________________________________________
>>>>>>>> Netdot-users mailing list
>>>>>>>> [email protected]
>>>>>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-users



------------------------------

_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users


End of Netdot-users Digest, Vol 62, Issue 13
********************************************

Reply via email to