GithubHelp home page GithubHelp logo

CLP Setup issue about clp HOT 12 OPEN

y-scope avatar y-scope commented on July 23, 2024
CLP Setup issue

from clp.

Comments (12)

RajeshAccount avatar RajeshAccount commented on July 23, 2024 1

I'm able to successfully import hive data set, I installed docker-ce-24.0.7-1 latest version of docker earlier I had 24.0.5

from clp.

kirkrodrigues avatar kirkrodrigues commented on July 23, 2024

Hey @RajeshAccount,

Running on Ubuntu Focal isn't a requirement but the container image the package is using is built for x86_64 whereas it looks like you're using an ARM EC2 instance:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

We'll add some ARM container images but before that, the fastest work around would be to use an x86 EC2 instance. In case that's not possible, we will also write some instructions on how to build and use a local container image.

from clp.

RajeshAccount avatar RajeshAccount commented on July 23, 2024

Thanks for quick response, mean while I tried with x86 EC2 instance, now I'm getting below error while executing start-clp

ubuntu@ip----:~/clp/clp-package-ubuntu-focal-x86_64-v0.0.2$ sudo ./sbin/start-clp
2023-12-21 16:06:59,383 [INFO] [clp] Starting database...
Unable to find image 'mariadb:10.6.4-focal' locally
10.6.4-focal: Pulling from library/mariadb
7b1a6ab2e44d: Pull complete
034655750c88: Pull complete
f0b757a2a0f0: Pull complete
5c37daf8b6b5: Pull complete
b4cd9409b0f6: Pull complete
dbcda06785eb: Pull complete
a34cd90f184c: Pull complete
fd6cef4ce489: Pull complete
3cb89a1550ea: Pull complete
df9f153bd930: Pull complete
Digest: sha256:c014ba1efc5dbd711d0520c7762d57807f35549de3414eb31e942a420c8a2ed2
Status: Downloaded newer image for mariadb:10.6.4-focal
2023-12-21 16:07:16,692 [INFO] [clp] Started database.
2023-12-21 16:07:16,692 [INFO] [clp] Creating database tables...
Unable to find image 'ghcr.io/y-scope/clp/clp-execution-x86-ubuntu-focal:main' locally
main: Pulling from y-scope/clp/clp-execution-x86-ubuntu-focal
30ecab32a3b6: Pull complete
4f4fb700ef54: Pull complete
786ee64951df: Pull complete
7c312673afb9: Pull complete
bf3db92d4f61: Pull complete
d6b7527ac0a3: Pull complete
fff3b44df51e: Pull complete
5cfca84536c9: Pull complete
Digest: sha256:f419462db34cbc1daf0c626a8012bfb4892c85ffa9434a9f95f7c9b7d71eda27
Status: Downloaded newer image for ghcr.io/y-scope/clp/clp-execution-x86-ubuntu-focal:main
2023-12-21 16:07:27,304 [INFO] [clp] Created database tables.
2023-12-21 16:07:27,304 [INFO] [clp] Starting queue...
Unable to find image 'rabbitmq:3.9.8' locally
3.9.8: Pulling from library/rabbitmq
7b1a6ab2e44d: Already exists
37f453d83d8f: Pull complete
33be96f1328e: Pull complete
d3c5c3f5c49a: Pull complete
a3d2d8a82978: Pull complete
633da6037b0d: Pull complete
a619e412c37f: Pull complete
338c71e3d8cd: Pull complete
1daa7c79a268: Pull complete
Digest: sha256:19e69a7a65fa6b1d0a5c658bad8ec03d2c9900a98ebbc744c34d49179ff517bf
Status: Downloaded newer image for rabbitmq:3.9.8
2023-12-21 16:07:37,883 [INFO] [clp] Stopping clp-queue-589a...
2023-12-21 16:07:37,896 [INFO] [clp] Stopped clp-queue-589a.
2023-12-21 16:07:37,910 [INFO] [clp] Stopping clp-db-589a...
2023-12-21 16:07:38,426 [INFO] [clp] Stopped clp-db-589a.
2023-12-21 16:07:38,440 [ERROR] [clp] Failed to start CLP.
Traceback (most recent call last):
File "/home/ubuntu/clp/clp-package-ubuntu-focal-x86_64-v0.0.2/./sbin/start-clp", line 462, in main
start_queue(instance_id, clp_config)
File "/home/ubuntu/clp/clp-package-ubuntu-focal-x86_64-v0.0.2/./sbin/start-clp", line 271, in start_queue
subprocess.run(cmd, stdout=subprocess.DEVNULL, check=True)
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['docker', 'exec', '-it', 'clp-queue-589a', 'rabbitmqctl', 'wait', '/tmp/rabbitmq.pid']' returned non-zero exit status 137.

from clp.

RajeshAccount avatar RajeshAccount commented on July 23, 2024

looks like its related to OOM, let me try with higher EC2 instance. Let me know if you have any other suggestions.

from clp.

kirkrodrigues avatar kirkrodrigues commented on July 23, 2024

Could you post the log output of <package>/var/log/<host>/rabbitmq*.log? This sounds similar to the issue we saw here.

from clp.

RajeshAccount avatar RajeshAccount commented on July 23, 2024

no files present under <package>/var/log/<host>/ Can i only see two empty directory (<package>/var/log/<host>/db and <package>/var/log/<host>/queue).

from clp.

kirkrodrigues avatar kirkrodrigues commented on July 23, 2024

Are you running as a normal user or as root? Also what EC2 instance type are you using? I will try and replicate your setup to debug.

from clp.

RajeshAccount avatar RajeshAccount commented on July 23, 2024

EC2 -> c5.9xlarge
normal user

from clp.

kirkrodrigues avatar kirkrodrigues commented on July 23, 2024

I'm able to run the v0.0.2 release successfully on a c5.9xlarge instance. If you want to compare, here are the commands I ran on the machine after logging in:

  • Install Docker

    sudo snap install docker
    sudo addgroup --system docker
    sudo adduser $USER docker
    sudo snap disable docker
    sudo snap enable docker
  • Log out and log back in

  • Extract & start clp:

    curl -fsSLO https://github.com/y-scope/clp/releases/download/v0.0.2/clp-package-ubuntu-focal-x86_64-v0.0.2.tar.gz
    tar xzf clp-package-ubuntu-focal-x86_64-v0.0.2.tar.gz
    cd clp-package-ubuntu-focal-x86_64-v0.0.2
    sbin/start-clp
  • Test compression and search on /var/log/dpkg.log

    sbin/compress /var/log/dpkg.log
    sbin/search purge

Here are some troubleshooting steps you could try:

  • Run docker ps and then docker stop <container-name> on any containers with the prefix clp-.
  • sudo rm -r <package>/var/log <package>/var/data
  • Then try starting the package again

from clp.

RajeshAccount avatar RajeshAccount commented on July 23, 2024

kirkrodrigues Thanks for quick response and helping me setting up the clp.

I have queries on the supported search patterns, request to share any documentation on the search query pattern. Patterns I'm looking for are date range search (searching specific date range instead of entire time range), AND, OR search support.

from clp.

kirkrodrigues avatar kirkrodrigues commented on July 23, 2024

Hey @RajeshAccount, glad you got it working.

CLP currently supports wildcard queries where:

  • * matches 0 or more characters, and
  • ? matches any single character

We do support filtering by timestamp in the clp binary but we haven't exposed that yet in the package version of CLP. We'll look into adding that quickly so that you can test with it; we actually have a rewrite of the distributed compression and search code (that improves search performance and adds some of these missing features) coming in the 1st/2nd week of January.

If you just want to test single-threaded compression and search performance, you can use the clp binaries directly instead of the package:

  • Start a container containing the clp binaries:

    docker run \
      -u$(id -u):$(id -g) \
      -v<dir-containing-logs>:/mnt/logs \
      -v<output-dir>:/mnt/output \
      --rm \
      -it \
      clp/clp-core-x86-ubuntu-focal /bin/bash
    • Change <dir-containing-logs> and <output-dir> to the relevant paths on your system.
  • Then follow the usage instructions here.

    • You should set archives-dir to a path inside /mnt/output/
    • Your input logs should be a path inside /mnt/logs
    • clg supports time-range filtering using a syntax like ./clg --tge 1703242608000 --tlt 1703242608999 my-archives-dir which means search for logs which have a millisecond epoch timestamp in the range [1703242608000, 1703242608999). You can see complete usage instructions with ./clg --help.

CLP's search doesn't currently support boolean operators (AND, OR, etc.). This is on our roadmap, but we don't have an exact date for it yet. That said, we are open-sourcing a new storage engine for semi-structured logs (JSON, etc.) in the next few weeks and that supports a KQL query language (which itself supports boolean operators, range filtering, etc.). We'll ping you when that's ready to try.

from clp.

kirkrodrigues avatar kirkrodrigues commented on July 23, 2024

Hi @RajeshAccount,

We've added support for filtering by timestamps to the package. To try it, you can build the package from main by using the packager tool. Let us know if you have any trouble building the package.

Once built, the search command (<package>/sbin/search.sh) will show new options for filtering by timestamp (--begin-time and --end-time). Note that currently, timestamps must be specified as milliseconds since the UNIX epoch.

from clp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.