Git Product home page Git Product logo

Comments (23)

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Hi @lcmardell: thanks for including the log file. I'm hoping you can help with a little debugging so I can fix this for all users.

From what I can tell, an entry is not getting created in ~/.Xauthority. The hnn_docker.sh script can create the file and add the appropriate entry if the file doesn't already exist. Can you try deleting ~/.Xauthority and re-running the script? Even if that solves it, could you post the end of hnn_docker.log again?

Thanks!

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

hnn_docker.log
I have tried this a couple of times, deleting Xauthority and it still does not work - getting stuck at the same point.

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

The log shows that hnn_docker.sh thinks your home directory (returned by ~/) is /n/. Can you confirm that in the shell if you run cd ~?

The command /c/Program Files/VcXsrv/xauth.exe generate localhost:0 . created an Xauthority file somewhere, but it's not in ~/ where the script expects it to be. Can you find this .Xauthority file somewhere (maybe in the hnn directory)?

If the above cd ~ fails, what about temporarily setting the HOME environment variable?

export HOME=/c/Users/[YOUR_USERNAME]/

And then verifying cd ~ takes you to the right directory and finally retrying hnn_docker.sh.

Please report back with what you find. I haven't seen this before. Thanks

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

My home directory is /n/ and this is where hnn is downloaded. I've now tried moving it to /c/Users/[my username]/ and running hnn_docker again (also changed HOME), the same thing keeps happening, where Xauthority is always generated in my home directory but it still fails at Xauth.

hnn_docker.log

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Ok, perhaps this. I made the xauth command to be specific about which file to use in this commit. Can you test it by retrying hnn_docker.sh after the following?

git fetch origin pull/187/head:issue_186
git checkout issue_186

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

Have done

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

If it didn't work, could you send the log? Thanks

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

hnn_docker.log

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

VcXsrv may be dying immediately after the script tries starting it which I found would produce what you're seeing. I've put more debugging into the pull request (try the fetch/checkout commands again). Try deleting ~/.Xauthority again.

You can run the xauth commands manuallly. The goal is to get this command to show a generated key:

/c/Program\ Files/VcXsrv/xauth.exe -f ~/.Xauthority list
[key]

Delete ~/.Xauthority. To generate a new key, VcXsrv must be running. Let's start it

/c/Program\ Files/VcXsrv/vcxsrv.exe -wgl -multiwindow 2>&1 &

It should still be running in the background. Run this command (the no such file error is expected the first time you run it)

/c/Program\ Files/VcXsrv/xauth.exe -f ~/.Xauthority generate localhost:0 .
bash: c/Program Files/VcXsrv/xauth.exe: No such file or directory

If you see this, then I suspect VcXsrv is crashing

C:\Program Files\VcXsrv\xauth.exe: (argv):1:  unable to open display "localhost: 0".

The log file might tell us why. Thanks for your patience.

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

hnn_docker.log

When I run the first line to generate a key there is just a blank response

`rmhklcm@CS00047600 MINGW64 ~/hnn (issue_186)
$ /c/Program\ Files/VcXsrv/xauth.exe -f ~/.Xauthority list

`
VcXsrv doesn't seem to be crashing

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Oops. It looks like the fetch command I gave you can't be run twice. So the new code wasn't downloaded. I'm hoping the logs will give a clue as to why the generate command isn't working.

Try this instead.

git pull origin refs/pull/187/head

Then you should have the updates to hnn_docker.sh that will capture the output of VcXsrv.

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

hnn_docker.log

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

This is still failing on the same part.

"Retrieving current X11 authentication keys... failed. Error with xauth: no valid keys
Please see hnn_docker.log for more details"

hnn_docker.log

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Thanks. I found a note in VcXsrv releases that they updated xauth, but when I downloaded the new version, xauth didn't actually get upgraded.
https://sourceforge.net/projects/vcxsrv/files/vcxsrv/1.20.6.0/

I'm trying to build VcXsrv myself to make sure it gets updated to version 1.1 and will report back. You could try the new VcXsrv version, but I'm not sure it will help.

export PATH=$PATH:/c/Program\ Files/VcXsrv/
xauth -V

Is there any text in ~/.Xauthority? Some of it won't be readable, but it should begin with your machine name.

Also, I know that you verified that xauth list didn't return anything. What about xauth nlist?

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

xauth -V is 1.0.1

This is the contents of .Xauthority:

CS00047600 �0 �MIT-MAGIC-COOKIE-1 �¶��³®5?º�âØá?÷kO

Neither xauth list nor xauth nlist return anything

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Okay. The contents might be okay. I tried an update that will turn this into a warning and try continuing with starting HNN anyway. Could you try it again?

git pull origin refs/pull/187/head
hnn_docker.sh start

I'm still working on building VcXsrv with a newer version of xauth, but that may not be critical.

from hnn.

lcmardell avatar lcmardell commented on May 15, 2024

hnn_docker.log

Ok great, it's now working. Thank you.

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Excellent. I'm glad to hear that. Thanks for working with me on this. I'll incorporate those changes into a released version shortly.

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

Trying to get xauth 1.1 included in vcxsrv, but this may not solve the problem.
https://sourceforge.net/p/vcxsrv/bugs/113/

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

closing as the workaround in PR #187 has been merged.

from hnn.

ShiriMakov avatar ShiriMakov commented on May 15, 2024

Hi @blakecaldwell , I'm experiencing kind of the same issue.
On Windows 10 (not pro) when I run ./hnn_docker.sh -u start I get:

======================================
Upgrade HNN image requested

Starting HNN container requested

Performing pre-checks before starting HNN
--------------------------------------
Checking OS version... windows
Checking if docker is installed... done
Checking if Docker (Toolbox) is working... done
Checking Docker container type... linux
Downloading new HNN image from Docker Hub... done
Looking for existing containers... not found
Checking if VcXsrv is running... no
Checking for vcxsrv... found
Starting VcXsrv... done
Checking for xauth... found
Checking for X11 authentication keys... *failed*

For me, the command didn't create an .Xauthority file.
I followed your suggestion and ran:

export PATH=$PATH:/c/Program\ Files/VcXsrv/
xauth -V

The .Xauthority file was created this time (with content in it), but the start command still failed.

Here is the log file:
hnn_docker.log

Would really appreciate any help.

from hnn.

blakecaldwell avatar blakecaldwell commented on May 15, 2024

@ShiriMakov thanks it looks like an issue that came up in #228. I went ahead and merged this "fix" to master. Could you pull the latest code and try again? If there are still issues, could you comment in #228 and I can reopen that issue?

As a heads up, we will soon be providing instructions to install HNN in WSL and will not use docker after that. So hopefully fewer issues like this will crop up.

from hnn.

ShiriMakov avatar ShiriMakov commented on May 15, 2024

Thanks @blakecaldwell, will continue in #228 .

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.