pajikos / sms-gammu-gateway

Simple SMS REST API gateway for sending SMS from gammu supported devices
Apache License 2.0
116 stars 31 forks source link

Docker version doesn't start correctly #21

Closed blacklopo closed 3 years ago

blacklopo commented 3 years ago

I tried to launch docker variant, but the service on port 5000 is not started. Serial device should be ok - tested by minicom.

sudo docker run -d -p 5000:5000 --device=/dev/ttyUSB0:/dev/mobile pajikos/sms-gammu-gateway

After execution only docker_id is returned: 09e33694d8cb50f1ddd438e1bc055c8391f052d311504e13f539ea6795b027e7

Is possible to somehow debug this situation?

jjanderson commented 3 years ago

What is in the logs? I use portainer and the logs are easy to see. It is more than likely 1 of 3 things:

  1. the port is already in use by another application.
  2. you have not configured gammu to the correct usb location (dev/tty….)
  3. Your modem is in the incorrect mode or it is incompatible
blacklopo commented 3 years ago

Thanks.

Log:

Fatal Python error: init_interp_main: can't initialize time Python runtime state: core initialized PermissionError: [Errno 1] Operation not permitted

Current thread 0x76f77390 (most recent call first):

After some googling I discovered important option:

docker run --privileged

Now server is running perfectly!