-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can I get the same workspace which I was working on when I restart Che server. #779
Comments
@kushalmokashi You are not really asking a dumb question. We get this question a couple different times. It's not obvious because the workflow that Che uses today doesn't make this obvious or intuitive. Today, there are a few ways to restart a workspace.
Now there are two ways to restart a workspace - with or without its previous state. Currently, the default operation is to restart the workspace without its previous state. State here is everything that is not your projects. The projects are stored in long term storage, and re-mounted into your workspace each time you start it. But the other state are things like databases, maven repositories, or other file modifications. Today, if you stop the workspace in the default configuration, all of this state is lost. However, you can start a Docker registry, and then instead of stopping the workspace, you can snapshot it. This creates a copy of the internal state and places that image into the registry. Then, in order to open the workspace with this snapshot, you have to create a new workspace off of the snapshot image. You can read the configuration docs on how to set this up. We know that this is really bad user workflow. Because it is just not expected. Snapshots were experimental for a long period of time, so we had this as an alternative experience. Snapshots are now no longer experimental, so we are working on making the default workflow one where snapshots are automatically created when a workspace is stopped, and the latest snapshot is automatically loaded when you restart. Snapshotting a workspace the first time is time and resource consuming. Starting a snapshot is very fast. So we have to handle things in such a way where we prevent the server from shutting off if we are in the middle of a snapshot exercise on a workspace where the user has long disappeared. |
@TylerJewell Thanks for the quick reply. I will try to start a docker registry. and use Snapshot. But as of now immediately I have the following concern.I have a little confusion here. The steps followed by me are as follows -
|
Any existing workspaces and projects should appear in the dashboard if you stop Che and restart it. If they are not appearing then there may be a bigger issue. Are there any errors in the logs? Can you screen shot the dashboard home page? If you have a dashboard that doesn't detect these items, then engineers need to know specifics. |
@TylerJewell Sorry for the delayed response. I have created a workspace and project last night. The log files are attached here : the screen shots of the IDE are attached and they are named as per the functionality : Please let me know if you need any further information or any logs. |
@ashumilova @benoitf Wow - never seen this. Can you investigate? Also - notice that on Firefox, the fonts are not displaying properly. @kushalmokashi Does this problem happen on Chrome? |
@kushalmokashi could you paste result of http://localhost:8080/api/workspace |
@TylerJewell Yes in Chrome also it is the same behavior. [{"id":"workspace84rhbqpbcwn7ohd2","owner":"che","status":"RUNNING","config":{"name":"wksp-vsnq","attributes":{"stackId":"java-default"},"environments":[{"name":"wksp-vsnq","machineConfigs":[{"name":"ws-machine","type":"docker","source":{"location":"http://localhost:8080/ide/api/recipe/recipetynanmbe1iaow28l/script","type":"recipe"},"dev":true,"limits":{"ram":1000},"links":[{"method":"GET","parameters":[{"name":"channel","defaultValue":"workspace84rhbqpbcwn7ohd2:wksp-vsnq:ws-machine","required":true,"valid":[]}],"rel":"get machine logs channel","href":"ws://localhost:8080/ide/api/ws/workspace84rhbqpbcwn7ohd2"},{"method":"GET","parameters":[{"name":"channel","defaultValue":"machine:status:workspace84rhbqpbcwn7ohd2:ws-machine","required":true,"valid":[]}],"rel":"get machine status channel","href":"ws://localhost:8080/ide/api/ws/workspace84rhbqpbcwn7ohd2"}]}]}],"commands":[{"name":"console-java-simple: build","type":"mvn","attributes":{"previewUrl":""},"commandLine":"mvn -f /projects/console-java-simple clean install"},{"name":"console-java-simple: run","type":"mvn","attributes":{"previewUrl":""},"commandLine":"mvn -f /projects/console-java-simple clean install && java -jar /projects/console-java-simple/target/*.jar"}],"projects":[{"name":"console-java-simple","type":"maven","path":"/console-java-simple","attributes":{"maven.artifactId":["console-java-simple"],"maven.packaging":["jar"],"containsJavaFiles":["true"],"maven.resource.folder":[],"maven.parent.version":[""],"maven.test.source.folder":["src/test/java"],"maven.version":["1.0-SNAPSHOT"],"maven.parent.groupId":[""],"languageVersion":["1.8.0_45"],"maven.parent.artifactId":[""],"language":["java"],"maven.source.folder":["src/main/java"],"maven.groupId":["org.eclipse.che.examples"]},"description":"A hello world Java application.","source":{"location":"https://github.com/che-samples/console-java-simple.git","type":"git","parameters":{}},"links":[],"modules":[],"problems":[],"mixins":["git"]}],"defaultEnv":"wksp-vsnq","links":[]},"temporary":false,"links":[{"method":"POST","parameters":[],"rel":"start workspace","href":"http://localhost:8080/ide/api/workspace/workspace84rhbqpbcwn7ohd2/runtime","produces":"application/json"},{"method":"DELETE","parameters":[],"rel":"remove workspace","href":"http://localhost:8080/ide/api/workspace/workspace84rhbqpbcwn7ohd2/config","produces":"application/json"},{"method":"GET","parameters":[],"rel":"get all user workspaces","href":"http://localhost:8080/ide/api/workspace","produces":"application/json"},{"method":"GET","parameters":[],"rel":"get workspace's snapshot","href":"http://localhost:8080/ide/api/workspace/workspace84rhbqpbcwn7ohd2/snapshot","produces":"application/json"},{"method":"GET","parameters":[],"rel":"ide url","href":"http://localhost:8080/ide/wksp-vsnq","produces":"text/html"},{"method":"GET","parameters":[{"name":"channel","defaultValue":"workspace:workspace84rhbqpbcwn7ohd2","required":true,"valid":[]}],"rel":"get workspace events channel","href":"ws://localhost:8080/ide/api/ws/workspace84rhbqpbcwn7ohd2"},{"method":"GET","parameters":[],"rel":"self link","href":"http://localhost:8080/ide/api/workspace/workspace84rhbqpbcwn7ohd2","produces":"application/json"},{"method":"GET","parameters":[],"rel":"get runtime workspace","href":"http://localhost:8080/ide/api/workspace/workspace84rhbqpbcwn7ohd2/runtime","produces":"application/json"},{"method":"DELETE","parameters":[],"rel":"stop workspace","href":"http://localhost:8080/ide/api/workspace/workspace84rhbqpbcwn7ohd2/runtime"}]}] |
@kushalmokashi could you also display the javascript console of your browser ? |
@benoitf The screen shot is the web console when I opened workspace page in Che dashboard. Note: the result which I shared in the last comment is of the Chrome. |
OK, what you could do is stop Che. Go to |
@eivantsov I stopped the server and checked at the mentioned location and workspace.json exists. |
Odds are that Che server looked for workspace storage in the wrong location. Anyway, good to now it worked for you. I'm closing the issue, but feel free to reopen if this particular problem persists. |
I started Che as a docker container (docker for windows) and all workspaces disappear from the dashboard whenever che restarts. I checked http://10.0.75.2:8080/api/workspace and it replies [] right after restart. Please assist. |
@Hin-Fan : Can you tell me how did you restart che? I mean what command did you use? |
@kushalmokashi |
I am going to run an exhaustive set of tests on Windows 10 tomorrow with the docker container for Windows and also cross link multiple issues that seem to have similar problems. |
Hi @kushalmokashi @Hin-Fan - I confirm the issue. Please track progress in issue #1711. |
Thank you very much Tyler. |
@kushalmokashi A fix is coming in 4.5 early next week. Tested this morning and it worked good. |
this is not an issue. this is a question.
I am trying to understand the working of che. This may look like a dumb question.
I am using system with windows OS. I have installed the che server in this local system with the help of the installer. So the che server , browser and VM(which contains the docker container) are in the same machine.
Now when I start the che server and run this URL "http://localhost:8080/dashboard/" in the browser, I am able to see the dashboard. And also I am able to create the workspace and projects.
But when I restart the che server and run this URL "http://localhost:8080/dashboard/" again,
at this time how can I get/access the workspace and projects which I have created earlier.??
The documents which you have provided are very good. But I feel I am somehow failing to understand this.
Thanks for the help.
The text was updated successfully, but these errors were encountered: