Bitcoin Forum
May 10, 2024, 10:11:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: Anyone have a quick solution to the Xauthority/INVALID_MAGIC_COOKIE BAMT error?  (Read 2155 times)
mc_lovin (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1000


www.bitcointrading.com


View Profile WWW
April 17, 2012, 08:00:32 PM
 #1

Ahoy!  Got a problem with bamt.  I would have just put this as a reply in the bamt thread, but this applies to all versions of linux that use X.

Basically, sometimes when SSH-ing into a box I get an error like INVALID_MAGIC_COOKIE, it's a curse, but I have found that re-flashing my USB again sometimes fixes this.

The issue can be replicated if I start off with a fresh copy of bamt and then set the root password, and then as soon as you switch to the root user, if it says 'cannot create Xauthority file', then it's not going to work, re-do bamt again.

Sometimes I have to re-do bamt like 5 times to get it working properly.  This is on numerous systems, eventually I get it all working fine but it takes forever.

Is there an actual solution to this?
1715379079
Hero Member
*
Offline Offline

Posts: 1715379079

View Profile Personal Message (Offline)

Ignore
1715379079
Reply with quote  #2

1715379079
Report to moderator
1715379079
Hero Member
*
Offline Offline

Posts: 1715379079

View Profile Personal Message (Offline)

Ignore
1715379079
Reply with quote  #2

1715379079
Report to moderator
1715379079
Hero Member
*
Offline Offline

Posts: 1715379079

View Profile Personal Message (Offline)

Ignore
1715379079
Reply with quote  #2

1715379079
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
mc_lovin (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1000


www.bitcointrading.com


View Profile WWW
April 17, 2012, 08:05:49 PM
 #2

just got it to work with another stick, but the issue pops up a lot and it will most likely happen again..
DILLIGAF
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
April 17, 2012, 08:10:34 PM
 #3

Ahoy!  Got a problem with bamt.  I would have just put this as a reply in the bamt thread, but this applies to all versions of linux that use X.

Basically, sometimes when SSH-ing into a box I get an error like INVALID_MAGIC_COOKIE, it's a curse, but I have found that re-flashing my USB again sometimes fixes this.

The issue can be replicated if I start off with a fresh copy of bamt and then set the root password, and then as soon as you switch to the root user, if it says 'cannot create Xauthority file', then it's not going to work, re-do bamt again.

Sometimes I have to re-do bamt like 5 times to get it working properly.  This is on numerous systems, eventually I get it all working fine but it takes forever.

Is there an actual solution to this?

Don't log in as root it is not supposed to be running the Xserver or try this below in your /root/.bashrc

Code:
export XAUTHORITY=/home/normal_user_name/.Xauthority

Which should give it your normal user's permissions to run the Xserver.
lodcrappo
Hero Member
*****
Offline Offline

Activity: 616
Merit: 506


View Profile
April 22, 2012, 01:33:45 PM
Last edit: April 22, 2012, 01:44:55 PM by lodcrappo
 #4

Ahoy!  Got a problem with bamt.  I would have just put this as a reply in the bamt thread, but this applies to all versions of linux that use X.

Basically, sometimes when SSH-ing into a box I get an error like INVALID_MAGIC_COOKIE, it's a curse, but I have found that re-flashing my USB again sometimes fixes this.

The issue can be replicated if I start off with a fresh copy of bamt and then set the root password, and then as soon as you switch to the root user, if it says 'cannot create Xauthority file', then it's not going to work, re-do bamt again.

Sometimes I have to re-do bamt like 5 times to get it working properly.  This is on numerous systems, eventually I get it all working fine but it takes forever.

Is there an actual solution to this?

I think something odd is going on... I haven't heard of other folks having this issue, and I'd think I would have if its happening so often.

Are you using the latest image (0.5c)?  You might want to grab a fresh copy even if so.
Are you applying the fixes?  Try applying all, then rebooting (just ignore the Xauth error if you see one).  Does the problem go away?

Edit--- some other thoughts enter my head...

How quickly after power up are you doing this?  The setup scripts have some delays to let X get loaded, and only at the end do they arrange the xauth stuff and make ssh work properly.  Slow USB keys can make this time even longer.   If you are jumping in before these run, you'll get bad results. 

Second... why not just get it to work once, and then copy that key back to whatever PC you are using to write the stock image.  Now make all future images from that new image.

Third.. how often are you reinstalling that this is actually an issue? Smiley
mc_lovin (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1000


www.bitcointrading.com


View Profile WWW
April 25, 2012, 06:48:06 PM
 #5


I think something odd is going on... I haven't heard of other folks having this issue, and I'd think I would have if its happening so often.

Are you using the latest image (0.5c)?  You might want to grab a fresh copy even if so.

Are you applying the fixes?  Try applying all, then rebooting (just ignore the Xauth error if you see one).  Does the problem go away?

Edit--- some other thoughts enter my head...

How quickly after power up are you doing this?  The setup scripts have some delays to let X get loaded, and only at the end do they arrange the xauth stuff and make ssh work properly.  Slow USB keys can make this time even longer.   If you are jumping in before these run, you'll get bad results. 

Second... why not just get it to work once, and then copy that key back to whatever PC you are using to write the stock image.  Now make all future images from that new image.

Third.. how often are you reinstalling that this is actually an issue? Smiley

I am grabbing the latest image, fixes, etc..  and I'm not sure exactly what is causing the issue, it's just we have a dozen miners and sometimes after adding a card or if a fan dies, we swap it out and then upon reboot we *sometimes* get the MAGIC COOKIE error.  Or if there is a monitor connected to the machine and it is disconnected, X freaks out and the miner will disappear, but it's not an overly huge problem because BAMT is so easy to configure that if we do encounter the problem, I just format a fresh BAMT usb again and it might work the 2nd try. 

I did not know we can copy the key to other systems, that's a good idea.

It might have something to do with SSHing in before the system is ready for me, I have a tendancy to jump in right away.

Right now everything is running 100% using BAMT with the exception of the 7970s being not compatible (my boss is going to give the 30BTC pledge for compatibility shortly).
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!