最近报名了 2024年十月GBase 8s认证培训班

记录下安装 GBase 8s 遇到的问题。

首先第一次安装很顺利,是在一台2G的内存上安装的,第二次是在一个 8G的内存上安装的,不过上面跑了一个 ORACLE,然后就一直卡着,后来查询日志发现是内存不足,以下是记录,由于在进行初始化数据库的时候他会晴空屏幕,之前的记录都没保留,为了这次记录就重新安装,先从卸载开始吧。

卸载

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[root@liups:/u01/gbase/uninstall/uninstall_ids]# cd
[root@liups:/root]# sh /u01/gbase/uninstall/uninstall_ids/uninstallids
===============================================================================
GBase Software Bundle (created with InstallAnywhere)
-------------------------------------------------------------------------------

Preparing CONSOLE Mode Uninstallation...
===============================================================================
Uninstall GBase Software Bundle
-------------------------------

About to uninstall GBase Software Bundle.

In this uninstall process, all GBase Software Bundle products in /u01/gbase
will be uninstalled.
It is recommended that you first shutdown all database server instances related
to this installation prior to uninstalling the product.

PRESS <ENTER> TO CONTINUE:
===============================================================================
Server Uninstall Options
------------------------

Server action:

Important: Choosing to remove all databases will remove all database chunks,
environment files, registry entries, and message log files for all database
server instances associated with this installation.

->1- Retains all databases, but removes all server binaries
2- Removes server binaries and all databases associated with them

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:: 2<<---##--这里选择的2.




===============================================================================
Uninstalling...
---------------


...*
*
*************************
*************************
*************************
************************
...*
*
*************************
*************************
*************************
************************
...*
*
*************************
*************************
*************************
************************
...*
*
*************************
*************************
*************************
************************
...*
*
*************************
*************************
*************************
************************
...*
*
*************************
*************************
*************************
*************************



===============================================================================
Uninstall Complete
------------------

Uninstall is complete for GBase Software Bundle.

Product uninstall status:
GBase: Successful


[root@liups:/root]#
[root@liups:/root]# cd /u01/gbase/
[root@liups:/u01/gbase]# ll
total 144
drwxr-xr-x 3 gbasedbt gbasedbt 4096 Oct 17 16:49 bin
drwxrwxr-x 3 gbasedbt gbasedbt 4096 Oct 17 16:49 etc
-rwxr-xr-x 1 root root 25992 Oct 16 16:36 GBase_GLS_Install_10_16_2024_16_36_08.log
drwxr-xr-x 3 gbasedbt gbasedbt 4096 Oct 17 16:49 gls
-rwxrw-r-- 1 root root 103573 Oct 16 16:36 RUNasroot.installserver
[root@liups:/u01/gbase]#
[root@liups:/u01/gbase]# pwd
/u01/gbase
[root@liups:/u01/gbase]# rm -rf /u01/gbase/*
[root@liups:/u01/gbase]#

首先根据课程的视频,卸载他是在 $GBASEDBTDIR/uninstall/uninstall_ids] 目录执行的 ./uninstallids,说由于卸载程序在GBase 8s的安装目录中,所以$GBASEDBTDIR 无法删除,需要手动删除,其实通过上面可以看到卸载完成之后,在$GBASEDBTDIR 目录,已经将卸载的目录都删除了,但是保留了其他目录和文件,应该不是由于卸载程序在GBase 8s的安装目录中导致的。

然后我重启了主机,内存占用如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@liups:/root]# free -h
total used free shared buff/cache available
Mem: 7.6G 856M 773M 3.0G 6.0G 3.5G
Swap: 0B 0B 0B
[root@liups:/root]# uptime
16:52:56 up 1 min, 1 user, load average: 0.33, 0.16, 0.06
[root@liups:/root]# free -h
total used free shared buff/cache available
Mem: 7.6G 854M 774M 3.0G 6.0G 3.6G
Swap: 0B 0B 0B
[root@liups:/root]# uptime
16:53:06 up 1 min, 1 user, load average: 0.28, 0.15, 0.06
[root@liups:/root]#
1
2
3
[root@liups:/opt]# userdel -r gbasedbt
[root@liups:/opt]# useradd gbasedbt
[root@liups:/opt]# passwd gbasedbt
1
2
3
4
[root@liups:/opt]# cat /etc/passwd | grep gbasedbt
gbasedbt:x:10013:54339::/home/gbasedbt:/bin/bash
[root@liups:/opt]# cat /etc/group | grep gbasedbt
gbasedbt:x:54339:
1
2
3
4
5
6
7
8
[root@liups:/opt/gbase/soft]# tar xf  /root/gbase/soft/GBase8s_ExpressEdition.tar
[root@liups:/opt/gbase/soft]# ll
total 309256
drwxr-xr-x 2 lighthouse lighthouse 4096 Mar 23 2021 doc
-rwxr-xr-x 1 lighthouse lighthouse 316579352 Mar 23 2021 ids_install
-rw-r--r-- 1 lighthouse lighthouse 1864 Mar 23 2021 ids.properties
-rwxr-xr-x 1 lighthouse lighthouse 82738 Mar 23 2021 onsecurity
[root@liups:/opt/gbase/soft]#

安装

开始输入 5个回车1个Y,然后进入安装。

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
[root@liups:/opt/gbase/soft]# ./ids_install
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

===============================================================================
GBase Software Bundle (created with InstallAnywhere)
-------------------------------------------------------------------------------

Preparing CONSOLE Mode Installation...




===============================================================================
Getting Started
---------------

This application will guide you through the installation of GBase Software
Bundle.
Copyright General Data Corporation 2014, 2024. All rights reserved.

1. Release Notes
The Release Notes can be found in
/opt/gbase/soft/doc/ids_unix_relnotes_12.10.html.
2. Launch Information Center
Access the GBase Information Center at http://www.gbase.cn.
To Begin Installation, respond to each prompt to proceed to the next step in
the installation.
If you want to change something on a previous step, type 'back'.
You may cancel this installation at any time by typing 'quit'.


PRESS <ENTER> TO CONTINUE:



===============================================================================
License Agreement
-----------------

Installation and Use of GBase Software Bundle Requires Acceptance of the
Following License Agreement:

Thank you for choosing GBase product!



Please read carefully the following licencing agreement before installing any
product: TIANJIN GENERAL DATA TECHNOLOGY CO. LTD. LICENSE AGREEMENT



READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS
(COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE.
BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS
AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR
ACCEPTANCE OF THESE TERMS. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY
RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND.

1. LICENSE TO USE. GeneralData grants you a non-exclusive and non-transferable
license for the internal use only of the accompanying software and
documentation and any error corrections provided by GeneralData(collectively
"Software"), by the number of users and the class of computer hardware for
which the corresponding fee has been paid.

2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software

PRESS <ENTER> TO CONTINUE:

and all associated intellectual property rights is retained by GeneralData
and/or its licensors. Except as specifically authorized in any Supplemental
License Terms, you may not make copies of Software, other than a single copy
of Software for archival purposes. Unless enforcement is prohibited by
applicable law, you may not modify, decompile, or reverse engineer Software.
You acknowledge that Software is not designed, licensed or intended for use in
the design, construction, operation or maintenance of any nuclear facility.
GeneralData disclaims any express or implied warranty of fitness for such
uses. No right, title or interest in or to any trademark, service mark, logo or
trade name of GeneralData or its licensors is granted under this Agreement.

3. DISCLAIMER OF WARRANTY. Unless specified in this agreement, all express of
implied conditions, representations and warranties, including any implied
warranty of merchantability, fitness for aparticular purpose or
non-infringement are disclaimed, except to theextent that these disclaimers
are held to be legally invalid.

4. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event
will GeneralData or its licensors be liable for any lost revenue, profit or
data, or for special, indirect, consequential, incidental orpunitive damages,
however caused regardless of the theory of liability, arising out of or
related to the use of or inability to use software, even if GeneralData has

PRESS <ENTER> TO CONTINUE:

been advised of the possibility of such damages. In no event will
GeneralData's libility to you, whether incontract, tort(including negligence),
or otherwise, exceed the amount paid by you for Software under this Agreement.
The foregoing limitations will apply even if the above stated warranty fails
of itsessential purpose.

5. TERMINATION. This Agreement is effective until terminated. You may terminate
this Agreement at any time by destroying all copies of Software. This
Agreement will terminate immediately without noticefrom GeneralData if you
fail to comply with any provision of this Agreement. Upon Termination, you
must destroy all copies of Software.



6. EXPORT REGULATIONS. All Software and technical data delivered under this
Agreement are subject to US export control laws and may be subject to export
or import regulations in other countries. You agree to comply strictly with
all such laws and regulations and acknowledge that you have the responsibility
to obtain such licenses to export, re-export, or import as may be required
after delivery to you.

7. CHINESE GOVERNMENT RESTRICTED. If Software is being acquired by or on behalf

PRESS <ENTER> TO CONTINUE:

of the Chinese Government, then the Government's rights in Software and
accompanying documentation will be only as set forth in this Agreement.

8. GOVERNING LAW. Any action related to this Agreement will be governed by
Chinese law: "COPYRIGHT LAW OF THE PEOPLE'S REPUBLIC OF CHINA", "PATENT LAW OF
THE PEOPLE'S REPUBLIC OF CHINA", "TRADEMARK LAW OF THE PEOPLE'S REPUBLIC OF
CHINA", "COMPUTER SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE'S REPUBLIC OF
CHINA". No choice of law rules of any jurisdiction will apply."

9. SEVERABILITY. If any provision of this Agreement is held to be
unenforceable, this Agreement will remain in effect with the provision
omitted, unless omission would frustrate the intent of the parties, in which
case this Agreement will immediately terminate.

10. INTEGRATION. This Agreement is the entire agreement between you and
GeneralData relating to its subject matter. It supersedes all prior or
contemporaneous oral or written communications, proposals, representations and
warranties and prevails over any conflicting or additional terms of any quote,
order, acknowledgment, or other communication between the parties relating to
its subject matter during the term of this Agreement. No modification of this
Agreement will be binding, unless in writing and signed by an authorize
depresentative of each party. When the translation document has the different

PRESS <ENTER> TO CONTINUE:

meaning or has the conflicting views with Chinese original text conflict,
should take the laws and regulations promulgation unit as well as the
GeneralData issue Chinese original text as the standard.



All trademarks and registered trademarks mentioned herein are the property of
their respective owners.



DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): y



===============================================================================
Installation Location
---------------------

Choose location for software installation.

Default Install Folder: /opt/GBASE/gbase

ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
: /u01/gbase

INSTALL FOLDER IS: /u01/gbase
IS THIS CORRECT? (Y/N): y



===============================================================================
Installation or Distribution
----------------------------

Select the installation type.

Typical: Install the database server with all features and a database server
that
is configured with default values. Includes:
** Client Software Development Kit (CSDK)
** Java Database Connectivity (JDBC)
Minimum disk space required: 700-800MB

Custom: Install the database server with specific features and software that
you need.
Optionally install a configured database server instance.
Minimum disk space required: 75 MB (without a server instance)

->1- Typical installation
2- Custom installation
3- Extract the product files (-DLEGACY option)
4- Create a RPM package for redistribution

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:: 1




===============================================================================
Server Instance Creation
------------------------

Create a server instance?

->1- Yes - create an instance
2- No - do not create an instance

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:: 2




===============================================================================
Installation Summary
--------------------

Please review the following before continuing:

Product Name:
GBase Software Bundle

Install Folder:
/u01/gbase

Product Features:
GBase database server,
Base Server,
Extensions and tools,
J/Foundation,
Database extensions,
Conversion and reversion support,
XML publishing,
Demonstration database scripts,
Enterprise Replication,
Data loading utilities,
onunload and onload utilities,
dbload utility,
Backup and Restore,
archecker utility,
ON-Bar utility,
Interface to Tivoli Storage Manager,
Administrative utilities,
Performance monitoring utilities,
Miscellaneous monitoring utilities,
Auditing utilities,
Database import and export utilities,
JSON Client Support,
Global Language Support (GLS),
Chinese

Disk Space Information (for Installation Target):
Required: 496,603,539 Bytes
Available: 7,463,030,784 Bytes

PRESS <ENTER> TO CONTINUE:



===============================================================================
Ready To Install
----------------

InstallAnywhere is now ready to install GBase Software Bundle onto your system
at the following location:

/u01/gbase

PRESS <ENTER> TO INSTALL:



===============================================================================
Installing...
-------------

[==================|==================|==================|==================]
[------------------|------------------|------------------|------------------]



===============================================================================
Installation Complete
---------------------

Congratulations! GBase Software Bundle installation is complete.

Product install status:
GBase: Successful
GBase Connect: Successful

Main Version: GBase 8s Express Edition


For more information about using GBase products, see the GBase Information
Center at http://www.gbase.cn.

PRESS <ENTER> TO EXIT THE INSTALLER:

安装数据库非常顺利,安装完成之后检查下当前内存情况,然后进行数据库实例的创建。

1
2
3
4
5
6
7
[root@liups:/opt/gbase/soft]# free -h
total used free shared buff/cache available
Mem: 7.6G 906M 1.1G 3.0G 5.7G 3.5G
Swap: 0B 0B 0B
[root@liups:/opt/gbase/soft]# uptime
16:58:41 up 7 min, 2 users, load average: 0.25, 0.20, 0.09
[root@liups:/opt/gbase/soft]#

创建数据库实例

切换到 gbasedbt 用户,执行 GBaseInit_gbasedbt.sh脚本,注意,他会清屏,之前装库的记录会清理掉。

1
2
3
4
5
6
su - gbasedbt
sh /u01/gbase/etc/GBaseInit_gbasedbt.sh
Initializing Program...OK
ENTER THE INSTANCE INFORMATION or PRESS <ENTER> TO ACCEPT THE DEFAULT.

ENTER GBASE INSTANCE NAME (GBASEDBTSERVER) [Default:gbaseserver]:
1
2
3
4
5
6
7
ENTER GBASE INSTANCE NAME (GBASEDBTSERVER) [Default:gbaseserver]: fgbasedb

GBASE INSTALL FOLDER LIST:
1) /opt/GBASE/gbase
2) /opt/gbase/u01
3) /u01/gbase
CHOOSE GBASE INSTALL FOLDER(GBASEDBTDIR) [Default:/opt/GBASE/gbase]: 3

注意:他这里会显示出之前的安装记录,虽然我已经卸载并且重启了服务器,不确定他是读取的哪里的记录。

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Initializing Program...OK
ENTER THE INSTANCE INFORMATION or PRESS <ENTER> TO ACCEPT THE DEFAULT.

ENTER GBASE INSTANCE NAME (GBASEDBTSERVER) [Default:gbaseserver]: fgbasedb

GBASE INSTALL FOLDER LIST:
1) /opt/GBASE/gbase
2) /opt/gbase/u01
3) /u01/gbase
CHOOSE GBASE INSTALL FOLDER(GBASEDBTDIR) [Default:/opt/GBASE/gbase]: 3

CHOOSE SERVICE IP ADDRESS FROM THE LIST:
1) 172.17.0.1
2) 10.0.12.11
3) 127.0.0.1
4) 100.66.6.190
5) 192.168.122.1
ENTER THE NUMBER FOR YOUR CHOICE [Default:172.17.0.1]: 2

SPECIFY THE PORT NUMBER FOR GBASE [Default:9088]:

INITIALIZE TYPE:
1) TYPICAL -- Initialize the instance with all features configured with default values.
2) CUSTOM -- Initialize the instance with specific features that you need.
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 2

GBASE CHARACTER SET LIST:
1) en_US.8859-1
2) zh_CN.GB18030-2000
3) zh_CN.utf8
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 3

ENTER THE DATA SPACE PATH [Default:/u01/gbase/fgbasedb_dbs]:

ENTER THE LOGICAL LOG DBSPACE SIZE(MB) [Default:680]: 100

ENTER THE PHYSICAL LOG DBSPACE SIZE(MB) [Default:680]: 100

ENTER THE SMART LOB DBSPACE SIZE(MB) [Default:166]: 60

ENTER THE TEMPORARY DBSPACE SIZE(MB) [Default:166]: 60

ENTER "Y" TO START DATABASE ADVANCED SETTINGS, OR ENTER "N" TO ACCEPT DEFAULT VALUES: [Default:N]:

INSTANCE SUMMARY:
Instance name: fgbasedb
GBase install directory: /u01/gbase
IP address & port: 10.0.12.11:9088
Character set: zh_CN.utf8
Logical log space size: 100 MB
Physical log space size: 100 MB
Smart LOB space size: 60 MB
Temp DBSpace size: 60 MB
Data path: /u01/gbase/fgbasedb_dbs
Data path free size: 6779 MB

Enter "Y" to Start database initializing, or Enter "N" to Edit Again:
Enter "Y" to Start database initializing, or Enter "N" to Edit Again: y

Touching Chunks...OK
Create sqlhosts File: /u01/gbase/etc/sqlhosts.fgbasedb ...OK
Setting Parameters in /u01/gbase/etc/onconfig.fgbasedb :
ROOTPATH.ROOTSIZE.DBSERVERNAME.FULL_DISK_INIT.SBSPACENAME.SYSSBSPACENAME.DBSPACETEMP.LOGFILES.MULTIPROCESSOR.VPCLASS.NETTYPE.CLEANERS.DEF_TABLE_LOCKMODE.DIRECT_IO.LOCKS.TAPEDEV.LTAPEDEV.CKPTINTVL.DS_MAX_QUERIES.DS_TOTAL_MEMORY.DS_NONPDQ_QUERY_MEM.PHYSBUFF.LOGBUFF.AUTO_TUNE.MSGPATH.SERVERNUM.ALLOW_NEWLINE.TEMPTAB_NOLOG.DUMPSHMEM.USEOSTIME.STACKSIZE.ON_RECVRY_THREADS.OFF_RECVRY_THREADS.USELASTCOMMITTED.SHMVIRTSIZE.SHMADD.GBASEDBTCONTIME.BUFFERPOOL2K.BUFFERPOOL16K...AUTO_CKPTS.OK
Initializing Root DBSpace & Share Memory...OK
Creating system database.......

这里通常很快,如果超过5分钟,可能会有问题,可以查看日志: InitGBaseDB_202410171701.log,注意这个日志是在当前目录。

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
41
42
Thu Oct 17 17:01:47 CST 2024
Main while start!!!
-rwsr-sr-- 1 root gbasedbt 29409206 Oct 17 16:57 /u01/gbase/bin/oninit
DBSMAX=2259
dirtimes1=68
dirtimes2=68
Instance name: fgbasedb
GBase install directory: /u01/gbase
IP address & port: 10.0.12.11 9088
Character set: zh_CN.utf8
Logical log space size: 100 MB
Physical log space size: 100 MB
Temp DBSpace size: 60 MB
Smart LOB space size: 60 MB
Temp DBSpace size: 60 MB
The number of data DBSpace: 1
Data path: /u01/gbase/fgbasedb_dbs
Data path free size: 6779 MB

Environment GL_USEGLU: 0
The number of temp DBSpace: 1
Start time: Thu Oct 17 17:04:45 CST 2024
Your evaluation license will expire on 2025-10-17 00:00:00
Reading configuration file '/u01/gbase/etc/onconfig.fgbasedb'...succeeded
Creating /GBASEDBTTMP/.infxdirs...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 131486 kbytes...succeeded
Creating infos file "/u01/gbase/etc/.infos.fgbasedb"...succeeded
Linking conf file "/u01/gbase/etc/.conf.fgbasedb"...succeeded
Initializing rhead structure...rhlock_t 131072 (4096K)... rlock_t (119531K)... oninit: Fatal error in shared memory creation

WARNING: server initialization failed or timed out.
Check the message log, online.log, for errors.
ls: cannot access /u01/gbase/etc/sysadmin/stop: No such file or directory
Your evaluation license will expire on 2025-10-17 00:00:00

908: Attempt to connect to database server (fgbasedb) failed.
Number of System databases =
Your evaluation license will expire on 2025-10-17 00:00:00

908: Attempt to connect to database server (fgbasedb) failed.
Number of System databases =

可以看到报错了,报 Initializing rhead structure...rhlock_t 131072 (4096K)... rlock_t (119531K)... oninit: Fatal error in shared memory creation ,同时检查 online log,目录在 /u01/gbase/etc

1
2
3
4
5
6
7
8
9
10
11
12
13
cat  online_fgbasedb.log
17:04:45 GBase Database Server Started.
17:04:45 Requested shared memory segment size rounded from 131484KB to 133472KB

Thu Oct 17 17:04:46 2024

17:04:46 Requested shared memory segment size rounded from 463309KB to 463312KB
17:04:46 Successfully added a bufferpool of page size 2K.

17:04:46 Requested shared memory segment size rounded from 3241746KB to 3241748KB
17:04:46 shmget: [ENOMEM][12]: key 52874804: The server ran out of memory during an attempt to allocate a new shared memory segment.
17:04:46 Performance Advisory: Unable to allocate memory for bufferpool 16K
17:04:46 Action: Please notify GBASE Techical Support.

查看目前内存情况

1
2
3
4
5
[gbasedbt@liups ~]$ free -h
total used free shared buff/cache available
Mem: 7.6G 877M 801M 3.0G 6.0G 3.5G
Swap: 0B 0B 0B
[gbasedbt@liups ~]$

虽然 free 很少,是 801M,但是可用(available)内存是 3.5G。他要分配 3241746KB to 3241748KB 竟然无法完成,不过这个 3241748KB 跟 3.5G很接近。

既然知道了是内存的问题,那如何解决呢,我这里是粗暴的把 oracle 给关闭了,很顺利的安装成功。

但是,我第一次是在2G内存上安装成功的,然后找来日志查看具体如下:

1
2
3
4
5
6
7
8
9
10
21:30:35  GBase Database Server Started.
21:30:35 Requested shared memory segment size rounded from 36468KB to 37332KB

Thu Oct 15 17:30:36 2024

21:30:36 Requested shared memory segment size rounded from 78285KB to 78288KB
21:30:36 Successfully added a bufferpool of page size 2K.

21:30:36 Requested shared memory segment size rounded from 405443KB to 405444KB
21:30:36 Successfully added a bufferpool of page size 16K.

可以看到在2G内存的主机上,分配的内存是 405444KB,大概是 405M左右,也就是内存配置是根据主机的内存大小来进行自动配置的。

参数对比

检查2G主机的配置文件:

1
2
3
BUFFERPOOL default,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
BUFFERPOOL size=2k,buffers=35000,lrus=32,lru_min_dirty=50,lru_max_dirty=60
BUFFERPOOL size=16k,buffers=25000,lrus=64,lru_min_dirty=25,lru_max_dirty=30

检查8G内存的配置文件

1
2
3
BUFFERPOOL default,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
BUFFERPOOL size=2k,buffers=210000,lrus=32,lru_min_dirty=50,lru_max_dirty=60
BUFFERPOOL size=16k,buffers=200000,lrus=64,lru_min_dirty=25,lru_max_dirty=30

可以看到内存参数不一样。

我这里手工修改了参数文件,但是重新初始化的时候,会被覆盖。不确定如何在初始化的时候自定义内存参数。

总结

0、卸载的时候虽然选择的 2- Removes server binaries and all databases associated with them,GBASEDBTDIR下仍然有文件和目录,需要手动删除,可以看到安装目录下已经没有了卸载程序的目录,但是还有其他目录和文件存在,需要手动删除。

1、初始化(新建)数据库的日志是在运行 GBaseInit_gbasedbt.sh 命令的当前目录。

如果你在GBASEDBTDIR/etc/ 下运行 ./GBaseInit_gbasedbt.sh ,那么产生的日志就在 GBASEDBTDIR/etc/ 下,这样会导致在etc目录下产生一些日志文件,如果你在 /u01 下运行,而 gbasedbt 对/u01无写入权限会报:Error: Ensure user <gbasedbt> has write permission of current path !!!,所以建议在当前用户家目录下执行,而不是写到etc目录下。

2、安装报错可以结合 安装日志以及online log 来排查,online log 在: GBASEDBTDIR/etc

遗留问题:

0、如何在新建(初始化)数据库的时候自定义参数(内存)

2、GBASE INSTALL FOLDER LIST: 这个目录不确定从哪里获取的,我都卸载完成,并且重启了主机。他仍然能读取到。

原文作者: liups.com

原文链接: http://liups.com/posts/a3d1bd3b/

许可协议: 知识共享署名-非商业性使用 4.0 国际许可协议