问题
Database installed into /home/informix/IBM/Informix_Software_Bundle
.
The owner of folder is user informix
of the group informix
.
I get the following message when run dbaccessdemo7
:
DBACCESS Demonstration Database Installation Script
Dropping existing stores_demo database ....
Creating stores_demo database ....
931: Cannot locate port_alias service/tcp service in /etc/services.
Error in line 1
Near character position 1
Database startup looks ok:
$ oninit -vi
This action will initialize IBM Informix Dynamic Server;
any existing IBM Informix Dynamic Server databases will NOT be accessible -
Do you wish to continue (y/n)? y
Reading configuration file '/home/informix/IBM/Informix_Software_Bundle/etc/onconfig'...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 4310 kbytes...succeeded
Creating infos file "/home/informix/IBM/Informix_Software_Bundle/etc/.infos.myserver"...succeeded
Linking conf file "/home/informix/IBM/Informix_Software_Bundle/etc/.conf.myserver"...succeeded
Initializing rhead structure...rhlock_t 16384 (512K)... rlock_t (2656K)... Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Initializing encryption-at-rest if necessary...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 8 flushers...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Validating chunks...succeeded
Creating database partition...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Init ReadAhead Daemon...succeeded
Init DB Util Daemon...succeeded
Initializing DBSPACETEMP list...succeeded
Init Auto Tuning Daemon...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...succeeded
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Creating VP cache drain thread...succeeded
Creating limits manager thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
$ onstat -
IBM Informix Dynamic Server Version 14.10.FC3DE -- On-Line -- Up 00:00:24 -- 148084 Kbytes
Envieronment configuration:
export INFORMIXDIR=/home/informix/IBM/Informix_Software_Bundle
export INFORMIXSQLHOSTS=/home/informix/IBM/Informix_Software_Bundle/etc/sqlhosts
export ONCONFIG=onconfig
export INFORMIXSERVER=myserver
export SERVERNUM=1
export PATH=$PATH:$INFORMIXDIR/bin
export LOCALE=en_gb.utf8
export DB_LOCALE=en_us.8859-1
Checking this possible causes list www.ibm.com/support/pages/931...
$INFORMIXDIR/etc/sqlhosts
contents:
cat $INFORMIXSQLHOSTS
myserver onsoctcp localhost port_alias
File sqlhosts
exists in $INFORMIXDIR/etc
:
$ ls $INFORMIXDIR/etc | grep sqlhosts
sqlhosts
sqlhosts.demo
sqlhosts.ol_informix1410
$INFORMIXDIR/etc/services
contents:
cat $INFORMIXDIR/etc/services
port_alias 8202/tcp
Some $INFORMIXDIR/etc/onconfig
lines:
DBSERVERNAME myserver
FULL_DISK_INIT 1
DUMPDIR $INFORMIXDIR/tmp
MSGPATH $INFORMIXDIR/tmp/online.log
ROOTNAME rootdbs
ROOTPATH $INFORMIXDIR/tmp/demo_on.rootdbs
ROOTSIZE 300000
Any attempt to create database manually via dbaccess
leads the same error:
dbaccess -> Database -> Create -> type test
Output:
931: Cannot locate port_alias service/tcp service in /etc/services.
来源:https://stackoverflow.com/questions/61164545/create-informix-database