WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Core 8.0 x64, file not found, but file exist  (Read 6097 times)

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Core 8.0 x64, file not found, but file exist
« 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

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #1 on: August 19, 2017, 08:25:13 PM »
did you try just
Code: [Select]
splunk
or from the directory location of splunk
Code: [Select]
./splunk

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #2 on: August 19, 2017, 08:28:29 PM »
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
Code: [Select]
ln -s /lib /lib64
« Last Edit: August 19, 2017, 08:58:54 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #3 on: August 19, 2017, 08:52:17 PM »
I think you said new to linux??  ok some info for you regarding paths to a program.

Code: [Select]
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
Code: [Select]
./program executes the program from the current directory
« Last Edit: August 19, 2017, 09:02:42 PM by coreplayer2 »

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #4 on: August 19, 2017, 09:33:02 PM »
Tried ./splunk and splunk
Im aware about that,

Later I will try all other clues
« Last Edit: August 19, 2017, 09:49:24 PM by deodion »

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #5 on: August 20, 2017, 04:58:55 AM »
Hello,

I use
Code: (bash) [Select]
ln -s /lib /lib64
Its working,


now I get: ps: invalid option -- 'p'
Code: (bash) [Select]
]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?
« Last Edit: August 20, 2017, 05:15:55 AM by deodion »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Core 8.0 x64, file not found, but file exist
« Reply #6 on: August 20, 2017, 05:07:06 AM »
RE: ps: invalid option -- 'p'
I believe you need the full  procps.tcz .
« Last Edit: August 20, 2017, 05:09:42 AM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #7 on: August 20, 2017, 05:22:56 AM »
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,

Code: (bash) [Select]
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.
« Last Edit: August 20, 2017, 05:27:42 AM by deodion »

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Core 8.0 x64, file not found, but file exist
« Reply #8 on: August 20, 2017, 05:35:48 AM »
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.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #9 on: August 20, 2017, 07:58:42 AM »
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
Code: [Select]
ls /lib64
If you're referring to the first error in your screenshot, then most likely yes..
« Last Edit: August 20, 2017, 08:12:24 AM by coreplayer2 »

Offline deodion

  • Jr. Member
  • **
  • Posts: 51
Re: Core 8.0 x64, file not found, but file exist
« Reply #10 on: August 20, 2017, 09:22:59 AM »
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?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #11 on: August 20, 2017, 09:52:47 AM »
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:
Code: [Select]
/opt/splunk/bin $ ./splunk start

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Core 8.0 x64, file not found, but file exist
« Reply #12 on: August 20, 2017, 09:55:05 AM »
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.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #13 on: August 20, 2017, 10:19:45 AM »
Code: [Select]
/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.. :(
Code: [Select]
# export SPLUNK_HOME=/opt/splunk
# export PATH=$SPLUNK_HOME/bin:$PATH
was all that was needed..
« Last Edit: August 20, 2017, 10:33:56 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Core 8.0 x64, file not found, but file exist
« Reply #14 on: August 20, 2017, 11:19:06 AM »
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

Code: [Select]
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
« Last Edit: August 20, 2017, 11:22:44 AM by coreplayer2 »