Che: Eclipse Che extension doesn't get loaded using Docker for Mac

Created on 7 Dec 2016  路  6Comments  路  Source: eclipse/che

We did set CHE_ASSEMBLY env var correctly pointing to our extension che assembly, but no matter how we tried, it just did not show up in the eclipse che IDE. It did work if we switched to mac virtualbox docker.

Reproduction Steps:

  1. build a helloworld eclipse che extension following these steps: https://eclipse-che.readme.io/docs/helloworld-extension. Or you can clone my examples: https://github.com/guiguan/che, and https://github.com/guiguan/che-helloworld-sample. Remember to mvn clean install _che-helloworld-sample_ first then _che_
  2. export CHE_ASSEMBLY={path_to_che_assembly_assembly-main/target/eclipse-che-{che_version}/eclipse-che-{che_version}}
  3. che start
  4. visit localhost:8080, and create a workspace

Expected behavior:

"Hello World" notification should be displayed in the list of events

Observed behavior:

No "Hello World" printed

Che version: tried nightly, latest, 5.0.0-M7, and none of them worked on Docker for Mac
OS and version: macOS 10.12.1
Docker version: 1.12.3
Che install: Docker container

Additional information:

  • Problem started happening recently, didn't happen in an older version of Che: No
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
kinquestion

All 6 comments

Hi @guiguan,

We would need a bit more inputs in order to help you.
It seems you are doing right, but to be 100% sure we would need the outputs displayed when you are starting your Che from the CLI.

It can also just be a cache issue with the browser you are using.

@slemeur thanks for the quick response. Here are the outputs:

docker4mac (docker for mac)

doesn't work

cmd to start eclipse che

Laurel-MBP16E:che guiguan$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
Laurel-MBP16E:che guiguan$ export CHE_ASSEMBLY=/Users/guiguan/Documents/Projects/SBS/che-helloworld-sample-che/assembly/assembly-main/target/eclipse-che-5.0.0-M8-SNAPSHOT/eclipse-che-5.0.0-M8-SNAPSHOT
Laurel-MBP16E:che guiguan$ ls `echo $CHE_ASSEMBLY`
LICENSE   README    bin       conf      lib       plugins   sdk       stacks    storage   templates tomcat
Laurel-MBP16E:che guiguan$ che start
WARNING: No kernel memory limit support
INFO: ECLIPSE CHE: Found image eclipse/che-server:nightly
INFO: ECLIPSE CHE: Starting container...
INFO: ECLIPSE CHE: Server logs at "docker logs -f che-server"
INFO: ECLIPSE CHE: Server booting...
INFO: ECLIPSE CHE: Booted and reachable
INFO: ECLIPSE CHE: Ver: 5.0.0-M8-SNAPSHOT
INFO: ECLIPSE CHE: Use: http://localhost:8080
INFO: ECLIPSE CHE: API: http://localhost:8080/swagger
Laurel-MBP16E:che guiguan$ che info
WARNING: No kernel memory limit support
INFO:  ---------------------------------------
INFO:  -------------   CLI INFO   ------------
INFO:  ---------------------------------------
INFO:  
INFO:  ---------  PLATFORM INFO  -------------
INFO:  CLI DEFAULT PROFILE       = not set
INFO:  CHE_VERSION               = nightly
INFO:  CHE_CLI_VERSION           = latest
INFO:  CHE_UTILITY_VERSION       = nightly
INFO:  DOCKER_INSTALL_TYPE       = docker4mac
INFO:  DOCKER_HOST_IP            = 192.168.65.2
INFO:  IS_NATIVE                 = NO
INFO:  IS_WINDOWS                = NO
INFO:  IS_DOCKER_FOR_WINDOWS     = NO
INFO:  IS_DOCKER_FOR_MAC         = YES
INFO:  IS_BOOT2DOCKER            = NO
INFO:  HAS_DOCKER_FOR_WINDOWS_IP = NO
INFO:  IS_MOBY_VM                = YES
INFO:  HAS_CHE_ENV_VARIABLES     = YES
INFO:  HAS_TEMP_CHE_PROPERTIES   = NO
INFO:  IS_INTERACTIVE            = YES
INFO:  IS_PSEUDO_TTY             = YES
INFO:  
INFO: ---------------------------------------
INFO: ---------   LAUNCHER INFO  ------------
INFO: ---------------------------------------
INFO: 
INFO: ---------  PLATFORM INFO  -------------
INFO: DOCKER_INSTALL_TYPE       = docker4mac
INFO: DOCKER_HOST_OS            = Alpine Linux v3.4
INFO: DOCKER_HOST_IP            = 192.168.65.2
INFO: DOCKER_HOST_EXTERNAL_IP   = localhost
INFO: DOCKER_DAEMON_VERSION     = 1.12.3
INFO: 
INFO: 
INFO: --------- CHE INSTANCE LIST  ----------
INFO: 
INFO: --------- CHE INSTANCE: 91aed027a4d2
INFO: CHE SERVER CONTAINER NANE = che-server
INFO: CHE CONTAINER EXISTS      = YES
INFO: CHE CONTAINER STATUS      = running
INFO: CHE SERVER STATUS         = running & api reachable
INFO: CHE VERSION               = 5.0.0-M8-SNAPSHOT
INFO: CHE IMAGE                 = eclipse/che-server:nightly
INFO: CHE CONF                  = not set
INFO: CHE DATA                  = not set
INFO: CHE USE URL               = http://192.168.65.2:8080
INFO: CHE API URL               = http://192.168.65.2:8080/swagger
INFO: CHE LOGS                  = run `docker logs -f che-server`
INFO: 
INFO: 
INFO: ----  CURRENT COMMAND LINE OPTIONS  ---
INFO: CHE_VERSION               = nightly
INFO: CHE_DATA                  = /home/user/che
INFO: CHE_CONF                  = not set
INFO: CHE_ASSEMBLY              = /Users/guiguan/Documents/Projects/SBS/che-helloworld-sample-che/assembly/assembly-main/target/eclipse-che-5.0.0-M8-SNAPSHOT/eclipse-che-5.0.0-M8-SNAPSHOT
INFO: CHE_PORT                  = 8080
INFO: CHE_HOST_IP               = 192.168.65.2
INFO: CHE_RESTART_POLICY        = no
INFO: CHE_USER                  = root
INFO: CHE_LOG_LEVEL             = info
INFO: CHE_DEBUG_SERVER          = false
INFO: CHE_DEBUG_SERVER_PORT     = 8000
INFO: CHE_HOSTNAME              = localhost
INFO: CHE_SERVER_CONTAINER_NAME = che-server
INFO: CHE_SERVER_IMAGE_NAME     = eclipse/che-server

screenshot

no "Hello World" printed
https://cl.ly/1z1i3z2c2U3o

boot2docker (virtualbox docker)

does work

cmd to start eclipse che

Laurel-MBP16E:che guiguan$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
Laurel-MBP16E:che guiguan$ export CHE_ASSEMBLY=/Users/guiguan/Documents/Projects/SBS/che-helloworld-sample-che/assembly/assembly-main/target/eclipse-che-5.0.0-M8-SNAPSHOT/eclipse-che-5.0.0-M8-SNAPSHOT
Laurel-MBP16E:che guiguan$ ls `echo $CHE_ASSEMBLY`
LICENSE   README    bin       conf      lib       plugins   sdk       stacks    storage   templates tomcat
Laurel-MBP16E:che guiguan$ che start
INFO: ECLIPSE CHE: Found image eclipse/che-server:nightly
INFO: ECLIPSE CHE: Starting container...
INFO: ECLIPSE CHE: Server logs at "docker logs -f che-server"
INFO: ECLIPSE CHE: Server booting...
INFO: ECLIPSE CHE: Booted and reachable
INFO: ECLIPSE CHE: Ver: 5.0.0-M8-SNAPSHOT
INFO: ECLIPSE CHE: Use: http://192.168.99.100:8080
INFO: ECLIPSE CHE: API: http://192.168.99.100:8080/swagger
Laurel-MBP16E:che guiguan$ che info
INFO:  ---------------------------------------
INFO:  -------------   CLI INFO   ------------
INFO:  ---------------------------------------
INFO:  
INFO:  ---------  PLATFORM INFO  -------------
INFO:  CLI DEFAULT PROFILE       = not set
INFO:  CHE_VERSION               = nightly
INFO:  CHE_CLI_VERSION           = latest
INFO:  CHE_UTILITY_VERSION       = nightly
INFO:  DOCKER_INSTALL_TYPE       = boot2docker
INFO:  DOCKER_HOST_IP            = 192.168.99.100
INFO:  IS_NATIVE                 = NO
INFO:  IS_WINDOWS                = NO
INFO:  IS_DOCKER_FOR_WINDOWS     = NO
INFO:  IS_DOCKER_FOR_MAC         = NO
INFO:  IS_BOOT2DOCKER            = YES
INFO:  HAS_DOCKER_FOR_WINDOWS_IP = NO
INFO:  IS_MOBY_VM                = NO
INFO:  HAS_CHE_ENV_VARIABLES     = YES
INFO:  HAS_TEMP_CHE_PROPERTIES   = NO
INFO:  IS_INTERACTIVE            = YES
INFO:  IS_PSEUDO_TTY             = YES
INFO:  
INFO: ---------------------------------------
INFO: ---------   LAUNCHER INFO  ------------
INFO: ---------------------------------------
INFO: 
INFO: ---------  PLATFORM INFO  -------------
INFO: DOCKER_INSTALL_TYPE       = boot2docker
INFO: DOCKER_HOST_OS            = Boot2Docker 1.12.3 (TCL 7.2); HEAD : 7fc7575 - Thu Oct 27 17:23:17 UTC 2016
INFO: DOCKER_HOST_IP            = 192.168.99.100
INFO: DOCKER_HOST_EXTERNAL_IP   = not set
INFO: DOCKER_DAEMON_VERSION     = 1.12.3
INFO: 
INFO: 
INFO: --------- CHE INSTANCE LIST  ----------
INFO: 
INFO: --------- CHE INSTANCE: 90534bb672f6
INFO: CHE SERVER CONTAINER NANE = che-server
INFO: CHE CONTAINER EXISTS      = YES
INFO: CHE CONTAINER STATUS      = running
INFO: CHE SERVER STATUS         = running & api reachable
INFO: CHE VERSION               = 5.0.0-M8-SNAPSHOT
INFO: CHE IMAGE                 = eclipse/che-server:nightly
INFO: CHE CONF                  = not set
INFO: CHE DATA                  = not set
INFO: CHE USE URL               = http://192.168.99.100:8080
INFO: CHE API URL               = http://192.168.99.100:8080/swagger
INFO: CHE LOGS                  = run `docker logs -f che-server`
INFO: 
INFO: 
INFO: ----  CURRENT COMMAND LINE OPTIONS  ---
INFO: CHE_VERSION               = nightly
INFO: CHE_DATA                  = /home/user/che
INFO: CHE_CONF                  = not set
INFO: CHE_ASSEMBLY              = /Users/guiguan/Documents/Projects/SBS/che-helloworld-sample-che/assembly/assembly-main/target/eclipse-che-5.0.0-M8-SNAPSHOT/eclipse-che-5.0.0-M8-SNAPSHOT
INFO: CHE_PORT                  = 8080
INFO: CHE_HOST_IP               = 192.168.99.100
INFO: CHE_RESTART_POLICY        = no
INFO: CHE_USER                  = root
INFO: CHE_LOG_LEVEL             = info
INFO: CHE_DEBUG_SERVER          = false
INFO: CHE_DEBUG_SERVER_PORT     = 8000
INFO: CHE_HOSTNAME              = 192.168.99.100
INFO: CHE_SERVER_CONTAINER_NAME = che-server
INFO: CHE_SERVER_IMAGE_NAME     = eclipse/che-server

screenshot

"Hello world" printed
https://cl.ly/2v1T0O3M1710

For Google Chrome: open browser page with IDE, open chrome developer tools by F12, select "Network", mark checkbox "Disable cash". After that stop workspace, refresh page and start workspace again.
disable_cash

@AndrienkoAleksandr Yep, it works! Do we have to do this for every new extension?

This checkbox works for all Chrome browser tabs and after restart browser too. If you don't want use it, you should periodically(when you have a problem) clean up cash by application domain:
for Google Chrome open development tools by F12 , move cursor to page reload button (with circle arrow above browser page) click and hold this button until appear drop-down menu, select in the menu "Empty Cache and Hard Reload". See more: http://superuser.com/questions/278948/clear-cache-for-specific-domain-name-in-chrome
Problems with cash is depends on tools which are you using for development. Sometimes all works fine, sometimes you have a problem with cash.

I see. Thanks for those nice tips, and I like your "cash", LOL. You can close this issue now :)

Was this page helpful?
0 / 5 - 0 ratings