Last active
June 21, 2024 06:10
-
-
Save myst3k/e13da063f9dd324b593e07ee818e9648 to your computer and use it in GitHub Desktop.
enable on boot nodemanager and adminserver weblogic 12c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#enable each service for boot | |
systemctl enable nodemanager | |
systemctl enable adminserver | |
#then reboot and test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#start nodemanager service | |
#start AdminServer manually | |
#connect to wlst | |
nmConnect(domainName='<domain>') | |
connect('<username>','<password>','t3://localhost:7001') | |
nmEnroll('<domain_home>','<domain_home>/nodemanager') | |
storeUserConfig() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## put in <domain_home>/nodemanager/startAdminServer.py | |
nmConnect(domainName='<domain_name>') | |
nmStart('AdminServer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## put in <domain_home>/nodemanager/stopAdminServer.py | |
nmConnect(domainName='<domain_name>') | |
connect() | |
shutdown(force='true') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## create new file /etc/systemd/system/adminserver.service for adminserver, then systemctl daemon-reload | |
[Unit] | |
Description=Controls Admin Server Lifecycle | |
After=network.target sshd.service nodemanager.service | |
Requires=nodemanager.service | |
[Service] | |
User=<user> | |
Group=<group> | |
Type=oneshot | |
WorkingDirectory=<domain_home>/nodemanager | |
ExecStart=<orcl_home>/oracle_common/common/bin/wlst.sh startAdminServer.py | |
ExecStop=<orcl_home>/oracle_common/common/bin/wlst.sh stopAdminServer.py | |
RemainAfterExit=yes | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## create new file /etc/systemd/system/nodemanager.service for nodemanager, then systemctl daemon-reload | |
[Unit] | |
Description=Controls Node Manager Lifecycle | |
After=network.target sshd.service | |
[Service] | |
User=<user> | |
Group=<group> | |
Type=simple | |
ExecStart=<domain_home>/bin/startNodeManager.sh >/dev/null 2>/dev/null & | |
ExecStop=<domain_home>/bin/stopNodeManager.sh >/dev/null 2>/dev/null & | |
PIDFile=<domain_home>/nodamanager/nodemanager.process.id | |
Restart=on-failure | |
RestartSec=1 | |
[Install] | |
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://middlewaresnippets.blogspot.com/2015/04/weblogic-server-on-linux-7.html | |
echo "EDITING /etc/sysctl.conf" | |
cat<< EOF >> /etc/sysctl.conf | |
# increase TCP max buffer size (depending on the type of NIC and the round-trip time these values can be changed) | |
# Maximum TCP Receive Window | |
net.core.rmem_max = 8388608 | |
net.core.rmem_default = 8388608 | |
# Maximum TCP Send Window | |
net.core.wmem_max = 8388608 | |
net.core.wmem_default = 8388608 | |
# memory reserved for TCP receive buffers (vector of 3 integers: [min, default, max]) | |
net.ipv4.tcp_rmem = 4096 87380 8388608 | |
# memory reserved for TCP send buffers (vector of 3 integers: [min, default, max]) | |
net.ipv4.tcp_wmem = 4096 87380 8388608 | |
# increase the length of the processor input queue | |
net.core.netdev_max_backlog = 30000 | |
# maximum amount of memory buffers (could be set equal to net.core.rmem_max and net.core.wmem_max) | |
net.core.optmem_max = 20480 | |
# socket of the listen backlog | |
net.core.somaxconn = 1024 | |
# tcp selective acknowledgements (disable them on high-speed networks) | |
net.ipv4.tcp_sack = 1 | |
net.ipv4.tcp_dsack = 1 | |
# Timestamps add 12 bytes to the TCP header | |
net.ipv4.tcp_timestamps = 1 | |
# Support for large TCP Windows - Needs to be set to 1 if the Max TCP Window is over 65535 | |
net.ipv4.tcp_window_scaling = 1 | |
# The interval between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe | |
net.ipv4.tcp_keepalive_time = 1800 | |
# The interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime | |
net.ipv4.tcp_keepalive_intvl = 30 | |
# The number of unacknowledged probes to send before considering the connection dead and notifying the application layer | |
net.ipv4.tcp_keepalive_probes = 5 | |
# The time that must elapse before TCP/IP can release a closed connection and reuse its resources. | |
net.ipv4.tcp_fin_timeout = 30 | |
# Size of the backlog connections queue. | |
net.ipv4.tcp_max_syn_backlog = 4096 | |
# The tcp_tw_reuse setting is particularly useful in environments where numerous short connections are open and left in TIME_WAIT state, such as web servers. | |
net.ipv4.tcp_tw_reuse = 1 | |
net.ipv4.tcp_tw_recycle = 1 | |
# The percentage of how aggressively memory pages are swapped to disk | |
vm.swappiness = 0 | |
# The percentage of main memory the pdflush daemon should write data out to the disk. | |
vm.dirty_background_ratio = 25 | |
# The percentage of main memory the actual disk writes will take place. | |
vm.dirty_ratio = 20 | |
# set the number of huge pages based on the Hugepagesize, i.e., 2048kB | |
#vm.nr_hugepages = ${NUMBER_OF_HUGE_PAGES} | |
# give permission to the group that runs the process to access the shared memory segment | |
# to this end open the /etc/group file and retrieve the group-id | |
#vm.hugetlb_shm_group = ${GROUP_ID} | |
EOF |
ExecStart and ExecStop need to use /bash/sh before running the StartScript, so it should look like :
ExecStart=/bash/sh <domain_home>/bin/startNodeManager.sh
Else you will get an error like "(code=exited, status=203/EXEC)" as the system doesn't know how to execute that command.
Also the >/dev/null 2>/dev/null & are not need.
I'm having difficult to configure Node Manager and AdminServer work on 10.0.1.141. I found nmConnect(domainName='<domain_name>') using default node manager listen 127.0.0.1:5556 to locate node manager service.
Did you change <domain_name> for the actual domain path?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Probably for others that encounter the same). You'll need to edit nodemanager.properties, in <DOMAIN_HOME>/nodemanager/nodemanager.properties
Within that, you will need to edit the ListenAddress directive. If you do so, ensure access is firewalled.