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: Netdot to the rescue (Carlos Vicente)
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)
5. Re: System error looking for a mac address (Carlos Vicente)
----------------------------------------------------------------------
Message: 1
Date: Wed, 29 Jan 2014 10:09:35 -0500
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] Netdot to the rescue
To: Emmanuel Togo <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1
Emmanuel,
We're always happy to hear success stories!
Best regards,
cv
On Jan 29, 2014, at 9:28 AM, Emmanuel Togo <[email protected]> wrote:
> Hi All,
> Thanks to Netdot team. just used netdot to identify and resolved IP address
> conflict issue on my network. see attached
>
> Regards
> Togo
> <dhcp ipconflict issue.jpg>_______________________________________________
> Netdot-users mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-users
------------------------------
Message: 2
Date: Wed, 29 Jan 2014 11:32:19 -0500
From: "Michael T. Voity" <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: Carlos Vicente <[email protected]>,
"[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
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:35:04 -0500
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: "Michael T. Voity" <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
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:36:39 -0500
From: "Michael T. Voity" <[email protected]>
Subject: Re: [Netdot-users] System error looking for a mac address
To: Carlos Vicente <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
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: 5
Date: Wed, 29 Jan 2014 11:39:37 -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
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 12
********************************************