为git项目运行As per Android studio team:
时
Linked-Data-Theater
我收到错误docker-compose up
下面是堆栈跟踪
standard_init_linux.go:195: exec user process caused "no such file or directory
在此堆栈跟踪中,您可以看到ifour.techno@ifour-137 MINGW64 /d/test/Docker/LinkData_Theater_Repo/Linked-Data-Theatre (master)
$ docker-compose up
Starting virtuoso ...
Starting ldt ... done
Attaching to virtuoso, ldt
virtuoso | standard_init_linux.go:195: exec user process caused "no such file or directory"
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Server version: Apache Tomcat/7.0.85
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Server built: Feb 7 2018 18:52:33 UTC
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Server number: 7.0.85.0
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: OS Name: Linux
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: OS Version: 4.4.111-boot2docker
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Architecture: amd64
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: JVM Version: 1.8.0_151-8u151-b12-1~deb9u1-b12
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: JVM Vendor: Oracle Corporation
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: CATALINA_BASE: /usr/local/tomcat
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: CATALINA_HOME: /usr/local/tomcat
virtuoso exited with code 1
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Dignore.endorsed.dirs=
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Dcatalina.base=/usr/local/tomcat
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Dcatalina.home=/usr/local/tomcat
ldt | Mar 01, 2018 7:35:47 AM org.apache.catalina.startup.VersionLoggerListener log
ldt | INFO: Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
ldt | Mar 01, 2018 7:35:48 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
ldt | INFO: Loaded APR based Apache Tomcat Native library 1.2.16 using APR version 1.5.2.
ldt | Mar 01, 2018 7:35:48 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
ldt | INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
ldt | Mar 01, 2018 7:35:48 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
ldt | INFO: OpenSSL successfully initialized (OpenSSL 1.1.0f 25 May 2017)
ldt | Mar 01, 2018 7:35:48 AM org.apache.coyote.AbstractProtocol init
ldt | INFO: Initializing ProtocolHandler ["http-apr-8080"]
ldt | Mar 01, 2018 7:35:48 AM org.apache.coyote.AbstractProtocol init
ldt | INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
ldt | Mar 01, 2018 7:35:48 AM org.apache.catalina.startup.Catalina load
ldt | INFO: Initialization processed in 890 ms
ldt | Mar 01, 2018 7:35:48 AM org.apache.catalina.core.StandardService startInternal
ldt | INFO: Starting service Catalina
ldt | Mar 01, 2018 7:35:48 AM org.apache.catalina.core.StandardEngine startInternal
ldt | INFO: Starting Servlet Engine: Apache Tomcat/7.0.85
ldt | Mar 01, 2018 7:35:48 AM org.apache.coyote.AbstractProtocol start
ldt | INFO: Starting ProtocolHandler ["http-apr-8080"]
ldt | Mar 01, 2018 7:35:48 AM org.apache.coyote.AbstractProtocol start
ldt | INFO: Starting ProtocolHandler ["ajp-apr-8009"]
下面是我的standard_init_linux.go:195: exec user process caused "no such file or directory
文件,
docker-compose.yml
缺少什么?我是码头工的初学者所以请帮我解决这个问题也给我建议。我用谷歌搜索了它,但在任何地方都找不到问题解决方案。
我也试过了version: '2'
services:
ldt:
privileged: true
container_name: ldt
image: tomcat:7-jre8
hostname: ldt.local
ports:
- "8080:8080"
volumes:
- ./webapps:/usr/local/tomcat/webapps
- ./shared_import:/usr/local/tomcat/temp:z
networks:
- ldt
virtuoso:
privileged: true
container_name: virtuoso
build:
context: virtuoso
hostname: virtuoso.local
ports:
- "1111:1111"
- "8890:8890"
environment:
DBA_PASSWORD: "dba"
SPARQL_UPDATE: "true"
VIRTUOSO_DBA_PWD: dba
volumes:
- ./virtuoso_data:/var/lib/virtuoso/db:z
- ./shared_import:/var/lib/virtuoso/usr/local/tomcat/temp:z
networks:
- ldt
networks:
ldt:
external:
name: ldt
,但得到了与上面相同的错误。
答案 0 :(得分:0)
您遇到的问题可能有几个原因,我通过尝试以下方法解决了同样的问题: -
请添加您的docker文件,其可能的问题是在docker文件中,而不是在docker-compose中
答案 1 :(得分:0)
如果您使用 Windows 作为主机操作系统,则此答案适用。
Yml文件不允许查明问题的确切位置。
问题似乎出在您的virtuoso
容器中。您需要查看此容器启动时运行的文件。它的.sh文件很有可能具有错误的行尾格式。文件中的行尾在某些时候从Unix格式(LF)转换为Windows格式(CR LF)。
如果这种转换发生在将在Docker容器中运行的.sh文件中,则Linux将无法识别行尾的Windows格式,并将整个文件视为一行。它将导致类似 standard_init_linux.go:XXX的错误:exec用户进程导致“没有这样的文件或目录”
原因
可能发生EOL转换,因为以下原因之一:
git pull
来源时自动将行尾转换为Windows格式(autocrlf = true)CR LF
解决方案
Edit
/ EOL Conversion
/ Unix
,然后保存文件dos2unix
从命令行转换文件git config --global core.autocrlf输入
它将全局更改设置,针对计算机上的所有存储库。
您也可以每个存储库进行设置。 有关更多详细信息,请参见https://help.github.com/articles/dealing-with-line-endings/。