openGauss 1.0.1 questions about the max_process_memory parameter - database

Deploy openGauss 1.0.1,
execute the command gs_install -X /opt/soft/cluster_config_enmo.xml, an error is reported when the database is started during the deployment process (gs_ctl started, datadir is -D “/opt/enmo/openGauss/101/data/dn”) Startup failed,
check the log and find the following error:
FATAL: The value of pre-reserved memory for MOT engine is not reasonable: Request for a maximum of 1677312 KB global memory, and 31
4368 KB session memory (total of 1991680 KB) is invalid since max_process_memory is 2097152 KB
View parameter ‘max_process_memory’:
[omm#enmo dn]$ grep max_process_memory postgresql.conf
max_process_memory = 2GB
Monitor this parameter when deploying, it seems that the default value is 12GB:
[root#enmo ~]# grep max_process_memory
/opt/enmo/openGauss/101/data/dn/postgresql.conf
#max_process_memory = 12GB
I would like to ask, what is the setting principle of this parameter, and is there any way to avoid such a startup error without manually adjusting this parameter, so that the installation process (gs_install) can be successfully completed.

Check the server memory before installing. If it is below 2G, it cannot be installed.
Increase the memory to 16G, modify the max_process_memory to 5G,
The installation command gs_install can be completed normally:
[root#enmo ~]# grep max_process_memory /opt/enmo/openGauss/101/data/dn/postgresql.conf
max_process_memory = 5GB

Related

Jenkins Xvfb plugin - selecting incorrect -fbdir name

When running a build on a newly installed Jenkins server on centos7 The Xvfb fails with the following:
Xvfb starting$ /bin/Xvfb -displayfd 2 -screen 0 1024x768x8 -fbdir
/var/lib/jenkins/xvfb-272-..fbdir6345857630426455925 FATAL: Cannot run
program "/bin/Xvfb": error=2, No such file or directory
java.io.IOException: error=2, No such file or directory
Compared to our original server, the name of the fmdir is different. I believe it should be in the format /var/lib/jenkins/xvfb-<build no.>-<unique number>.fmdir
How is the -fbdir name being generated and what creates the directory?
This is on Jenkins
2.176.1 with Xvfb plugin 1.1.3 on Centos 7.6.1810
Xvfb starting$ /usr/bin/Xvfb -displayfd 2 -screen 0
1920x1080x24 -fbdir /var/lib/jenkins/xvfb-
214-..fbdir17701667040157463918
How is the -fbdir name being generated?
It's unique & random and the format is
/var/lib/jenkins/xvfb-<build no.>-..fbdir<random unique no.>
what creates the directory?
When job is executed, Jenkins check the Directory in which to find Xvfb executable i.e./usr/bin and it creates it's copy for it's use ( at location where Jenkins is installed i.e./var/lib/jenkins/xvfb-214-..fbdir17701667040157463918) where the memory mapped files containing the framebuffer memory should be created to perform all GUI operations in virtual memory.
-fbdir framebuffer-directory
This option specifies the directory in which the memory mapped files containing the framebuffer memory should be created.This option only exists on machines that have the mmap and msync system calls.
Refer:https://docs.oracle.com/cd/E86824_01/html/E54763/xvfb-1.html

Running Solr with SystemD: user limitations (ulimit) applied at runtime different from the configured limitations

I'm trying to run solr as a SystemD service. When I start the service I get this warning then the solr server stops.
jun 22 16:20:07 solr_start[1488]: *** [WARN] *** Your Max Processes Limit is currently 14972.
jun 22 16:20:07 solr_start[1488]: It should be set to 65000 to avoid operational disruption.
jun 22 16:20:07 solr_start[1488]: If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
jun 22 16:20:09 solr_start[1488]: Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require
jun 22 16:20:09 solr_start[1488]: RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'.
jun 22 16:20:14 solr_start[1488]: [146B blob data]
jun 22 16:20:14 solr_start[1488]: Started Solr server on port 8983 (pid=1579). Happy searching!
jun 22 16:20:15 solr_stop[1680]: Sending stop command to Solr running on port 8983 ... waiting up to 180 seconds to allow Jetty process 1579 to stop gracefully.
I checked the code at https://github.com/apache/lucene-solr/blob/master/solr/bin/solr#L1509.
I can see that solr runs a check on ulimit -u and ulimit -n.
The strange thing is that I made sure SystemD would run the solr server with the "solr" user.
[Unit]
Description=Apache SOLR
After=syslog.target network.target remote-fs.target nss-lookup.target systemd-journald-dev-log.socket
Before=multi-user.target
[Service]
User=solr
#PIDFile=/mnt/solrdata/solr-8983.pid
Environment=SOLR_INCLUDE=/opt/solr/bin/solr.in.sh
ExecStart=/opt/solr/bin/solr_start
ExecStop=/opt/solr/bin/solr_stop
#Restart=on-failure
[Install]
WantedBy=multi-user.target​
And this "solr" user (that I configured especially to run Solr server) can create an unlimited number of processes and open an unlimited number of files.
[solr#xxx ~]# ulimit -n
unlimited
[root#xxx ~]# ulimit -u
unlimited
When SystemD starts solr I see it uses the correct user (the "solr" user I configured). Yet I see the error above.
When I run solr directly with the "solr" user (no with SystemD), it works.
Why are the user limitations applied at runtime when I run the Solr server myself different from the ones used when run by SystemD ???
According to this limit defined in /etc/security/limit.conf dosen't work with systemD.
To define new limit in a systemD unit file add those line in the service section:
LimitNOFILE=65000
LimitNPROC=65000
For a complete list see the man page

TeamCity - start tomcat

I'm trying to start tomcat with a teamcity deployment build step. The steps below all work with no issues when ran directly, but do not work in a teamcity step. The java window appears and closes, as though the build step kills all child processes when completed. I have tried all of the following:
batch (command line running a batch in sources, or right in teamcity script, and command line, and process build types):
call "%env.CATALINA_HOME%\bin\startup.bat"
start "%env.CATALINA_HOME%\bin\startup.bat"
cmd /k "%env.CATALINA_HOME%\bin\startup.bat"
start "DEV server" "%env.CATALINA_HOME%\bin\startup.bat"
powershell:
# wasnt sure if env var was being carried over, not relevant
$env:CATALINA_HOME = %env.CATALINA_HOME%
Start-Process "%env.CATALINA_HOME%\bin\startup.bat"
is there some way to tell TeamCity 10 build step 'hey, leave whatever was started running'?
CATALINA_HOME is an environment variable in the teamcity parameters (env.CATALINA_HOME) and is set to "C:\apache-tomcat" which is correct.
Some additional information: the TC server and agent is running as a user account, the user account has access to all folders (and is local admin) as well.
in tomcat bin\setenv.bat I had CATALINA_OPTS -XmX and -Xms parameters which were very large and required 64 bit java.
When doing this specific build parameter (which I recommend for debugging, it will block the TC build)
%env.CATALINA_HOME%\bin\catalina.bat
(argument: run)
I then got an exit code 1 build failure with a useful error message (but no tomcat logs):
[08:25:24]Error: Could not create the Java Virtual Machine.
[08:25:24]Error: A fatal exception has occurred. Program will exit.
[08:25:24]Invalid maximum heap size: -Xmx32768m
[08:25:24]The specified size exceeds the maximum representable size.
[08:25:24]Process exited with code 1
If you need large Xmx and Xms of a child process, the BUILD AGENT executing the build needs to be running from 64 bit as well! In my case, I had, eg
C:\Teamcity_BuildAgent_Deploy\jre
I copy pasted my 64 bit jre installation in there as well per TC docs and then it could start processes with large Xmx and Xms. I did not adjust TEAMCITY_AGENT_MEM_OPTS or any batches.

Moved Oracle 11.2 XE Database Directory, Connected to Idle Instance

So I will start off by stating I have moved the regular install location of Oracle 11.2 XE to a logical volume (/oracle) I had created on my RHEL 6.6 server. After shutting down both the database and the Oracle listener, I performed...
$ cp -R /u01/app/* /oracle
$ rm -rf /u01/app/oracl
$ ln -s /oracle/oracle /u01/app/oracle
Then restarted the listener and the database. Now when I attempt to run the following as the user 'oracle' I get a message...
$ sqlplus
Enter user-name: sys / as sysdba
Enter password: ****
Connected to idle instance.
Further, when I attempt a startup I get an error.
> startup
ORA-45301: XE Edition single instance violation error
I have attempted the solutions found here to no avail.
Here is the output for my listener controller:
bash-4.1$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 10-MAR-2015 10:26:25
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 10-MAR-2015 10:25:57
Uptime 0 days 0 hr. 0 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dev/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dev)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
I'm really quite lost as to what to attempt next. I know I could just reinstall and keep the directory in its proper location but I need it to be in it's own logical volume.
EDIT
Some further information to help clarify my system...
bash-4.1$ env | grep ORA
ORACLE_SID=XE
ORACLE_BASE=/oracle/oracle
ORACLE_HOME=/oracle/oracle/product/11.2.0/xe
bash-4.1$ env | grep TNS
TNS_ADMIN=/oracle/oracle/product/11.2.0/xe/network/admin
bash-4.1$ ps -aux | grep pmon
oracle 2431 0.0 0.2 1265956 16652 ? Ss 11:43 0:00 xe_pmon_XE
FURTHER EDIT
Attempting to sign in to sqlplus using the SYSTEM user returned an error:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
FURTHER EDIT
Output of the ipcs command
bash-4.1$ ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0xc0a59444 32768 oracle 660 4096 0
------ Semaphore Arrays --------
key semid owner perms nsems
0xd4a9963c 229378 oracle 660 104
0x884d8f34 491523 oracle 660 104
------ Message Queues --------
key msqid owner perms used-bytes messages
Check output of ipcs command and try to delete all shared memory segments/semaphores owned by Oracle.
When Oracle starts it uses two strings ORACLE_SID(uppercase) and ORACLE_HOME, hashes these two strings and uses this hash value a key for shmget call. So even if you append slash / to ORACLE_HOME everything is different from Oracle's perspective - even if the disk path is the same.
So I think you moved ORACLE_HOME into some other location, but the old value was preserved somewhere and now Oracle thinks that you are trying to start multiple instances.
EDITED: I'm not sure about XE, but regular Oracle editions are shipped as a bunch of .o object files. These files are linked during installation, but you can also re-link Oracle anytime. Check the script $ORACLE_HOME/bin/relink if the old ORACLE_HOME is hardcoded in it. And then try to re-link all libraries by executing relink all. Also note that Oracle uses link option -Wl,-rpath=..., so some Oracle binaries have library search patch compiled in them.
For Standard/Enterprise edition it is not problem to copy binaries into different Oracle home.
Check in /u01/app/oracle/product/11.2.0/xe/dbs/ if you have renamed your XE database or attempted to create a new one, you must be sure there is only one database known by xe. It's limited to one instance.
/etc/init.d/oracle-xe stop
cd /u01/app/oracle/product/11.2.0/xe/dbs/
rename any unused pwfile and spfile to .old
/etc/init.d/oracle-xe start
Issue was a wrong entry in tsnnames.ora (I had added a line that shouldn't of been there) and as well the permissions for my /oracle directory were incorrect. Thank you to everyone who tried to help, it was greatly appreciated.

Can't create test file /var/lib/mysql/Daniil-Myasnikovs-MacBook-Pro.lower-test

My environment:
Mac Snow Leopard 10.6.8
MySQL Ver 14.14 Distrib 5.5.8, for osx10.6 (i386) using readline 5.1
I was using this version until I tried to install MAMP on top of that. After that I have stoped MySQL server, and now I can't start it again. In terminal it writes me back:
110825 17:09:04 [Warning] Can't create test file /var/lib/mysql/Daniil-Myasnikovs-MacBook-Pro.lower-test
110825 17:09:04 [Warning] Can't create test file /var/lib/mysql/Daniil-Myasnikovs-MacBook-Pro.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2)
110825 17:09:04 [ERROR] Aborting
110825 17:09:04 [Note] mysqld: Shutdown complete
If you can give me a hand with this, that would be more than helpful, thank you very much.
Have you checked that the directory /var/lib/mysql does actually exist and corresponds to your data directory?
If it does not, then you probably must specify otherwise the datadir parameter under the mysqld section
[mysqld]
datadir=/var/lib/mysql

Resources