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

Service is restarting #26

Open rchovan opened 2 years ago

rchovan commented 2 years ago

Hi, I'm using your sms gateway in docker, with this config:

cat docker-compose.yaml

version: '3'
services:
  sms-gammu-gateway:
    container_name: sms-gammu-gateway
    restart: always
    privileged: true
    image: pajikos/sms-gammu-gateway
    environment:
      - PIN=""
      - TZ=Europe/Bratislava
#    network_mode: host
    ports:
      - "192.168.2.5:5000:5000"
    volumes:
#      - /docker_data/sms-gammu-gw/credentials.txt:/sms-gw/credentials.txt
      - /docker_data/sms-gammu-gw/:/sms-gw/
    devices:
      - /dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0:/dev/mobile

I have noticed, that service is after some time restarting, but I can't see any error in logs. It is because of WSGI web server ?

docker container logs

 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
192.168.2.5 - - [07/Jun/2022 21:22:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:07] "GET /signal HTTP/1.1" 200 -
192.168.2.54 - - [07/Jun/2022 21:23:16] "GET /signal HTTP/1.1" 200 -
192.168.2.54 - - [07/Jun/2022 21:23:17] "GET /favicon.ico HTTP/1.1" 404 -
192.168.2.5 - - [07/Jun/2022 21:23:18] "GET /getsms HTTP/1.1" 200 -
192.168.2.54 - - [07/Jun/2022 21:23:23] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:37] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:38] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:23:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:24:07] "GET /signal HTTP/1.1" 200 -
 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
192.168.2.5 - - [07/Jun/2022 21:24:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:07] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:18] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:37] "GET /signal HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:38] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:25:58] "GET /getsms HTTP/1.1" 200 -
192.168.2.5 - - [07/Jun/2022 21:26:07] "GET /signal HTTP/1.1" 200 -
 * Serving Flask app 'run' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.19.0.2:5000/ (Press CTRL+C to quit)
192.168.2.5 - - [07/Jun/2022 21:26:58] "GET /getsms HTTP/1.1" 200 -

Even ping is unavailable.

PING 172.19.0.2 (172.19.0.2) 56(84) bytes of data.
64 bytes from 172.19.0.2: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 172.19.0.2: icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from 172.19.0.2: icmp_seq=3 ttl=64 time=0.022 ms
64 bytes from 172.19.0.2: icmp_seq=4 ttl=64 time=0.029 ms
64 bytes from 172.19.0.2: icmp_seq=5 ttl=64 time=0.084 ms
64 bytes from 172.19.0.2: icmp_seq=6 ttl=64 time=0.026 ms
64 bytes from 172.19.0.2: icmp_seq=7 ttl=64 time=0.019 ms
64 bytes from 172.19.0.2: icmp_seq=8 ttl=64 time=0.022 ms
64 bytes from 172.19.0.2: icmp_seq=9 ttl=64 time=0.068 ms
64 bytes from 172.19.0.2: icmp_seq=10 ttl=64 time=0.076 ms
64 bytes from 172.19.0.2: icmp_seq=11 ttl=64 time=0.098 ms
From 172.19.0.1 icmp_seq=13 Destination Host Unreachable
From 172.19.0.1 icmp_seq=14 Destination Host Unreachable
From 172.19.0.1 icmp_seq=15 Destination Host Unreachable
From 172.19.0.1 icmp_seq=16 Destination Host Unreachable
From 172.19.0.1 icmp_seq=17 Destination Host Unreachable
From 172.19.0.1 icmp_seq=18 Destination Host Unreachable
From 172.19.0.1 icmp_seq=19 Destination Host Unreachable
From 172.19.0.1 icmp_seq=20 Destination Host Unreachable
From 172.19.0.1 icmp_seq=21 Destination Host Unreachable
From 172.19.0.1 icmp_seq=22 Destination Host Unreachable
From 172.19.0.1 icmp_seq=23 Destination Host Unreachable
From 172.19.0.1 icmp_seq=24 Destination Host Unreachable
From 172.19.0.1 icmp_seq=25 Destination Host Unreachable
From 172.19.0.1 icmp_seq=26 Destination Host Unreachable
From 172.19.0.1 icmp_seq=27 Destination Host Unreachable
From 172.19.0.1 icmp_seq=28 Destination Host Unreachable
From 172.19.0.1 icmp_seq=29 Destination Host Unreachable
From 172.19.0.1 icmp_seq=30 Destination Host Unreachable
From 172.19.0.1 icmp_seq=31 Destination Host Unreachable
From 172.19.0.1 icmp_seq=32 Destination Host Unreachable
From 172.19.0.1 icmp_seq=33 Destination Host Unreachable
From 172.19.0.1 icmp_seq=34 Destination Host Unreachable
From 172.19.0.1 icmp_seq=35 Destination Host Unreachable
From 172.19.0.1 icmp_seq=36 Destination Host Unreachable
From 172.19.0.1 icmp_seq=37 Destination Host Unreachable
From 172.19.0.1 icmp_seq=40 Destination Host Unreachable
From 172.19.0.1 icmp_seq=41 Destination Host Unreachable
From 172.19.0.1 icmp_seq=42 Destination Host Unreachable
64 bytes from 172.19.0.2: icmp_seq=43 ttl=64 time=0.039 ms
64 bytes from 172.19.0.2: icmp_seq=44 ttl=64 time=0.066 ms
64 bytes from 172.19.0.2: icmp_seq=45 ttl=64 time=0.066 ms
64 bytes from 172.19.0.2: icmp_seq=46 ttl=64 time=0.072 ms
64 bytes from 172.19.0.2: icmp_seq=47 ttl=64 time=0.086 ms
64 bytes from 172.19.0.2: icmp_seq=48 ttl=64 time=0.039 ms
64 bytes from 172.19.0.2: icmp_seq=49 ttl=64 time=0.018 ms
64 bytes from 172.19.0.2: icmp_seq=50 ttl=64 time=0.027 ms
64 bytes from 172.19.0.2: icmp_seq=51 ttl=64 time=0.053 ms
64 bytes from 172.19.0.2: icmp_seq=52 ttl=64 time=0.060 ms
64 bytes from 172.19.0.2: icmp_seq=53 ttl=64 time=0.024 ms
64 bytes from 172.19.0.2: icmp_seq=54 ttl=64 time=0.044 ms
64 bytes from 172.19.0.2: icmp_seq=55 ttl=64 time=0.022 ms