Portainer Error

  • Hi All,


    I am facing some issue with Portainer, I am not able to open the enviroment getting the message

    'Failed loading environment invalid character '\x00' after top-level value'


    If I create a 2nd envirmont it works but all stacks can't be modified.


    Thanks

  • How did you install portainer? Most of the Google hits are talking about an entry point error, and most like you notice, said if they reinstalled it was fine.


    Unfortunately for you, you have several stacks there, like you said. Do you have a data folder mapped for portainer? I'm assuming not or I don't think this would happen.


    (This probably makes a good case for backing up your docker-compose files when they work how you want them.. I have all mine backed up)

    Air Conditioners are a lot like PC's... They work great until you open Windows.


    Edited 2 times, last by KM0201 ().

  • If you can't get it resolved, last thing is deleting portainer, reinstall it and make sure you have a /data directory set. Before doing that, you could use autocompose to create compose files off your running containers... Then just redploy those stacks in the new portainer and you should be able to edit them.


    Read Zoki posts here on autocompose.


    OMV on Raspberry and SD Card full!

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • Thanks,


    I have all my compose files backuped, and I even see them on the server and in the dB but the error is showing, any idea how to add them in the new environment, I mean switching the limited stacks to include my compose files, to be able to deploy or change


    Can I edit the Portainer dB, the compose data are in clear text inside but I am not sure how to edit the file

  • Did you create your stacks from inside portainer ind suddenly it stopped working or did you create the stacks outside portainer? Portainer can only edit stacks, which are created from inside portainer.


    Unfortunately the file portainer.db (inside the portainer_data volume) is not text, so not editable with an editor.


    If you have everything you need to recreate the stacks, just get rid of portainer and reinstall. Maybe you have to delete the portainer_data volume manually after removing portainer.

    If you got help in the forum and want to give something back to the project click here and write up your solution for others.

  • I created all stacks from portainer, out of the blues I go this error and it stopped resolving the enviroment


    I did reinstall portainer, nothing happem and seems that my only options is either to find an old backup of the db or deleting all my stacks and recomposing them again :(

  • Zoki Thanks for your comment can you clarify if you mean the limited one or the old one( this is not and just throwing the error)


    I didn’t find any option for export or maybe it is not clear for me

    Read the thread I linked you to, that's what he's referring to I do believe. Unfortunately I don't think there's a way you're going to get to where you can edit your current stacks.


    The only way I know to accomplish what you're doing,


    Like I said, if it were me, I'd just delete portainer, reinstall it w/ docker-run or docker-compose (assuming you used the OMV button before), and make sure you set a /data volume for it. It will show your running containers, then just delete your stacks 1 x 1 (which will also delete the container, and redeploy them (since you have them backed up). As long as your /config directories are right, you point at the same directories, etc.. it *should* redeploy like nothing ever happened (at least that's been my experience when I tested scenarios like this).

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • KM0201 is right on the pointer to export the stacks.


    By removing and reinstalling portainer you probably destroied the old portainer_data volume. If not


    docker run --rm -it -v portainer_data:/portainer_data ubuntu wil log you into a ubuntu container with the portainer data mounted to /portainer_data. check the folder /portainer_data/container (I think it is spelled like this) if there is something worth to keep.

    If you got help in the forum and want to give something back to the project click here and write up your solution for others.

  • Here's how I always install portainer... Obviously it doesn't help you in your situation now, but it may as you move forward.


    As root/sudo or as a user in your docker group..


    mkdir portainer

    cd portainer

    touch docker-compose.yml

    nano docker-compose.yml


    Adjust the "/data" volume below to your needs.

    Cntrl X, then Y, then Enter to save

    docker-compose up -d


    As long as you always point at your /data correctly.. Portainer will always be 100% the same when you redeploy it with that compose file. Passwords and usernames, stacks can be edited, configurations, etc... even if your

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • thanks all,


    I manage to restored an old full dd of my OS before the issues to a new usb, copied my portainer.db to my installation and now everything is working :)


    I will make sure to check my Dublicati backups, it would have helped but was also courrepted.


    Thanks again

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!