Git Product home page Git Product logo

Comments (9)

blakecaldwell avatar blakecaldwell commented on May 15, 2024

@dnacombo thanks for noting this issue. I’ll be able to debug this further by creating a similar environment, but my first thoughts are around X authentication.

I’d expect that standard X11 applications are using DISPLAY=:0. Could you verify this environment variable in your desktop environment (not the hnn docker container)?

Second, what about trying to temporarily disable X authentication. What about running ‘xhost +’ and then running the script again.

Thanks again. I’ll be able to get back to you later today.

from hnn.

dnacombo avatar dnacombo commented on May 15, 2024
~$ echo $DISPLAY
:0

xhost + works! The gui just started...

Let me know if I can provide more info.
Thanks

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

good news! let's try a solution that doesn't completely disable access control. First lets undo the last command

xhost -

Now can you tell what just xhost returns?

The command that should fix it properly is

xhost +SI:localuser:$USER

Can you run just that command and let me know if the GUI still displays? If so, I'll add that to the hnn_docker.sh script for a permanent fix. Thanks!

from hnn.

dnacombo avatar dnacombo commented on May 15, 2024
xhost -
access control enabled, only authorized clients can connect
xhost
access control enabled, only authorized clients can connect
SI:localuser:maximilien.chaumon
xhost +SI:localuser:$USER
localuser:maximilien.chaumon being added to access control list
xhost
access control enabled, only authorized clients can connect
SI:localuser:maximilien.chaumon

No luck, the gui isn't starting.
With the same errors in the log.

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

@dnacombo it looks like a very strange bug with usernames that include a '.' It has to do with pyqt5 running from within a docker container. I'm not sure which developers to go to for a bug report because it is such a strange interaction.

Since this will onIy affect users with similar usernames, I think the best path forward is the workaround below which is still secure (unlike xhost +).

First, find a group from the list produced by the following command that doesn't contain a '.'

id -G -n $USER

Then add that group in a line at the beginning of hnn_docker.sh

xhost +si:localgroup:GROUP_NAME_WITHOUT_PERIOD

That should sidestep the issue you are seeing.

from hnn.

dnacombo avatar dnacombo commented on May 15, 2024

added this line to hnn_docker.sh

xhost +si:localgroup:cenir_staff
$ xhost
access control enabled, only authorized clients can connect
SI:localgroup:cenir_staff
SI:localuser:maximilien.chaumon

starting up with

$ ./hnn_docker.sh start


Performing pre-checks before starting HNN
--------------------------------------
Checking OS version... linux
Checking if Docker is installed... 
Command: which docker
/usr/bin/docker
ok
Checking if docker-compose is found... 
Command: which docker-compose
/usr/local/bin/docker-compose
ok
Checking if Docker is working... ok
Locating HNN source code... /home/maximilien.chaumon/hnn

Starting HNN
--------------------------------------
Checking for running HNN container... 2020bfa3d2f3        jonescompneurolab/hnn   "/home/hnn_user/star…"   9 hours ago         Exited (1) 2 minutes ago                       hnn_container
found
Starting HNN container... 
Command: docker-compose -f /home/maximilien.chaumon/hnn/installer/docker/docker-compose.yml up --no-recreate
Starting hnn_container ... 
�[1A�[2K
Starting hnn_container ... �[32mdone�[0m
�[1BAttaching to hnn_container
�[36mhnn_container |�[0m Starting HNN GUI...
�[36mhnn_container |�[0m No protocol specified
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :0
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 45:    12 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m Trying to start HNN with DISPLAY=:1
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :1
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 15:    23 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m HNN failed to start GUI using DISPLAY=:1
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Trying to start HNN with DISPLAY=:2
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :2
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 15:    34 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m HNN failed to start GUI using DISPLAY=:2
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Failed to start HNN on any X port
�[36mhnn_container exited with code 1
�[0mdone
Script hnn_docker.sh finished successfully

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

@dnacombo thanks for going through all of the troubleshooting steps. I've pushed some new changes that I believe will make a difference. Could you try it again with xhost +si:localgroup:cenir_staff?

git pull origin master
./hnn_docker.sh start

Running hnn_docker.sh with -u is optional. The docker container is practically the same.

from hnn.

dnacombo avatar dnacombo commented on May 15, 2024
~/hnn$ git pull origin master
remote: Enumerating objects: 67, done.
remote: Counting objects: 100% (67/67), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 67 (delta 35), reused 52 (delta 29), pack-reused 0
Unpacking objects: 100% (67/67), done.
From https://github.com/jonescompneurolab/hnn
 * branch            master     -> FETCH_HEAD
   3e79ef2..e106a55  master     -> origin/master
Updating 3e79ef2..e106a55
Fast-forward
 clidefs.py                             |   7 +-
 data/gamma_tutorial/100_trials.txt     | 701 +++++++++++++++++++++++++++++++++
 data/gamma_tutorial/1_trial.txt        | 701 +++++++++++++++++++++++++++++++++
 data/gamma_tutorial/readme.txt         |   2 +
 dipolefn.py                            |   8 +-
 hnn_docker.sh                          | 256 +++++++-----
 hnn_qt5.py                             |  49 +--
 installer/docker/docker-compose.yml    |   2 +-
 installer/mac/docker-compose.yml       |   2 +-
 installer/windows/docker-compose.yml   |   2 +-
 param/gamma_L5weak_L2weak_bursty.param | 227 +++++++++++
 pspec.py                               |   8 +-
 run.py                                 |  16 +-
 simdat.py                              |  86 ++--
 specfn.py                              |   3 +-
 spikefn.py                             |  18 +-
 visrast.py                             |  18 +-
 17 files changed, 1934 insertions(+), 172 deletions(-)
 create mode 100644 data/gamma_tutorial/100_trials.txt
 create mode 100644 data/gamma_tutorial/1_trial.txt
 create mode 100644 data/gamma_tutorial/readme.txt
 create mode 100644 param/gamma_L5weak_L2weak_bursty.param
Current branch master is up to date.
~/hnn$ ./hnn_docker.sh start
Starting HNN container requested

Performing pre-checks before starting HNN
--------------------------------------
Checking OS version... linux
Checking if Docker is installed... ok
Checking if docker-compose is found... ok
Checking if Docker is working... ok
Checking for xauth... done
Retrieving current X11 authentication keys... done
Locating HNN source code... /home/maximilien.chaumon/hnn
Updating Xauthority file... done

Starting HNN
--------------------------------------
Checking for running HNN container... not found
Looking for existing containers...found
Stopping HNN container... done
Starting HNN container... failed
Looking for existing containers...found

Please confirm that you want to remove the old HNN container? (y/n)y
Removing old container... done
Starting HNN container again... failed
Please see hnn_docker.log for more details
Looking for existing containers...
Command: docker ps -a |grep hnn_container
2020bfa3d2f3        jonescompneurolab/hnn   "/home/hnn_user/star…"   45 hours ago        Exited (1) Less than a second ago                       hnn_container
found
Removing old container... 
Command: docker rm -fv hnn_container
hnn_container
done
Starting HNN container again... 
Command: docker-compose -f /home/maximilien.chaumon/hnn/installer/docker/docker-compose.yml up --no-recreate --exit-code-from hnn
using --exit-code-from implies --abort-on-container-exit
Creating hnn_container ... 
�[1A�[2K
Creating hnn_container ... �[32mdone�[0m
�[1BAttaching to hnn_container
�[36mhnn_container |�[0m Starting HNN GUI...
�[36mhnn_container |�[0m No protocol specified
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :0
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 45:    13 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m Trying to start HNN with DISPLAY=:1
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :1
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 15:    26 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m HNN failed to start GUI using DISPLAY=:1
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Trying to start HNN with DISPLAY=:2
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :2
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 15:    37 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m HNN failed to start GUI using DISPLAY=:2
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Failed to start HNN on any X port
�[36mhnn_container exited with code 1
�[0mAborting on container exit...
failed

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

@dnacombo I think I've found a slightly less heavyweight solution with xhost +local:docker, I've documented this in the troubleshooting page for other users.

If you have the time and feel like reporting back whether this worked, I'd really appreciate it.

from hnn.

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.