Bitcoin Forum
December 09, 2016, 01:52:40 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Anyone have a quick solution to the Xauthority/INVALID_MAGIC_COOKIE BAMT error?  (Read 1875 times)
mc_lovin
Legendary
*
Offline Offline

Activity: 1134


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?

1481291560
Hero Member
*
Offline Offline

Posts: 1481291560

View Profile Personal Message (Offline)

Ignore
1481291560
Reply with quote  #2

1481291560
Report to moderator
1481291560
Hero Member
*
Offline Offline

Posts: 1481291560

View Profile Personal Message (Offline)

Ignore
1481291560
Reply with quote  #2

1481291560
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481291560
Hero Member
*
Offline Offline

Posts: 1481291560

View Profile Personal Message (Offline)

Ignore
1481291560
Reply with quote  #2

1481291560
Report to moderator
mc_lovin
Legendary
*
Offline Offline

Activity: 1134


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: 168



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: 588


View Profile WWW
April 22, 2012, 01:33:45 PM
 #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

If you want to support further development of BAMT (http://bamter.org/):  1PoRYaGS56ksQmK7XXLurW3B2zwCAE8PRc
mc_lovin
Legendary
*
Offline Offline

Activity: 1134


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!