jerlendds / osintbuddy

Node graphs, OSINT data mining, and plugins. Connect unstructured and public data for transformative insights
GNU Affero General Public License v3.0
683 stars 62 forks source link

[BUG] install not working: `env: can't execute 'node': Text file busy` #49

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug Install fails on other machines

To Reproduce Steps to reproduce the behavior:

  1. Attempt install

Expected behavior Osintbuddy to install correctly

Screenshots See comments

Desktop (please complete the following information):

Additional context Yarn config in .env incorrect

ghost commented 1 year ago

asciicast

jerlendds commented 1 year ago

Hey, you're awesome! Thanks for keeping up with reporting bugs! I'll check this out and get a fix out tonight

jerlendds commented 1 year ago

Hey @make-believe-agency , this is a strange bug. I'm going to need a bit more info from you. The Text file busy message is generated when something tries to modify an executable while its executing [1]. I've gotten someone else to successfully install the project on an older version of macOS so I'm thinking this issue could potentially be related to the way your systems configured but I'm not sure yet. Could you try adjusting line 6 at osintbuddy/frontend/Dockerfile to RUN netstat && lsof && yarn build and send me a screencast of that?

ghost commented 1 year ago

➜ osintbuddy git:(main) ✗ docker compose up
[+] Building 4.6s (35/43)
=> [ui internal] load .dockerignore 0.0s => => transferring context: 67B 0.0s => [ui internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 323B 0.0s => [ui internal] load metadata for docker.io/library/nginx:1.25.0-alpine 4.0s => [ui internal] load metadata for docker.io/library/node:20-alpine3.17 3.5s => [backend internal] load build definition from backend.Dockerfile 0.0s => => transferring dockerfile: 1.11kB 0.0s => [backend internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [backend internal] load metadata for docker.io/library/python:3.11.3- 3.7s => [worker internal] load build definition from worker.Dockerfile 0.0s => => transferring dockerfile: 571B 0.0s => [worker internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [worker internal] load metadata for docker.io/library/python:3.9.6-bu 3.8s => [backend auth] library/python:pull token for registry-1.docker.io 0.0s => [ui auth] library/nginx:pull token for registry-1.docker.io 0.0s => [ui auth] library/node:pull token for registry-1.docker.io 0.0s => [backend 1/9] FROM docker.io/library/python:3.11.3-slim-bullseye@sha2 0.0s => [backend internal] load build context 0.0s => => transferring context: 69.18kB 0.0s => CACHED [backend 2/9] WORKDIR /app/ 0.0s => CACHED [backend 3/9] RUN apt-get -y update && apt-get -y install nmap 0.0s => CACHED [backend 4/9] RUN wget -q -O - https://dl.google.com/linux/lin 0.0s => CACHED [backend 5/9] COPY requirements.txt /app/requirements.txt 0.0s => CANCELED [backend 6/9] RUN pip install --no-cache-dir --upgrade pip & 0.8s => [worker 1/9] FROM docker.io/library/python:3.9.6-buster@sha256:f1cfaa 0.0s => [worker internal] load build context 0.0s => => transferring context: 12.02kB 0.0s => CACHED [worker 2/9] WORKDIR /app/ 0.0s => CACHED [worker 3/9] COPY ./requirements.txt /app/requirements.txt 0.0s => CACHED [worker 4/9] COPY ./dev-requirements.txt /app/dev-requirements 0.0s => CACHED [worker 5/9] RUN pip install --no-cache-dir --upgrade pip 0.0s => CANCELED [worker 6/9] RUN if test -e /app/requirements.txt; then pip 0.7s => [ui build-stage 1/6] FROM docker.io/library/node:20-alpine3.17@sha256 0.0s => [ui internal] load build context 0.0s => => transferring context: 19.29kB 0.0s => CACHED [ui stage-1 1/3] FROM docker.io/library/nginx:1.25.0-alpine@sh 0.0s => CACHED [ui build-stage 2/6] WORKDIR /app/ 0.0s => CACHED [ui build-stage 3/6] COPY package.json yarn.lock ./ 0.0s => CACHED [ui build-stage 4/6] RUN yarn 0.0s => [ui build-stage 5/6] COPY . . 0.0s => ERROR [ui build-stage 6/6] RUN yarn build 0.5s

[ui build-stage 6/6] RUN yarn build:

0 0.393 yarn run v1.22.19

0 0.450 $ craco build

0 0.487 env: can't execute 'node': Text file busy

0 0.501 error Command failed with exit code 126.

0 0.501 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 126

ghost commented 1 year ago

Older versions of mac use python 2.7 which was discontinued in 2021, my version and onwards seem to use python 3, and I see "pip" and not "pip3" in the above. You'd have to consider the fact you just asked me to publicise my network and running processes on github, no thanks.

jerlendds commented 1 year ago

Older versions of mac use python 2.7 which was discontinued in 2021, my version and onwards seem to use python 3, and I see "pip" and not "pip3" in the above. You'd have to consider the fact you just asked me to publicise my network and running processes on github, no thanks.

I understand, could potentially make this a bit harder to fix though. I'll take a look at the logs above, thanks for posting them! Also, does pip3 resolve the issue? My understanding is the issue is with the node image

edit: Might be worth trying with a different image like node:18, maybe a npm run build instead. I'll spend some more time looking into this but there doesn't seem to be too many similar issues

ghost commented 1 year ago

It installs fine on another machine running macOS 10.15.7

SteveGremory commented 1 year ago

It does work for me on macOS Ventura (13.4, Build 22F66) I have python Python 3.10.9 that was installed using Anaconda and am using Docker Desktop (Docker version 23.0.5, build bc4487a)

This is as of the latest commit.

jerlendds commented 1 year ago

Hey @make-believe-agency , I think I've found a potential fix, can you try pulling the latest changes and running:

docker compose build ui
docker compose up

This related issue was created 2 days ago: https://github.com/nodejs/docker-node/issues/1912

If this change doesn't work I suggest trying node:18 next. This seems to be an issue with some specific node alpine images on macOS/Windows that have popped up recently