Skip to content
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

Error when running docker-compose up #8

Open
abishekrsrikaanth opened this issue Oct 13, 2020 · 8 comments
Open

Error when running docker-compose up #8

abishekrsrikaanth opened this issue Oct 13, 2020 · 8 comments
Labels
question Further information is requested

Comments

@abishekrsrikaanth
Copy link

I get the following error when I run docker-compose up.

Creating network "janus_default" with the default driver
Creating janus_janus-gateway_1 ... error

ERROR: for janus_janus-gateway_1  Cannot start service janus-gateway: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/Users/abisheksrikaanth/projects/janus/etc/janus/janus.jcfg\\\" to rootfs \\\"/var/lib/docker/overlay2/55ac8c94564eb9f452cf24add575444d7e92676c900bc183b3576bc97c04d137/merged\\\" at \\\"/var/lib/docker/overlay2/55ac8c94564eb9f452cf24add575444d7e92676c900bc183b3576bc97c04d137/merged/usr/local/etc/janus/janus.jcfg\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for janus-gateway  Cannot start service janus-gateway: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/Users/abisheksrikaanth/projects/janus/etc/janus/janus.jcfg\\\" to rootfs \\\"/var/lib/docker/overlay2/55ac8c94564eb9f452cf24add575444d7e92676c900bc183b3576bc97c04d137/merged\\\" at \\\"/var/lib/docker/overlay2/55ac8c94564eb9f452cf24add575444d7e92676c900bc183b3576bc97c04d137/merged/usr/local/etc/janus/janus.jcfg\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

Here is the contents of my docker-compose.yml

version: '2.1'
services:

  #
  # janus-gateway
  #
  janus-gateway:
    image: 'canyan/janus-gateway:latest'
    command: [ "/usr/local/bin/janus", "-F", "/usr/local/etc/janus" ]
    ports:
      - "8088:8088"
      - "8089:8089"
      - "8889:8889"
      - "8000:8000"
      - "7088:7088"
      - "7089:7089"
    volumes:
      - "./etc/janus/janus.jcfg:/usr/local/etc/janus/janus.jcfg"
      - "./etc/janus/janus.eventhandler.sampleevh.jcfg:/usr/local/etc/janus/janus.eventhandler.sampleevh.jcfg"
    restart: always

Am I missing something?

@tranchitella
Copy link
Contributor

@abishekrsrikaanth are you sure the following paths, relative to the current path of your docker-compose.yaml files, are files?

  • etc/janus/janus.jcfg
  • etc/janus/janus.eventhandler.sampleevh.jcfg

@tranchitella tranchitella added the question Further information is requested label Nov 2, 2020
@iwin4aids
Copy link

@abishekrsrikaanth are you sure the following paths, relative to the current path of your docker-compose.yaml files, are files?

  • etc/janus/janus.jcfg
  • etc/janus/janus.eventhandler.sampleevh.jcfg

but how to configure these jcfg files ? any docs ?

@tranchitella
Copy link
Contributor

@abishekrsrikaanth are you sure the following paths, relative to the current path of your docker-compose.yaml files, are files?

  • etc/janus/janus.jcfg
  • etc/janus/janus.eventhandler.sampleevh.jcfg

but how to configure these jcfg files ? any docs ?

Please refer to upstream documentation, we only provide the Docker image.
For your preliminary testing, please omit the volume mounts in your docker-compose to start Janus with the default configuration.

@makidoll
Copy link

I don't know if this helps but OCI runtime create failed always happens for me when I update my Linux kernel and haven't restarted my machine yet.

@ajaxsys
Copy link

ajaxsys commented Dec 13, 2020

Tried sample config files from
https://github.com/meetecho/janus-gateway/tree/master/conf

but got errors:

janus-gateway_1 | [FATAL] [janus.c:main:5115] Couldn't access plugins folder...

And remove volumes mapping seems no error, but what about next? Tried access all ports form browser but nothing.

As a beginner I just try to run and see what happen.

@pleymor
Copy link

pleymor commented Dec 15, 2020

Exact same issues.

For the first, instead of just removing the volumes, I changed docker-compose version (check which one is supported by your docker machine).

version: '3.8'
services:

  #
  # janus-gateway
  #
  janus-gateway:
    image: 'canyan/janus-gateway:latest'
    command: ["/usr/local/bin/janus", "-F", "/usr/local/etc/janus"]
    ports:
      - "8088:8088"
      - "8089:8089"
      - "8889:8889"
      - "8000:8000"
      - "7088:7088"
      - "7089:7089"
    volumes:
      - "./etc/janus/janus.jcfg:/usr/local/etc/janus/janus.jcfg"
      - "./etc/janus/janus.eventhandler.sampleevh.jcfg:/usr/local/etc/janus/janus.eventhandler.sampleevh.jcfg"
    restart: always

For the FATAL: I solved it by copying the janus.jcfg janus.eventhandler.sampleevh.jcfg files from the official sample here to ./etc/janus (remove the extension .sample)

Then edit ./etc/janus/janus.jcfg this way:

general: {
	configs_folder = "/usr/local/etc/janus"			# Configuration files folder
	plugins_folder = "/usr/local/lib/janus/plugins"			# Plugins folder
	transports_folder = "/usr/local/lib/janus/transports"	# Transports folder
	events_folder = "/usr/local/lib/janus/events"			# Event handlers folder
	loggers_folder = "/usr/local/lib/janus/loggers"			# External loggers folder

Then docker-compose up -d

Worked for me ^^

@hotsmile
Copy link

hotsmile commented Mar 3, 2023

Exact same issues.

For the first, instead of just removing the volumes, I changed docker-compose version (check which one is supported by your docker machine).

version: '3.8'
services:

  #
  # janus-gateway
  #
  janus-gateway:
    image: 'canyan/janus-gateway:latest'
    command: ["/usr/local/bin/janus", "-F", "/usr/local/etc/janus"]
    ports:
      - "8088:8088"
      - "8089:8089"
      - "8889:8889"
      - "8000:8000"
      - "7088:7088"
      - "7089:7089"
    volumes:
      - "./etc/janus/janus.jcfg:/usr/local/etc/janus/janus.jcfg"
      - "./etc/janus/janus.eventhandler.sampleevh.jcfg:/usr/local/etc/janus/janus.eventhandler.sampleevh.jcfg"
    restart: always

For the FATAL: I solved it by copying the janus.jcfg janus.eventhandler.sampleevh.jcfg files from the official sample here to ./etc/janus (remove the extension .sample)

Then edit ./etc/janus/janus.jcfg this way:

general: {
	configs_folder = "/usr/local/etc/janus"			# Configuration files folder
	plugins_folder = "/usr/local/lib/janus/plugins"			# Plugins folder
	transports_folder = "/usr/local/lib/janus/transports"	# Transports folder
	events_folder = "/usr/local/lib/janus/events"			# Event handlers folder
	loggers_folder = "/usr/local/lib/janus/loggers"			# External loggers folder

Then docker-compose up -d

Worked for me ^^

how to access http service , when i use your cfg file, but i can't access the janus http service, please help me ,thks

@snowlyg
Copy link

snowlyg commented Nov 9, 2024

Exact same issues.

For the first, instead of just removing the volumes, I changed docker-compose version (check which one is supported by your docker machine).

version: '3.8'
services:

  #
  # janus-gateway
  #
  janus-gateway:
    image: 'canyan/janus-gateway:latest'
    command: ["/usr/local/bin/janus", "-F", "/usr/local/etc/janus"]
    ports:
      - "8088:8088"
      - "8089:8089"
      - "8889:8889"
      - "8000:8000"
      - "7088:7088"
      - "7089:7089"
    volumes:
      - "./etc/janus/janus.jcfg:/usr/local/etc/janus/janus.jcfg"
      - "./etc/janus/janus.eventhandler.sampleevh.jcfg:/usr/local/etc/janus/janus.eventhandler.sampleevh.jcfg"
    restart: always

For the FATAL: I solved it by copying the janus.jcfg janus.eventhandler.sampleevh.jcfg files from the official sample here to ./etc/janus (remove the extension .sample)

Then edit ./etc/janus/janus.jcfg this way:

general: {
	configs_folder = "/usr/local/etc/janus"			# Configuration files folder
	plugins_folder = "/usr/local/lib/janus/plugins"			# Plugins folder
	transports_folder = "/usr/local/lib/janus/transports"	# Transports folder
	events_folder = "/usr/local/lib/janus/events"			# Event handlers folder
	loggers_folder = "/usr/local/lib/janus/loggers"			# External loggers folder

Then docker-compose up -d

Worked for me ^^

Nice, it worked for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants