PennAssuranceSoftware / oipa

Dockerized Oracle Insurance Policy Administration
0 stars 3 forks source link

Error Starting Eclipse Sometimes #11

Open jeromebridge opened 5 years ago

jeromebridge commented 5 years ago

Sometimes Eclipse fails to start with the following error:

ssh: connect to host eclipse port 22: Connection refused
Warning: the ECDSA host key for 'eclipse' differs from the key for the IP address '192.168.2.5'
Offending key for IP in /home/ubuntu/.ssh/known_hosts:3
Matching host key in /home/ubuntu/.ssh/known_hosts:8
su: must be run from a terminal

(java:68): Gdk-ERROR **: The program 'java' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 205 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
jeromebridge commented 5 years ago

Found this page. Might be relevant. https://lists.freedesktop.org/archives/xorg/2006-June/015838.html

xdpyinfo -queryExt | less

Find your request code from the error message.

Also see this. https://liquidat.wordpress.com/2016/07/06/short-tip-workaround-mit-shm-error-when-starting-qtkde-apps-with-sudo/

jeromebridge commented 5 years ago

Using the ipc configuration in docker compose eventually worked for me as described here: https://github.com/osrf/docker_images/issues/21. Example:

  eclipse:
    build:
      context: .
      dockerfile: Dockerfile
    networks:
      - developer
    ipc: host
    volumes:
      - eclipse_workspace:/home/developer/eclipse-workspace
      - eclipse_prefs:/home/developer/.eclipse
      - m2:/home/developer/.m2
      - ${HOST_DIR}:/home/developer/git/yet-another-admin-system
      - ${HOST_GITCONFIG}:/home/developer/.gitconfig
      - scratch:/home/developer/scratch
      - ssh:/home/developer/ssh
    environment:
      - USER_UID=${USER_UID:-}
      - USER_GID=${USER_GID:-}
      - QT_X11_NO_MITSHM=1