belane / docker-bloodhound

BloodHound Docker Ready to Use
86 stars 34 forks source link

Sometimes the page will become blank #8

Open r00tSe7en opened 2 years ago

r00tSe7en commented 2 years ago

Sometimes the page will become blank

docker pull belane/bloodhound bai

r00tSe7en commented 2 years ago

I'm not sure what caused the blank

belane commented 1 year ago

Not sure what caused it, but it seems a BloodHound problem as they have some issues about this;

Does it show any error log?

AdrianVollmer commented 1 year ago

FWIW I got a blank screen right after the login almost always, but not quite. Once in 20 attempts or so it would work. (Note that I was using podman instead of Docker.)

I set the environment variable ELECTRON_ENABLE_LOGGING=true (I recommend setting this by default in run.sh) and got this:

[863:0404/074158.514056:WARNING:discardable_shared_memory_manager.cc(194)] Less than 64MB of free space in temporary directory for shared memory files: 62
[863:0404/074158.576556:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[863:0404/074158.600654:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[863:0404/074158.630999:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
(node:863) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
[926:0404/074158.697044:ERROR:command_buffer_proxy_impl.cc(122)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
[863:0404/074158.752921:INFO:CONSOLE(1656)] "to use the xlx plugin, you have to include the XLSX library", source: file:///opt/BloodHound-linux-x64/resources/app/node_modules/linkurious/dist/plugins.js (1656)
[863:0404/074158.752950:INFO:CONSOLE(2283)] "to use the dagre plugin, you have to include dagre and dagre.graphlib", source: file:///opt/BloodHound-linux-x64/resources/app/node_modules/linkurious/dist/plugins.js (2283)
[863:0404/074158.753289:INFO:CONSOLE(14738)] "Include leaflet to use the leaflet plugin for sigma.", source: file:///opt/BloodHound-linux-x64/resources/app/node_modules/linkurious/dist/plugins.js (14738)
(node:926) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[892:0404/074202.145526:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.

This explains and solves it: https://stackoverflow.com/questions/56218242/headless-chromium-on-docker-fails

Option 1: Run chrome bloodhound with --disable-dev-shm-usage Option 2: Set /dev/shm size to a reasonable amount docker run -it --shm-size=1g replacing 1g with whatever amount you want.

austinbentlee commented 1 year ago

EDIT: A workaround fix appears to be running BloodHound in a small window. I have a 2K monitor and it crashes pretty much right away. If you put it in a juuuuust usable enough window, you don't get any crashing.

@belane Please reconsider opening this issue as this is still occurring. See @AdrianVollmer's above comment.

image

belane commented 1 year ago

@r00tSe7en @AdrianVollmer @austinbentlee I've created a debug Dockerfile that will print errors to the console so we can figure out the source of the problem.

Please try it and copy the error details here.

Create image: docker build -f dockerfile-debug . -t bloodhound-debug

Add local user to DISPLAY (if necessary): xhost +local:$(id -nu)

Run container:

docker run -it \
  -p 7474:7474 \
  -e DISPLAY=unix$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  --device=/dev/dri:/dev/dri \
  -v $(pwd)/bh-data:/data \
  --name bloodhound-debug bloodhound-debug

If you get error messages about shared memory, try the shm-size argument.

docker run -it --shm-size=1g \
  -p 7474:7474 \
  -e DISPLAY=unix$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  --device=/dev/dri:/dev/dri \
  -v $(pwd)/bh-data:/data \
  --name bloodhound-debug bloodhound-debug
0xdreadnaught commented 1 year ago

If you get error messages about shared memory, try the shm-size argument.

docker run -it --shm-size=1g \
  -p 7474:7474 \
  -e DISPLAY=unix$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  --device=/dev/dri:/dev/dri \
  -v $(pwd)/bh-data:/data \
  --name bloodhound-debug bloodhound-debug

This did the trick for me on Parrot 5 with jdk11