Anbox service not starting after fresh install. #5

Closed
maxolasersquad opened this Issue Apr 11, 2017 · 8 comments

Comments

Projects
None yet
2 participants

Make sure you are running the latest version of Anbox before reporting an issue.

Anbox release (anbox version) and system info (anbox system-info):

$ sudo anbox version
anbox 0.1.0

$ sudo anbox system-info
runtime/cgo: pthread_create failed: Resource temporarily unavailable
version: 0.1.0
os:
  name: Ubuntu Core
  version: 16
  snap-based: true
kernel:
  version: Linux version 4.4.0-72-generic (buildd@lcy01-17) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017
  binder: true
  ashmem: true
graphics:
  egl:
    vendor: Mesa Project
    version: 1.4 (DRI2)
    extensions:
      - EGL_CHROMIUM_sync_control
      - EGL_EXT_create_context_robustness
      - EGL_EXT_image_dma_buf_import
      - EGL_KHR_create_context
      - EGL_KHR_fence_sync
      - EGL_KHR_get_all_proc_addresses
      - EGL_KHR_gl_renderbuffer_image
      - EGL_KHR_gl_texture_2D_image
      - EGL_KHR_gl_texture_cubemap_image
      - EGL_KHR_image
      - EGL_KHR_image_base
      - EGL_KHR_image_pixmap
      - EGL_KHR_reusable_sync
      - EGL_KHR_surfaceless_context
      - EGL_KHR_wait_sync
      - EGL_MESA_configless_context
      - EGL_MESA_drm_image
      - EGL_MESA_image_dma_buf_export
      - EGL_NOK_swap_region
      - EGL_NOK_texture_from_pixmap
      - EGL_NV_post_sub_buffer
      - EGL_WL_bind_wayland_display
  gles2:
    vendor: Intel Open Source Technology Center
    vendor: OpenGL ES-CM 1.1 Mesa 12.0.6
    extensions:
      - GL_EXT_blend_minmax
      - GL_EXT_multi_draw_arrays
      - GL_EXT_texture_filter_anisotropic
      - GL_EXT_texture_lod_bias
      - GL_OES_byte_coordinates
      - GL_OES_fixed_point
      - GL_OES_stencil_wrap
      - GL_OES_compressed_paletted_texture
      - GL_OES_query_matrix
      - GL_OES_read_format
      - GL_OES_single_precision
      - GL_EXT_texture_compression_dxt1
      - GL_OES_draw_texture
      - GL_OES_point_size_array
      - GL_OES_point_sprite
      - GL_EXT_texture_format_BGRA8888
      - GL_OES_compressed_ETC1_RGB8_texture
      - GL_OES_depth24
      - GL_OES_element_index_uint
      - GL_OES_fbo_render_mipmap
      - GL_OES_framebuffer_object
      - GL_OES_mapbuffer
      - GL_OES_rgb8_rgba8
      - GL_OES_stencil8
      - GL_OES_texture_env_crossbar
      - GL_OES_texture_mirrored_repeat
      - GL_OES_texture_npot
      - GL_OES_EGL_image
      - GL_OES_packed_depth_stencil
      - GL_OES_texture_cube_map
      - GL_APPLE_texture_max_level
      - GL_EXT_discard_framebuffer
      - GL_EXT_read_format_bgra
      - GL_OES_blend_equation_separate
      - GL_OES_blend_func_separate
      - GL_OES_blend_subtract
      - GL_OES_EGL_image_external
      - GL_OES_EGL_sync
      - GL_OES_vertex_array_object
      - GL_ANGLE_texture_compression_dxt3
      - GL_ANGLE_texture_compression_dxt5
      - GL_EXT_map_buffer_range
      - GL_KHR_debug
      - GL_OES_surfaceless_context
      - GL_EXT_polygon_offset_clamp

Description of the problem:
Anbox service fails to start.

$ sudo initctl start anbox
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

Expected:
Anbox will start.

Additional info:
No issues where reported during the installation until at the end it tried to start the service.

@morphis morphis added the bug label Apr 11, 2017

Owner

morphis commented Apr 11, 2017

@maxolasersquad Which operating system are you using?

Ubuntu 16.04 64-bit

Owner

morphis commented Apr 11, 2017

Ah, don't run initctl as sudo! You need to run it as a regular user and the anbox-installer doesn't do that too. See https://github.com/anbox/anbox-installer/blob/master/installer.sh#L171

The anbox installer has to run as sudo (right?). So when it tries to run initctl, it's running as root. Am I missing something?

$ snap install --classic anbox-installer && anbox-installer
error: access denied (try with sudo)

$ sudo snap install --classic anbox-installer && anbox-installer
[sudo] password for david: 
anbox-installer 1 from 'morphis' installed
zsh: command not found: anbox-installer

$ sudo snap install --classic anbox-installer
Android in a Box - Installer


IMPORTANT: THIS IS ALPHA LEVEL SOFTWARE. EXPECT INSTABILITY AND
           BUGS !!!!!

IMPORTANT: ALSO PLEASE BE AWARE THAT WE DON'T PROVIDE FULL
           CONFINEMENT FOR THE SNAP YET !!!!
Owner

morphis commented Apr 11, 2017

@maxolasersquad No, the anbox-installer should be run as sudo but I see this is a regular failure people are doing. Just run anbox-installer as regular user. The script will use sudo when needed.

As you can see from my output above, only sudo can see the anbox-installer.

Owner

morphis commented Apr 11, 2017

anbox/anbox-installer#2 should help here.

@maxolasersquad Everyone can see anbox-installer. I guess it's just not in your PATH. Add export PATH=$PATH:/snap/bin and it will work. Otherwise run as /snap/bin/anbox-installer.

Adding that to my path seemed to do the trick. FWIW, the website should probably be updated to indicate that snap install --classic anbox-installer needs sudo, while the other cannot use sudo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment