Tiny Core Linux
General TC => General TC Talk => Topic started by: deodion on August 19, 2017, 08:11:03 PM
-
I have an enterprise application x64,
Tried to run it, but it returns something like this:
-sh splunk: file not found
I have read around, its says need to check with ldd and/or file command to find out missing libraries and it has something todo with 32/64 bit thing
I will try the command in few hours later,
Thank you
-
did you try just
splunk
or from the directory location of splunk
./splunk
-
Also, don't try to mix 64 bit applications in a 32bit environment, it will not work.
If you run the application as described in my last post it will almost always tell you which libraries are missing if any are missing..
Perhaps the application needs Bash?
Some x86_64 precompiled programs (from another linux system) may require this symlink so it can find required libraries
ln -s /lib /lib64
-
I think you said new to linux?? ok some info for you regarding paths to a program.
echo $PATH
I'm sure I could explain this better; but entering this command will reveal all the locations where you can place a program and execute it simply by entering it's file name at the terminal.
Whereas
./program
executes the program from the current directory
-
Tried ./splunk and splunk
Im aware about that,
Later I will try all other clues
-
Hello,
I use
ln -s /lib /lib64
Its working,
now I get: ps: invalid option -- 'p'
]ps: invalid option -- 'p'
BusyBox v1.25.1 (2017-03-14 16:33:32 UTC) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
Done
Waiting for web server at http://127.0.0.1:8000 to be availableps: invalid option -- 'p'
BusyBox v1.25.1 (2017-03-14 16:33:32 UTC) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
ps: invalid option -- 'p'
BusyBox v1.25.1 (2017-03-14 16:33:32 UTC) multi-call binary.
I can install and use BASH to solve this right?
-
RE: ps: invalid option -- 'p'
I believe you need the full procps.tcz .
-
After install procps.tcz
Its working but with flaw,
after start the program, it will start, but still showing ps: invalid option -- 'p'
and after that if execute another command, will show ps: invalid option -- 'p' again, and then the program will failed to run, leaving stale PID,
ps: invalid option -- 'p'
BusyBox v1.25.1 (2017-03-14 16:33:32 UTC) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
Done
If you get stuck, we're here to help.
Look for answers here: http://docs.splunk.com
The Splunk web interface is at http://box:8000
tc@box:/mnt/sda1/tce/APPS/splunk/bin$ ./splunk status
ps: invalid option -- 'p'
BusyBox v1.25.1 (2017-03-14 16:33:32 UTC) multi-call binary.
-
Procps.tcz is a dependency of open-vm-tools.tcz, so if you are using open-vm-tools.tcz you would already have procps.tcz. But the problem here is probably that whatever is executing ps has the path hard coded to /bin/ps, which is the busybox version you see. You should either not use a path, or give the full path to the propcs version as /usr/local/bin/ps.
-
I can install and use BASH to solve this right?
If you're referring to the last error in your screenshot, then no..
ls /lib/lib64 is not a valid path, try this instead
ls /lib64
If you're referring to the first error in your screenshot, then most likely yes..
-
Procps.tcz is a dependency of open-vm-tools.tcz, so if you are using open-vm-tools.tcz you would already have procps.tcz. But the problem here is probably that whatever is executing ps has the path hard coded to /bin/ps, which is the busybox version you see. You should either not use a path, or give the full path to the propcs version as /usr/local/bin/ps.
Hopefully the adjustment work is not hard and a lot,
I see it in web GUI, while its on its very-very fast, I like it,
If procps is onboot.lst does that mean still not using /usr/local/bin/ps?
So I still have to adjust the PATH?
-
I can install and use BASH to solve this right?
If you're referring to the first error in your screenshot, then most likely yes..
A correction, try:
/opt/splunk/bin $ ./splunk start
-
Hi deodion
Do not adjust the path. If the application is calling /bin/ps then the application needs to be fixed. Do not make changes
to the busybox links in /bin as there may be system scripts that rely on the busybox version.
-
/opt/splunk/bin $ ./splunk start
Splunk> Australian for grep.
Checking prerequisites...
Checking http port [8000]: open
Checking mgmt port [8089]: open
Checking appserver port [127.0.0.1:8065]: open
Checking kvstore port [8191]: open
Checking configuration... Done.
Checking critical directories... Done
Checking indexes...
Validated: _audit _internal _introspection _telemetry _thefishbucket history main summary
Done
Checking filesystem compatibility... Done
Checking conf files for problems...
Done
Checking default conf files for edits...
Validating installed files against hashes from '/opt/splunk/splunk-6.6.2-4b804538c686-linux-2.6-x86_64-manifest'
All installed files intact.
Done
All preliminary checks passed.
Starting splunk server daemon (splunkd)...
Done
Waiting for web server at http://127.0.0.1:8000 to be available....... Done
If you get stuck, we're here to help.
Look for answers here: http://docs.splunk.com
The Splunk web interface is at http://box:8000
/opt/splunk/bin $
I had to change permissions/ownership and as a quick test replaced the symlink to ps (which Rich specifically said don't do..) but for the test, splunk appears to work. So maybe splunk needs fixing?
permissions/ownership changes not required, my bad.. :(
# export SPLUNK_HOME=/opt/splunk
# export PATH=$SPLUNK_HOME/bin:$PATH
was all that was needed..
-
OK deodion
This ps path issue is an easy fix.
Simply edit /opt/splunk/bin/pid_check.sh to add /usr/local/bin: to this path variable
line 43: PATH=/usr/xpg4/bin:/usr/local/bin:/usr/bin:/bin
After loading procps.tcz splunk will look in /usr/local/bin for ps -p
-
permissions/ownership changes not required, my bad.. :(
# export SPLUNK_HOME=/opt/splunk
# export PATH=$SPLUNK_HOME/bin:$PATH
was all that was needed..
Firstly, from default installation, df -k shows I only get 323 MB for rootfs,
and I have the rest in /dev/sda1, so I was assuming this how things work, make the Core system lean and small,
and have others to put in /dev/sda1 instead,
tried to extract splunk to /opt, but it was out of space,
as a quick test replaced the symlink to ps (which Rich specifically said don't do..)
The export above seems doesnt contain about symlink change to ps, could you tell me how?
Any ps related should I work about?
Thank you very much,
-
OK deodion
This ps path issue is an easy fix.
Simply edit /opt/splunk/bin/pid_check.sh to add /usr/local/bin: to this path variable
line 43: PATH=/usr/xpg4/bin:/usr/local/bin:/usr/bin:/bin
After loading procps.tcz splunk will look in /usr/local/bin for ps -p
thank you very much! I will try this later,
-
/opt/splunk/bin $ ./splunk start
Splunk> Australian for grep.
Checking prerequisites...
Checking http port [8000]: open
Checking mgmt port [8089]: open
Checking appserver port [127.0.0.1:8065]: open
Checking kvstore port [8191]: open
Checking configuration... Done.
Checking critical directories... Done
Checking indexes...
Validated: _audit _internal _introspection _telemetry _thefishbucket history main summary
Done
Checking filesystem compatibility... Done
Checking conf files for problems...
Done
Checking default conf files for edits...
Validating installed files against hashes from '/opt/splunk/splunk-6.6.2-4b804538c686-linux-2.6-x86_64-manifest'
All installed files intact.
Done
All preliminary checks passed.
Starting splunk server daemon (splunkd)...
Done
Waiting for web server at http://127.0.0.1:8000 to be available....... Done
If you get stuck, we're here to help.
Look for answers here: http://docs.splunk.com
The Splunk web interface is at http://box:8000
/opt/splunk/bin $
/opt/splunk/bin $ splunk status
splunkd is running (PID: 7593).
splunk helpers are running (PIDs: 7594 7603 7713 7752).
/opt/splunk/bin $
Splunk web server and interface appears to be working fine now
Access Splunk>Enterprise @
http://box:8000 (http://box:8000)
-
So to recap..
These commands are all I executed to get Splunk operational
tar xvzf splunk-6.6.2-4b804538c686-Linux-x86_64.tgz -C /opt
[ -e /lib64 ] || ln -s /lib /lib64
export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH
sed -i 's|PATH=/usr/xpg4/bin:/usr/bin:/bin|PATH=/usr/xpg4/bin:/usr/local/bin:/usr/bin:/bin|' /opt/splunk/bin/pid_check.sh
tce-load -i procps
/opt/splunk/bin $ ./splunk start --accept-license
UPDATE: I missed a command, but added now :)
-
[ -e /lib64 ] || ln -s /lib /lib64
btw, what is the meaning of the first command?
I can't find any explanation in google,
-
It's an IF statement. The -e means it returns true if the given file/directory exists.
http://www.tldp.org/LDP/abs/html/fto.html
-
[ -e /lib64 ] || ln -s /lib /lib64
btw, what is the meaning of the first command?
I can't find any explanation in google,
Additionally, I read it like this:
If the test command "[" /lib64 existence does not return true then execute "ln" command to create the symbolic link
BTW, you can create a shell script with those commands and run at boot to start the splunk server. However, I'd test for the existence of /opt/splunk before executing tar..
[ -d /opt/splunk ] || tar xvzf /PathToArchive/splunk-6.6.2-4b804538c686-Linux-x86_64.tgz -C /opt
-
export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH
I try to input export command above in bootlocal.sh, but it doesnt work?
I mean, if I echo $SPLUNK_HOME, its blank,
-
Users do not inherit bootlocal.sh's environment.
Add it to /etc/profile or the users profile instead.
-
How should I put it in /etc/profile?
Can I simply insert the command?
-
Hi deodion
Add:
export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH
to the end of /etc/profile. Add the line:
etc/profile
to your /opt/filetool.lst file. Backup and reboot.
-
If I put it on bootlocal.sh like below,
### Load /etc/profile
cp /mnt/sda1/backupcfg/profile /etc/profile
I try it, but it seems doesnt work, why?
Im trying not to use filetool.lst as much as I can,
-
If I put it on bootlocal.sh like below,
### Load /etc/profile
cp /mnt/sda1/backupcfg/profile /etc/profile
I try it, but it seems doesnt work, why?
Im trying not to use filetool.lst as much as I can,
bootlocal.sh is IN mydata.tgz
You need to backup, one way or another.
-
Hi deodion
Im trying not to use filetool.lst as much as I can,
In that case just add those two lines to .profile in your home directory instead.
-
Hello Rich,
I see it working with filetool.sh,
is this because with where filetool.sh is being executed before /etc/profile execution?
-
/etc/profile is not executed.
It is sourced by the shell when the shell starts ( after login ).