Leser: 22
|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
root@lapi:/home/peter/wer_ist_im_netz# ./arpcollect.pl
Can't locate object method "mac_address" via package "WatchLAN::IpAddress" at /usr/local/share/perl/5.10.0/Rose/DB/Object.pm line 1499
Rose::DB::Object::AUTOLOAD('WatchLAN::IpAddress=HASH(0xa676a48)', '00:11:25:d2:14:0f') called at /usr/local/share/perl/5.10.0/Rose/Object.pm line 25
Rose::Object::init('WatchLAN::IpAddress=HASH(0xa676a48)', 'mac_address', '00:11:25:d2:14:0f') called at /usr/local/share/perl/5.10.0/Rose/Object.pm line 13
Rose::Object::new('WatchLAN::IpAddress', 'mac_address', '00:11:25:d2:14:0f') called at /usr/local/share/perl/5.10.0/Rose/DB/Object/MakeMethods/Generic.pm line 5664
Rose::DB::Object::MakeMethods::Generic::__args_to_object('WatchLAN::Activity=HASH(0xa334db8)', 'device',
'WatchLAN::IpAddress', 'SCALAR(0x9dee568)', 'ARRAY(0xa5bf540)') called at /usr/local/share/perl/5.10.0/Rose/DB/Object/MakeMethods/Generic.pm line 2335
Rose::DB::Object::MakeMethods::Generic::__ANON__(undef, 'HASH(0xa676c18)') called at WatchLAN.pm line 64
WatchLAN::cache_flush('WatchLAN=HASH(0xa34db70)') called at WatchLAN.pm line 45
WatchLAN::event_add('WatchLAN=HASH(0xa34db70)', '00:11:25:d2:14:0f', 10.1.2.152) called at ./arpcollect.pl line 43
main::callback('ARRAY(0x95f9880)', 'HASH(0x9726000)',
'\x{0}\x{1b}!\x{0}|\x{be}\x{0}\x{11}%\x{d2}\x{14}\x{f}\x{8}\x{0}E\x{0}\x{0}\x{1c}
\x{0}\x{0}@\x{0}@\x{1}\x{c9}\x{b0}\x{a}\x{1}\x{2}\x{98}\x{d9}\x{92}\x{8b}\x{5}\x{8}
\x{0}$\x{e6}\x{d3}\x{19}\x{0}\x{0}') called at ./arpcollect.pl line 25
root@lapi:/home/peter/wer_ist_im_netz#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CREATE TABLE ip_addresses (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
string VARCHAR(15),
UNIQUE(string)
) Type=InnoDB;
CREATE TABLE devices (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255),
mac_address VARCHAR(17),
ip_static_id INTEGER,
FOREIGN KEY (ip_static_id)
REFERENCES ip_addresses(id),
INDEX(ip_static_id),
UNIQUE(mac_address)
) Type=InnoDB;
CREATE TABLE activity (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
minute DATETIME,
counter BIGINT,
device_id INTEGER NOT NULL,
ip_address_id INTEGER NOT NULL,
FOREIGN KEY (device_id)
REFERENCES devices(id),
FOREIGN KEY (ip_address_id)
REFERENCES ip_addresses(id),
INDEX(device_id),
INDEX(ip_address_id)
) Type=InnoDB;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
DROP INDEX device_id_idx;
DROP INDEX ip_static_id_idx;
DROP INDEX ip_address_id_idx;
DROP TABLE activity;
DROP TABLE devices;
DROP TABLE ip_addresses;
CREATE TABLE ip_addresses (
id SERIAL UNIQUE PRIMARY KEY,
string VARCHAR(15),
UNIQUE(string)
);
CREATE TABLE devices (
id SERIAL UNIQUE PRIMARY KEY,
name VARCHAR(255),
mac_address VARCHAR(17),
ip_static_id INTEGER,
FOREIGN KEY (ip_static_id)
REFERENCES ip_addresses(id),
UNIQUE(mac_address)
);
CREATE TABLE activity (
id SERIAL UNIQUE PRIMARY KEY,
minute TIMESTAMP,
counter BIGINT,
device_id INTEGER NOT NULL,
ip_address_id INTEGER NOT NULL,
FOREIGN KEY (device_id)
REFERENCES devices(id),
FOREIGN KEY (ip_address_id)
REFERENCES ip_addresses(id)
);
CREATE INDEX ip_static_id_idx ON devices (ip_static_id);
CREATE INDEX device_id_idx ON activity (device_id);
CREATE INDEX ip_address_id_idx ON activity (ip_address_id);
Gast+2008-06-07 14:00:10--wäre ein [sql]CREATE TABLE <name> IF NOT EXISTS[/sql] nicht besser?
Dubu+2008-06-07 12:13:28--... und in der Datenbankdefinition gibt es keine Tabelle ip_address, sondern nur ip_addresses. Bist du sicher, dass du die DB richtig angelegt hast, wie im Artikel angegeben?
Gast+2008-06-10 14:09:11--das war's. Auch ich habe die SQL von dem Bild abgetippt, und dabei aus den ip_adresses halt ip_adress gemacht.
Wie bist du darauf gekommen, ich habe immer in den genannten Code Zeilen gesucht "called at WatchLAN.pm line 64", aber das der Fehler in der DB liegt haette ich nie gefunden.
|< 1 2 >| | 14 Einträge, 2 Seiten |