TarsCloud / Tars

Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.
BSD 3-Clause "New" or "Revised" License
9.79k stars 2.08k forks source link

请问怎样让后台服务读取服务器本地文件? #819

Closed goldengashbell closed 3 years ago

goldengashbell commented 3 years ago

What language are you using?

cpp

What operating system (Linux, Ubuntu, …) and version?

centos7, docker19.03.13, tarscloud/framework和tarscloud/tars-node的镜像都是latest版本

What runtime / compiler are you using (e.g. jdk version or version of gcc)

g++4.8.5

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 你好!我在搭建一个服务,这个服务监视本地的文件(文件位于docker镜像和宿主机的共享文件夹里面),客户端则询问服务端关于这些文件的信息,以及传输文件。但是我发现服务端打不开这些文件,服务器程序通过函数opendir连文件夹都打不开。服务端程序通过popen("ls xxxx", "r")读不到很多文件,所以我也不能通过popen把工作交给其他的程序执行。

请问怎样子才能让服务程序读到本地的文件呢?

ruanshudong commented 3 years ago

怎么看起来和tars没关系, 似乎是docker文件共享的问题?

goldengashbell commented 3 years ago

已想到别的办法绕过这个问题,谢谢!