Re: [db-wg] please help, can't start whoisserver


On Sun, May 28, 2006 at 10:44:08AM +0300, Nicolae Ghimbovschi wrote:

Dear Nicolae,

There is an error in the release version of SQL script to build the
database.
Please find the patch attached.

> Hi everybody !
> I'm a newbie in working with a whoisserver, and I can't start it, i get
> errors
> 
> I have compiled and installed whoisserve-3.3.0 ,from RIPE site, under Fedora
> Core 5.
> #./build.sh --prefix=/opt/whoisd --disable-xmltest --disable-xslttest
> everything worked fine.
> 
> 
> But when I run to make the sample database I get errors.
> 
> In files rip.conf.sample and sources.config.sample I have configured the
> following lines:
> in rip.conf.smaple
> 
> RIPADMIN  xmachine.fedora,3306,root,hello,RIPADMIN
> 
> and in  sources.conf.sample
> 
> DATABASE     SAMPLEDB
> host:         xmachine.fedora
> port:        3306
> trx_support: n
> user:         root
> password:    hello
> /DATABASE
> 
> 
> [root@localhost bin]# ./make_db -c /opt/whois/conf/rip.config.sample -s
> SAMPLE -1
> sqlhost=xmachine.fedora sqlport=3306 sqluser=root sqlpswd=hello
> sqldbname=SAMPLEDB
> npasses=1
> 
> = 10:27:16 Loading database [SAMPLEDB] (source [SAMPLE]) started
> 
> 
> = 10:27:16 Loading the database [SAMPLEDB] [see list in /dev/tty]
> 
> *******************Sun May 28 10:27:17 EEST 2006******************
> Creating tables\n
> Creating tables\n
> creating main database
> ERROR 1060 (42S21) at line 246: Duplicate column name 'interface_v6_lsp'
> creating RIPADMIN database
> Sun May 28 10:27:17 EEST 2006\n
> Making indexes\n
> ERROR 1146 (42S02) at line 1: Table 'SAMPLEDB.person_role' doesn't exist
> Sun May 28 10:27:18 EEST 2006\n
> Loading tables - 1 of 1 pass\n
> Sun May 28 10:27:18 EEST 2006 Loading
> /opt/whois/var/tmp/load/SAMPLE/sample.db.gz
> D: Making SQL connection to SAMPLEDB@localhost ...OK
> starting processing stream
> Table 'SAMPLEDB.mntner' doesn't exist[SELECT object_id FROM mntner WHERE
> mntner='TEST-DBM-MNT' ]
> 
> died: +315 modules/ud/ud_core.c
> ./load_all.sh: line 15:  3464 Done                    ${UNZIP1}
> ${object_file}
>      3465                       | eval ${FILTER}
>      3467 Segmentation fault      | $LOADER -L $1 -p ${PROPERTIES} -s
> ${SOURCE}
> *** ERROR: Loader failure [139]. Exiting\n
> ************** ERROR ***************
> ***  10:27:18 Error loading database=SAMPLEDB for source=SAMPLE, ./make_db
> exiting
> ************************************
> 
> 
> ########################################################
> ##when making an empty database I get the following
> ########################################################
> 
> [root@localhost bin]# ./make_db -c /opt/whois/conf/rip.config.sample -s
> SAMPLE -0
> sqlhost=xmachine.fedora sqlport=3306 sqluser=root sqlpswd=hello
> sqldbname=SAMPLEDB
> npasses=0
> 
> = 10:30:27 Loading database [SAMPLEDB] (source [SAMPLE]) started
> 
> 
> = 10:30:27 Loading the database [SAMPLEDB] [see list in /dev/tty]
> 
> *******************Sun May 28 10:30:28 EEST 2006******************
> Creating tables\n
> Creating tables\n
> creating main database
> ERROR 1007 (HY000) at line 1: Can't create database 'SAMPLEDB'; database
> exists
> ERROR 1060 (42S21) at line 246: Duplicate column name 'interface_v6_lsp'
> creating RIPADMIN database
> ERROR 1007 (HY000) at line 2: Can't create database 'RIPADMIN'; database
> exists
> Sun May 28 10:30:28 EEST 2006\n
> Making indexes\n
> ERROR 1146 (42S02) at line 1: Table 'SAMPLEDB.person_role' doesn't exist
> Sun May 28 10:30:28 EEST 2006\n
> Making more indexes\n
> Sun May 28 10:30:28 EEST 2006  creating indexes for aux tables
> ERROR 1146 (42S02) at line 4: Table 'SAMPLEDB.tech_c' doesn't exist
> Sun May 28 10:30:28 EEST 2006  creating indexes for leaf tables
> ERROR 1146 (42S02) at line 1: Table 'SAMPLEDB.names' doesn't exist
> Sun May 28 10:30:28 EEST 2006  saving CURRENTSERIAL=22
> ERROR 1146 (42S02) at line 1: Table 'SAMPLEDB.serials' doesn't exist
> Finished Sun May 28 10:30:28 EEST 2006
> 
> = 10:30:29 Loading database [SAMPLEDB] (source [SAMPLE]) finished without
> errors
> 
> ########################################################
> ##when checking the database
> ########################################################
> [root@localhost bin]# ./whois-server -c /opt/whois/conf/rip.config.sample -p
> test.pid
> Configuration [/opt/whois/conf/rip.config.sample]:
> /opt/whois/log/riperr/riperrlog
> Check the DB
> Checking the Database [SAMPLEDB]...died: +230 modules/ud/ud_recover.c
> Segmentation fault
> 
> [root@localhost bin]# ./whoisd_start
> Starting whois-server daemon with configuration
> /opt/whois/conf/rip.config.sample from /opt/whois/bin
> ./whoisd_start: line 174:  3639 Segmentation fault      $NOHUP_NICENESS
> $WHOISRIP -p $pid_file -c ${CONFIG} >>$err_log 2>&1
> mv: cannot stat `core': No such file or directory
> 
> #########################################
> #from Error log:
> #########################################
> Warning: undefined configuration variable: SAWFILE
> Warning: undefined configuration variable: RIR
> Error: Incomplete configuration file.  Was this intended ???
> 
> 2 configuration variables undefined.
> 
> died: +168 modules/sq/mysql_driver.c
> 060528 10:39:45  whoisd crashed & restarted\n/opt/whois/bin/whois-server -c
> /opt/whois/conf/rip.config.sample.q\n
> 060528 10:39:46 /opt/whois/bin/whois-server -p /opt/whois/bin/whois-
> server.pid -c /opt/whois/conf/rip.config.sample.q
> Configuration [/opt/whois/conf/rip.config.sample.q]:
> Warning: undefined configuration variable: SAWFILE
> Warning: undefined configuration variable: RIR
> Error: Incomplete configuration file.  Was this intended ???
> 
> 2 configuration variables undefined.
> 
> Mandatory variable(s) undefined
> 
> <<<<<<<<<<<<<<<     >>>>>>>>>>>
> 
> Best Regards,
> Nicolae

-- 
Katie Petrusha
RIPE NCC
Index: create.tables.sql.in
===================================================================
RCS file: /srv/pubcvs/cvs/cvsroot/whoisserver/src/SQL/create.tables.sql.in,v
retrieving revision 1.6
retrieving revision 1.8
diff -r1.6 -r1.8
252c253
<   PRIMARY KEY  (interface_v6_lsp,interface_v6_lsp,interface_v4,object_id)
---
>   PRIMARY KEY  (interface_v6_msp,interface_v6_lsp,interface_v4,object_id)