HANA index server won't start - hana

I've installed HANA Express edition from binary in a VM (4 cores and 8GB of RAM) when I run HDB info it give me
USER PID PPID %CPU VSZ RSS COMMAND
hxeadm 12253 12252 0.0 115512 2024 -bash
hxeadm 12305 12253 0.0 113256 1616 \_ /bin/sh /usr/sap/HXE/HDB01/HDB info
hxeadm 12340 12305 0.0 151060 1804 \_ ps fx -U hxeadm -o user,pid,ppid,pcpu,vsz,rss,args
hxeadm 4641 1 0.0 23044 1708 sapstart pf=/usr/sap/HXE/SYS/profile/HXE_HDB01_amds-bd
hxeadm 4788 4641 0.0 232064 36552 \_ /usr/sap/HXE/HDB01/amds-bd/trace/hdb.sapHXE_HDB01 -d -nw -f /usr/sap/HXE/HDB01/amds-bd/daemon.ini pf=/usr/sap/HXE/SYS/profile/H
hxeadm 5239 4788 6.2 3184688 2271760 \_ hdbnameserver
hxeadm 10672 4788 1.1 1121576 416644 \_ hdbcompileserver
hxeadm 10681 4788 0.2 1028188 297320 \_ hdbpreprocessor
hxeadm 10826 4788 0.3 1336672 519228 \_ hdbwebdispatcher
hxeadm 3562 1 0.0 432156 26000 /usr/sap/HXE/HDB01/exe/sapstartsrv pf=/usr/sap/HXE/SYS/profile/HXE_HDB01_amds-bd -D -u hxeadm
as you can see, the hdbindexserver is not started, and to be more sure I've checked the port number 30015, ant it's not used at all.
I've tried with the Virtual machine provisioned by HANA installer, but I've got the same results.
My question is how to start the index server?
Thank you in advance.

Yes, that's ok. HXE is installed as MDC system by default (with tenants disabled if I remember it right). In the system DB the nameserver takes over the task of the index server.
Check those links:
https://archive.sap.com/discussions/thread/3961778
https://www.youtube.com/watch?v=DbaO_-Hlq98

It was a RAM problem,
I added some more RAM, now with 18GB of RAM everything is fine.

Since you have an OS level access, you can try to start it manually:
/usr/sap/HXE/HDB01/exe/hdbindexserver
and see why it fails in logs, which are located at
/usr/sap/HXE/HDB01/<name_of_your_server>/trace/indexserver_alert_sixtb.trc
You can check other files in the same folder as well.
It is also possible to start indexserver from HANA Studio. Right click on the instance (with SYSTEM user) --> Configuration and Monitoring --> Open Administration --> Landscape
The logs are available under --> Diagnosis Files in the Administration.

New comers to this issue... for the sake of consistency you can allocate a dedicated Memory in "Docker Desktop > Preferences > Resource > Memory" (usually Tenant creation consumes memory during the initial setup as it fires up the Indexserver taking up to 12GB of Ram). Cheers 😇

Related

Apache httpd 2.4.34 couldn't receive signal SIGTERM on SuSE 15

I have install apache httpd 2.4.34 on SLES 15, and there are six httpd processes running.
When I send signal SIGTERM to httpd process, all the six httpd process couldn't receive signal SIGTERM (I had gdb attched httpd process to catch signal SIGTERM),
but I find kill 15 11143 return 0 via command strace. But httpd could reiveive signal SIGKILL, it's very strange.
And apache httpd 2.4.34 running on other platform(SLES12, SLES11, RHEL7) could reiveive and handle signal SIGTERM normally.
Does anyone encounter this phenomenon?
+++
# cat /etc/os-release
NAME="SLES"
VERSION="15"
VERSION_ID="15"
PRETTY_NAME="SUSE Linux Enterprise Server 15"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15"
#uname -a
Linux linux-iv0h 4.12.14-23-default #1 SMP Tue May 29 21:04:44 UTC 2018 (cd0437b) x86_64 x86_64 x86_64 GNU/Linux
#ps aux|grep httpd
root 11143 0.0 0.6 23612 6380 ? Ss 04:33 0:00 ./httpd
nobody 11144 0.0 0.3 23612 3248 ? S 04:33 0:00 ./httpd
nobody 11145 0.0 0.3 23612 3248 ? S 04:33 0:00 ./httpd
nobody 11146 0.0 0.3 23612 3248 ? S 04:33 0:00 ./httpd
nobody 11147 0.0 0.3 23612 3248 ? S 04:33 0:00 ./httpd
nobody 11148 0.0 0.3 23612 3248 ? S 04:33 0:00 ./httpd
+++

what can cause a socket() "Permission denied" error?

Under Android 4, the following simple native C code line fails with an Permission denied error when not run as root:
online_socket = socket(AF_INET, SOCK_DGRAM, 0);
I do have root access to the device, but want to run the process as non-privileged user.
Note that the error happens even before binding the socket.
I guess there is some security setting that needs to be tweaked? Anyone can tell me where to look?
The O/S is really Android in this case, but I guess the problem is really Linux-related (since Android is based on a Linux Kernel).
For those wondering: This is a custom program that runs in a full (debootstrapped) Debian Jessie installation running in an Android 4 environment.
Update
I've learned that the Android Kernel has a special CONFIG_ANDROID_PARANOID_NETWORK extension that allows network access only to users in AID_INET and AID_NET_RAW groups.
However, even after adding the user to these groups, socket() is still rejected (and ping appears to have the same problem, BTW).
uid=5(imp) gid=51(imp) groups=51(imp),3003(aid_inet),3004(aid_net_raw),3005(aid_admin),3001(aid_bt),3002(aid_bt_net)
I can't tell if that CONFIG_ANDROID_PARANOID_NETWORK flag is set in this particular Kernel, as I don't have access to the config file.
Update 2
I found out that both root and also my unprivileged user imp can in fact successfully call socket() - at least with the groups setup described above.
However, calling the same process as root and then switching to imp using the seteuid() system call prevents socket() from succeeding. Any ideas?
As it turns out, Android uses a special Kernel patch that's activated with CONFIG_ANDROID_PARANOID_NETWORK. This patch allows network access to system users that belong to certain special groups with hardcoded IDs.
groupadd -g 3001 aid_bt
groupadd -g 3002 aid_bt_net
groupadd -g 3003 aid_inet
groupadd -g 3004 aid_net_raw
groupadd -g 3005 aid_admin
That's because Android normally adds users (i.e. apps) to these groups only when the specific app has networking permissions.
Adding a user to these groups gives it permission to use socket() as described in the question:
usermod -a -G aid_bt,aid_bt_net,aid_inet,aid_net_raw,aid_admin someuser
However, when a process uses seteuid() to switch from root to a unprivileged user (for example someuser), then it's not enough (or probably irrelevant) that this effective user has aid_* group membership. Instead, the root user must explicitly be a member of these groups:
usermod -a -G aid_bt,aid_bt_net,aid_inet,aid_net_raw,aid_admin root
This solved the problem for me.
Note that I've also tried to play with setegid() and similar as an alternative, but none of that helped...
Those who struggle with the apt-get on Android (with the CONFIG_ANDROID_PARANOID_NETWORK enabled which restricts network access to users who are member of specific groups) there are two workaround:
groupadd -g 3003 aid_inet && usermod -G nogroup -g aid_inet _apt
echo 'APT::Sandbox::User "root";' > /etc/apt/apt.conf.d/01-android-nosandbox
This is because apt-get is running http/https/gpgv methods under a sandboxed user, which is _apt by default:
root 1465 0.0 0.0 31408 4956 pts/0 S 11:48 0:00 | | \_ -bash
root 23814 0.1 0.1 65300 10124 pts/0 T 18:58 0:00 | | \_ apt-get update
_apt 23818 0.0 0.1 90208 8852 pts/0 T 18:58 0:00 | | | \_ /usr/lib/apt/methods/http
_apt 23819 0.0 0.1 90208 8828 pts/0 T 18:58 0:00 | | | \_ /usr/lib/apt/methods/https
...

Setting my crontab did not work. I must have set it in the wrong place. Where is the correct spot to set it?

The other day I edited my crontab file, but the old settings are still being run.
I am working with Apache. So I went to
/etc/crontab
and I saved it. But the old crontab is still running. Is this not the place to edit the crontab? Where did I go wrong?
Thanks!
This is my grep cron:
[root]# ps aux | grep cron
root 1396 0.0 0.4 3000 704 pts/0 S+ 21:12 0:00 grep cron
root 8114 0.0 0.5 4412 968 ? Ss 2011 0:02 crond
This is probably a question for some other board, but the answer is that you don't edit cron files directly, you use the tool "crontab" as an executable. run man crontab, or Google crontab.
EDITOR=emacs (or vim or whatever) to set you editor first.
crontab -e
to edit
crontab -l
to list current cron tasks

Getting total used memory of a running JVM under Linux

I'm looking for an efficient way to measure the memory used by a running jvm.
A single command line with the pid of my jvm returning a reliable value of the consummed size of the memory.
Thx
You can run
ps aux | grep java
This will show you the memory usage of each application containing java in their launch-string, which should be most if not all java apps.
The output from my server is the following:
servername:~ servername$ ps aux | grep java
servername 50122 0.3 1.7 2832968 89236 ?? S Thu08AM 117:55.94 /usr/bin/java -jar /srv/eurekaj/Proxy/eurekaJ.Proxy-1.0.RC1-jar-with-dependencies.jar
servername 72399 0.0 25.9 4978676 1355616 ?? S 29Jul11 1560:43.70 /usr/bin/java -Xmx2g -Xms1g -Djava.io.tmpdir=/tmp -Dbtrace.agent=HudsonAgent -javaagent:/srv/btrace/1.2/btrace-agent.jar=scriptdir=/srv/btrace/scripts,stdout=false,fileRollMilliseconds=7500 -jar hudson.war --httpPort=8093
servername 72392 0.0 8.3 3169604 437192 ?? S 29Jul11 120:41.42 /usr/bin/java -Xmx256m -Xms256m -Djava.io.tmpdir=/jettytmp -Dbtrace.agent=JSFlotDemoAgent -Dlog4j.configuration=file:/srv/jsflot/demo/log4j.xml -javaagent:/srv/btrace/1.2/btrace-agent.jar=scriptdir=/srv/btrace/scripts,stdout=false,fileRollMilliseconds=7500 -classpath :very_verbose_classpath org.jsflot.server.JettyServer
servername 97501 0.0 0.0 2425712 276 s000 R+ 4:58AM 0:00.00 grep java
What you can read from this is PID, CPU Usage (%) and Memory Usage (%) for each of the processes.
You can also use the
top
command to get similar results.

SSH Remote Command Hangs

Does anyone know why this command,
ssh -v user#address "exec ssh-agent bash"
...would hang on this output?
debug1: Sending command: exec ssh-agent bash
I'm trying to automatically setup a set of remote machines so they can SSH into each other without passwords. Have already scp'd over the relevant private key file. Need to run ssh-add on each instance. But first, I need to start the ssh-agent. But the command above hangs. Starting the agent manually on each instance is not really an option.
Running "ps ux" on the remote machine manually confirms that the ssh-agent is running:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ubuntu 746 0.0 0.2 8844 1380 ? S 02:45 0:00 sshd: ubuntu#notty
ubuntu 747 0.0 0.1 4532 1096 ? Ss 02:45 0:00 bash
ubuntu 748 0.0 0.0 3360 204 ? Ss 02:45 0:00 ssh-agent bash
ubuntu 779 0.0 0.2 8844 1376 ? S 02:51 0:00 sshd: ubuntu#pts/0
ubuntu 781 5.3 0.8 8260 5244 pts/0 Ss 02:51 0:00 -bash
ubuntu 813 0.0 0.1 4284 1076 pts/0 R+ 02:52 0:00 ps ux
Any help is appreciated.
What you see is the expected behavior. SSH is waiting for bash to finish execution. If you omit the "bash" as the argument to ssh-agent, then ssh-agent goes in the background like you expect it to.
So, perhaps you meant to run:
ssh -v user#address "ssh-agent"
looking at pstree output shows more clearly what is happening.
|-+= 09556 root /usr/libexec/launchproxy /usr/sbin/sshd -i
| \-+= 09557 root /usr/sbin/sshd -i
| \-+- 09560 root /usr/sbin/sshd -i
| \-+= 09561 root bash
| \--= 09562 root ssh-agent bash