首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >扩展坞错误分段故障中的OWFS (核心转储)

扩展坞错误分段故障中的OWFS (核心转储)
EN

Stack Overflow用户
提问于 2021-11-08 11:19:48
回答 1查看 121关注 0票数 0

我尝试在docker容器中运行owfs来解析单线温度值。运行时

代码语言:javascript
复制
owfs -C -uall -m /mnt/1wire --allow_other

在容器内部,我收到这个错误Segmentation fault (core dumped)

在主机系统上,我可以运行相同的设置和命令,到目前为止没有问题:我不知道如何调试它来找到错误/解决方案,并感谢提示/解决方案!

我的设置如下,Dockerfile:

代码语言:javascript
复制
FROM python:3.8-slim-buster
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get upgrade -y
    
COPY ds2490 /etc/modeprobe.d/ds2490
RUN apt-get install owfs -y
RUN apt-get install libtool automake libftdi-dev libusb-dev libusb-1.0.0-dev uthash-dev -y
RUN apt-get install usbutils -y

COPY owfs.conf /etc/owfs.conf
COPY fuse.conf /etc/fuse.conf
RUN mkdir /mnt/1wire

WORKDIR onewire
COPY ./docker_entrypoint.sh ./docker_entrypoint.sh
RUN chmod +x ./docker_entrypoint.sh
COPY ./parse_onewire.py ./parse_onewire.py
RUN chmod +x parse_onewire.py

ENTRYPOINT ./docker_entrypoint.sh

docker-compose.yml:

代码语言:javascript
复制
version: "3"
services:
  onewire_parser:
    container_name: 'onewire'
    build: .
    volumes:
      - /dev/bus/usb:/dev/bus/usb
    privileged: true
    stdin_open: true
    tty: true
    restart: unless-stopped

ds2490:

代码语言:javascript
复制
blacklist ds2490
blacklist ds9490r
blacklist wire

fuse.conf:

代码语言:javascript
复制
#Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#

user_allow_other

owfs.conf:

代码语言:javascript
复制
######################## SOURCES ########################
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
# USB device: DS9490
server: usb = all
# Serial port: DS9097
#server: device = /dev/ttyS1
# owserver tcp address
#server: server = 192.168.10.1:3131
# random simulated device
#server: FAKE = DS18S20,DS2405
######################### OWFS ##########################
mountpoint = /mnt/1wire
allow_other
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
server: port = localhost:4304

docker_entrypoint.sh:

代码语言:javascript
复制
#!/bin/bash
owfs -C -uall -m /mnt/1wire --allow_other
EN

回答 1

Stack Overflow用户

发布于 2021-11-08 14:47:29

我不太清楚为什么,但是将挂载方向从/mnt/1wire改为/opt/1wire解决了这个问题。我保留了原始帖子中提到的所有其他内容。

也许有人能解释这件事?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69882636

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档