"cmdStatus: missing csrf_token"


Recommended Posts

I searched for this error, finding only one thread.  I followed any applicable advice on that thread, but that OP's issue turned out to be the use of Margarita (I believe it was, as I have no idea -what- it is), which I do not use (don't own a Mac nor never heard of that software).

 

I recently upgraded to 6.3.3 from a 6.2.x (if I remember correctly, wish I could revert to old logs but they're still being overwritten with every reboot by the looks of it), roughly 6 days ago.  Last night I experience my first electricity outage since that upgrade.  I was away from home, but my son was not.  He called to report the electricity was back on, I gave him the go ahead to turn on the server and all seemed well, until an hour or so later when my server emailed me (I was still away from home) that it was running a parity check.

 

Upon returning home later that evening, I encountered "cmdStatus: missing csrf_token" errors nearly every minute.  Also, I seemed to have lost the ability to navigate to "tower" in windows explorer, clicking on it requires credentials.  All folders should be nobody:users and I never had to enter credentials before (accept way back in the day when all my shares weren't public).

I'd like to post a diagnostics, but, in a quick browse, it had things such as my user names, which are first names of family members.. call me paranoid, but I'd rather omit them, so I'll go through all files in the diagnostics ZIP, mask the "sensitive" data, then will post it.  Until then please know, I have ensured all plugins are up to date, all dockers are up to date and I'm not running any VM's.

dynamix.plg does not exist in the /boot/config (or wherever the thread I found while searching said it was precisely).

TL;DR

1. Upgraded from 6.2.x to 6.3.3 roughly 6 days ago

2. Experienced first electrical outage last night (it seemed to shutdown properly, UPS turned off after as should)
3. Turned on, then it decided to run a parity check and I seemed to have lost access to server via samba (Windows explorer) without having to enter non-existent credentials
4. cmdStatus: missing csrf_token error is populating logs each minute
5. All plugins and dockers are up to date, dynamix.plg does not exist in /boot/config/plugins

Thank you in advance.  P.S. Performing a manual "Shutdown" (where it seems manually stopping the array first is no longer necessary) takes roughly three times longer than the method I took in previous years of manually stopping the array, then shutting down, fwiw.

Link to comment

Decided to browse a little more as well as try to diagnose things (or at least be in a position to provide more information for this thread).  I've stopped my dockers I run one by one, to see if one of them were the culprit (until none were started/running), no change, same error each minute (on the minute + :01 seconds).

I did see under Settings -> Notification Settings, that Pushover was enabled (not sure why, never knowingly used it).  However, I cannot seem to disable it without having first entered a user key and app token (it was the "token" that caught my eye).  I entered some gibberish for both so that I was able to "Apply" the "disable" change.  The error still persists.

 

I'll just sit back now and not try anything that doesn't come recommended, as to not make matters possibly worse and to keep from bumping my thread (which isnt my intent).

Link to comment

In regards to the Samba issue (where my Win 7 cannot browse the unraid as guest), I've done the following in accordance with threads I read:


[global]
domain master = yes
preferred master = yes
os level = 255
security = USER
guest account = nobody
public = yes
guest ok = yes
ntlm auth = yes



Installed the Local Master Browser plugin as well.  Also installed the Common Fixes (just in case it would tell me something that would point me in the direction of either the Samba or that error message issues I'm experiencing).

Vulnerabilities or not, I'm nearly ready to roll back to 6.2.4  (likely would have by now if I could find a thread on it -- but then I'm faced with possible dockers/plugins that were updated that may only work with something special in 6.3.3), however naturally, forward progress is what anyone should be after and it seems counter-productive to roll back.  Unless of course its the only option to get rid of an error that didn't exist in 6.2.4 not to mention a broken Samba.

 

Anyone with leads?  I know it's only been a few hours, so I'll make an attempt at better patience, but did want to update the thread with what I've done thus far.  I'm -trying- to help myself, but it's not helping lol.

 

Link to comment
3 hours ago, remotevisitor said:

Surprised no one hasn't already replied to you .... This issue is mention in the FAQ at th top of this sub-forum.

 

All plugins are up to date according to GUI.  I mentioned that initially, so I'm guessing that is why no replies?  In either case, I can be patient about it (for now heh), otherwise it's a rollback for me.  Not the safe way to correct an issue that is susceptible to an invulnerability of course, but, between that error populating my log, the still unexplained parity check and a lack of Samba browsing of this unraid using my Win7 machine (most problems seem to concern Win10) -- I may have little choice in the matter.

 



Apr 21 21:55:01 Tower emhttp: error: cmdStatus: missing csrf_token



I'm not sure which plugin cmdStatus is, if it is even a plugin?

I appreciate the reply, any other ideas?  As I'm clueless where to go from here.
 

Link to comment
2 minutes ago, grandprix said:

 

All plugins are up to date according to GUI.  I mentioned that initially, so I'm guessing that is why no replies?  In either case, I can be patient about it (for now heh), otherwise it's a rollback for me.  Not the safe way to correct an issue that is susceptible to an invulnerability of course, but, between that error populating my log, the still unexplained parity check and a lack of Samba browsing of this unraid using my Win7 machine (most problems seem to concern Win10) -- I may have little choice in the matter.

 

 



I'm not sure which plugin cmdStatus is, if it is even a plugin?

I appreciate the reply, any other ideas?  As I'm clueless where to go from here.
 

What about margarita / controlR on your phone?  Close all browser windows connected to the server one way or another on all devices...

Link to comment
1 minute ago, Squid said:

What about margarita / controlR on your phone?  Close all browser windows connected to the server one way or another on all devices...

 

I only ever have unraid on one computer's browser, ever.  It's been closed, rebooted (three times), etc. (in an attempt to rid a stale connection as well as try to fix this Samba issue -- such as the registry IsBrowser entry thus rebooting after making that addition).  Still, just keeps giving that error every minute. <shrug>  Maybe something more telling is in the dianostics?  I admit, I don't know how to read them nearly as thoroughly as others here.  I still have no idea why the server decided to do a parity check.  How can one tell if a clean shutdown actually happened if the logs before the shutdown are overwritten?  Or aren't they anymore?

 

I'm at you guys' mercy, will provide whatever I can and will gladly try whatever I can.

Link to comment
Just now, BRiT said:

And many won't be able to help you without details from diagnostics.

 

I've attached them in the second post, are they not accessible?  The only thing I did was mask usernames, however if a user name of  "johnnyboy" existed, I made it a consistent "j-------y" in only two files where user names existed.

 

Link to comment

That wasn't to be read as sarcasm bud, I was legitimately asking if the diagnostics ZIP show up and can be downloaded, as I'm unsure if the new forums shows the number of times an attachment is download like the old ones did (if it does, then it doesnt indicate it was downloaded, leading me to believe that maybe it's not showing up?).  Sorry if it came across that way, definitely wasn't my intent.

Link to comment

Right then.  Questioning 6.3.3 stability.  In either case, I have an unraid that can barely be used.  Downgrading to 6.2.4 would require I rewrite/redo dockers (assuming information from the forum post is valid).  So, that sounds like even more fun.

 

1. Samba broken
2. token error every minute

3. Parity started for no apparent reason after what I have to assume was a proper shutdown

4. Now this error below

 



Apr 22 13:19:39 Tower shfs/user: err: shfs_mkdir: assign_disk: HDMovies/The Legend of Zorro (2005) (28) No space left on device



I've got over 4TB of total free space.  The HDMovies share is highwater set, 30GB minimum space and the data drives all have 180GB+ free space on them (majority of them are 250GB+).  No idea why it believes I have no space left?

 

 

Link to comment
35 minutes ago, grandprix said:

Right then.  Questioning 6.3.3 stability.  In either case, I have an unraid that can barely be used.  Downgrading to 6.2.4 would require I rewrite/redo dockers (assuming information from the forum post is valid).  So, that sounds like even more fun.

 

1. Samba broken
2. token error every minute

3. Parity started for no apparent reason after what I have to assume was a proper shutdown

4. Now this error below

 

 



I've got over 4TB of total free space.  The HDMovies share is highwater set, 30GB minimum space and the data drives all have 180GB+ free space on them (majority of them are 250GB+).  No idea why it believes I have no space left?

 

 

Downgrading to 6.2.4 only means that you have to delete and recreate your docker.img file.  A very painless procedure that takes 30 seconds

 

As for your symptoms:

 

#1,  #4 - This sounds like your cache drive has dropped off line.  You need to post your diagnostics after these symptoms appear

#3 - This sounds like your flash drive and/or port its plugged into is flakey.  (Search the forums here for "bread").

 

Last unnumbered sympton:  Once again sounds like either cache drive dropped off line or your minimum allocation settings are biffed.

 

Your csrf errors:

 

You've got both missing csrf and wrong csrf errors.  You never answered whether or not you are running stuff on your phone like margarita / controlR.

Link to comment

I'm having what might be the same issue.  On 6.3.2 I could not stop the array (gave:  Tower emhttp: error: cmdStop: missing csrf_token) and could not reboot from the Main web GUI window (gave: Tower root: error: webGui/include/Boot.php: missing csrf_token).  Actually the reboot button killed the webGUI and I had to reboot from the terminal using powerdown -r.

 

I saw this thread and the suggestions that some app was not up to date.  I updated all of the apps (mostly CA components) and saw the UnRAID 6.3.3 update, so I updated that too and rebooted from terminal with powerdown -r.  The server is now up and running but I still cannot stop the array or reboot from the web GUI, getting the same error codes above that I had before on 6.3.2.  I don't see any non-updated apps or plugins.  I do not have any clients attached to the server.  The only thing I think might interface with this is the powerdown script which I understand is on its way out, but is the only way I can reboot the server remotely.

 

I've attached the diagnostics.zip file.  The syslog after reboot (and trying to stop the array) is at the end

 

TIA for advice


Dennis

 

Apr 22 16:43:37 Tower emhttp: shcmd (94): /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/dockerupdate.php |& logger
Apr 22 16:43:38 Tower ntpd[1506]: Listen normally on 3 docker0 172.17.0.1:xxx
Apr 22 16:43:38 Tower ntpd[1506]: new interface(s) found: waking up resolver
Apr 22 16:43:41 Tower root: Updating templates...
Apr 22 16:43:41 Tower root: Warning: file_get_contents(): Filename cannot be empty in /usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php on line 146
Apr 22 16:43:50 Tower root: Updating info... Done.
Apr 22 16:43:50 Tower emhttp: nothing to sync
Apr 22 16:43:50 Tower rc.unRAID[16297][16298]: Processing /etc/rc.d/rc.unRAID.d/ start scripts.
Apr 22 16:45:41 Tower kernel: mdcmd (45): spindown 6

<<<attempted stop array>>>
Apr 22 16:47:06 Tower emhttp: error: cmdStop: missing csrf_token
Apr 22 16:47:10 Tower kernel: mdcmd (46): spindown 7
Apr 22 16:47:19 Tower kernel: mdcmd (47): spindown 1

 

 

tower-diagnostics-20170422-1644.zip

Link to comment
1 minute ago, dtempleton said:

I'm having what might be the same issue.  On 6.3.2 I could not stop the array (gave:  Tower emhttp: error: cmdStop: missing csrf_token) and could not reboot from the Main web GUI window (gave: Tower root: error: webGui/include/Boot.php: missing csrf_token).  Actually the reboot button killed the webGUI and I had to reboot from the terminal using powerdown -r.

IIRC, Dynamix System Buttons *may* have this particular issue.  It still works, but its just a logging abnormality for it.   May just be a low priority for @bonienl to take care of as I believe he is busy with other important unRaid items.  The only quote quote official way quote quote  of rebooting / stopping / etc is from the Main tab, array operations.

Link to comment

I get this error when Tools => Active Streams => User Names

When I put text (so I know what PC) in the User Name box for an IP then hit Apply, I get the following each time.

Recently upgraded (clean upgrade) from V5

 

Apr 22 18:20:31 Tower root: error: update.php: missing csrf_token
Apr 22 18:20:44 Tower root: error: update.php: missing csrf_token

 

Link to comment
36 minutes ago, graywolf said:

I get this error when Tools => Active Streams => User Names

When I put text (so I know what PC) in the User Name box for an IP then hit Apply, I get the following each time.

Recently upgraded (clean upgrade) from V5

 

Apr 22 18:20:31 Tower root: error: update.php: missing csrf_token
Apr 22 18:20:44 Tower root: error: update.php: missing csrf_token

 

Yup... @bonienl needs to update Active Streams... Doesn't save the Name either...

  • Upvote 1
Link to comment
5 hours ago, Squid said:

Downgrading to 6.2.4 only means that you have to delete and recreate your docker.img file.  A very painless procedure that takes 30 seconds

 

As for your symptoms:

 

#1,  #4 - This sounds like your cache drive has dropped off line.  You need to post your diagnostics after these symptoms appear

#3 - This sounds like your flash drive and/or port its plugged into is flakey.  (Search the forums here for "bread").

 

Last unnumbered sympton:  Once again sounds like either cache drive dropped off line or your minimum allocation settings are biffed.

 

Your csrf errors:

 

You've got both missing csrf and wrong csrf errors.  You never answered whether or not you are running stuff on your phone like margarita / controlR.

 

Thank you for your reply, I had a honey-do list to take care of today, else I would have replied much sooner.

#1, #4 - Perhaps.  I only use the cache drive for dockers, fwiw.

#3 - This may be, I'll search for the forums for sure.  Hopefully not the port, but if anything the thumb drive.  I mean it's possible, it's been in use now for, well, 4-5 years?

Just to recap:

 

I upgraded to 6.3.3 from 6.2.4 roughly a week ago I guess it was.  Rebooted server, all was well with the world.  Then the electricity went out a day (or two now?), I suspect it did a clean shutdown (UPS), as it had turned off.  Had my son power up the server, things seemed well, but upon my return I noticed all mapped drives on my Win7 machine weren't able to reconnect and I cannot even browse to "tower" without Win7 wanting credentials.  Upon looking in the logs to see if there may have been a clue as to why this was happening, I noticed the token error every minute.  I provided a diagnostics (second post) after I noticed all this happening and made my OP.

I did not yet provide a diagnostics after the "not enough space" errors though, I honestly, plum forgot, my bad.  Which plugin

I am not running Margarita / controlR (not even sure what the latter is, though I assume another Android/Iphone based app?  if so, then indeed, neither are being run, at least not to my authority and knowledge).  Just myself, my wife and two children.  I'm the only one with access to the server (authorized anyway) directly, the wife and children only via Plex to their Roku's (PMS is docker on this unraid box).


Looking at the log CA is out of date, can't remember what date v6.3 was released though, so it may not be CA.



I can only say, on my end, it displays as all plugins (and dockers) as being up to date.  Well at least as of this morning, I admit, I just got home and haven't checked again, though I plan on doing that immediately following this reply for sure.

I am attaching an up to this minute diagnostics.  I only edited disk.cfg and flash.cfg to mask the usernames (though keeping a consistent masking convention throughout).

I want to thank everyone participating in this thread offering assistance, if there is anything else I can do/try, offer, etc. please dont hesitate.  Seriously!

tower-diagnostics-20170422-1932.zip

Link to comment

To add, interestingly enough, as of last evening/this morning, all dockers were up to date.  PlexPy, Radarr, Sonarr, Plex and Sabnzbd had updates ready upon checking just a moment ago.  So in case it does matter, when looking at the updated diagnostics I provided above, know that I have updated them just this moment.  They're all linuxserver's dockers fwiw.

Link to comment

Samba issue is, at this time at least, resolved.

In an attempt to try nearly whatever I could.  I deleted all users aside from root.  Then I ran the permissions script.  Now I can click on "Tower" from the Network (workgroup) within Windows Explorer and access it again.  Also my mapped drives to "Tower" are working again as well without being prompted for credentials.  I don't know the why's or how's precisely, that made this do the trick, but, at least for now, it's working.  So I'll take that. :)

 

Now only the token error remains.  Which, while it doesn't seem to affect anything, sure does fill up the log files and besides, being an "error", I would of course rather resolve it.  I'll keep digging, trying and listening to advice.

Link to comment
7 hours ago, Squid said:

IIRC, Dynamix System Buttons *may* have this particular issue.  It still works, but its just a logging abnormality for it.   May just be a low priority for @bonienl to take care of as I believe he is busy with other important unRaid items.  The only quote quote official way quote quote  of rebooting / stopping / etc is from the Main tab, array operations.

Thanks, Squid, but I'm still a little confused.  "System Buttons" is a routine within Dynamix WebGUI? I don't see it as a tool or an app.  I also don't know about 'Active Streams' but it sounds like it could be useful.

 

Without the function of Dynamix I don't see a means of having the server on but the array unmounted,or 'officially' being able to restart the server.  I might place this basic functionality at a somewhat higher priority than making the server a gaming platform. I will appreciate when @bonienl can update this builtin function.

 

I've followed the debate about whether we will need or use the powerdown script in future.  The reboot button has never been reliable in my experience.  For two years I maintained my server remotely from 5000 miles away using powerdown via ssh (and an occasional call to a friend to push the reset button).  They will take my powerdown script away from me when they pry it from my cold, dead fingers.

 

Thanks again,

 

Dennis

 

 

 

Edited by dtempleton
typo
Link to comment

'System Buttons' is a plugin and as such not part of the official unRAID release enemy though it shares the Dynamix branding.    The unRAID 'main' tab already includes buttons that allow for the stopping/starting the array and powering the system off or rebooting so 'System Buttons' is not really necessary, but just a nice-to-have.

  • Upvote 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.