ckan 2.9.3 容器无法在 Windows 10 上运行
Posted
技术标签:
【中文标题】ckan 2.9.3 容器无法在 Windows 10 上运行【英文标题】:ckan 2.9.3 container not working on windows 10 【发布时间】:2021-11-17 11:58:39 【问题描述】:CKAN 版本 2.9.3 视窗 10 码头工人
我使用 Windows 10 并尝试关注此tutorial。 我的 CKAN Docker 安装看起来很完美,除了 ckan 容器在重启后立即退出。 docker日志如下:
Attaching to ckan, db, datapusher, redis, solr
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
redis | 1:C 24 Sep 2021 06:59:02.336 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis | 1:C 24 Sep 2021 06:59:02.336 # Redis version=6.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis | 1:C 24 Sep 2021 06:59:02.336 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis | 1:M 24 Sep 2021 06:59:02.336 * monotonic clock: POSIX clock_gettime
redis | 1:M 24 Sep 2021 06:59:02.337 * Running mode=standalone, port=6379.
redis | 1:M 24 Sep 2021 06:59:02.337 # Server initialized
redis | 1:M 24 Sep 2021 06:59:02.337 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis | 1:M 24 Sep 2021 06:59:02.337 * Ready to accept connections
ckan exited with code 1
db | The files belonging to this database system will be owned by user "postgres".
db | This user must also own the server process.
db |
db | The database cluster will be initialized with locale "en_US.utf8".
db | The default database encoding has accordingly been set to "UTF8".
db | The default text search configuration will be set to "english".
db |
db | Data page checksums are disabled.
db |
db | fixing permissions on existing directory /var/lib/postgresql/data/db ... ok
db | creating subdirectories ... ok
db | selecting default max_connections ... 100
db | selecting default shared_buffers ... 128MB
db | selecting dynamic shared memory implementation ... posix
db | creating configuration files ... ok
db | running bootstrap script ... ok
db | performing post-bootstrap initialization ... ok
db | syncing data to disk ... ok
db |
db | Success. You can now start the database server using:
db |
db | pg_ctl -D /var/lib/postgresql/data/db -l logfile start
db |
db |
db | WARNING: enabling "trust" authentication for local connections
db | You can change this by editing pg_hba.conf or using the option -A, or
db | --auth-local and --auth-host, the next time you run initdb.
db | waiting for server to start....2021-09-24 06:59:07.233 UTC [44] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db | 2021-09-24 06:59:07.284 UTC [45] LOG: database system was shut down at 2021-09-24 06:59:04 UTC
db | 2021-09-24 06:59:07.300 UTC [44] LOG: database system is ready to accept connections
db | done
db | server started
db | CREATE DATABASE
db |
db |
db | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/00_create_datastore.sh
db | /usr/local/bin/docker-entrypoint.sh: /docker-entrypoint-initdb.d/00_create_datastore.sh: /bin/bash^M: bad interpreter: No such file or directory
db | 2021-09-24 07:03:33.658 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db | 2021-09-24 07:03:33.658 UTC [1] LOG: listening on IPv6 address "::", port 5432
db | 2021-09-24 07:03:33.670 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db | 2021-09-24 07:03:33.704 UTC [25] LOG: database system was interrupted; last known up at 2021-09-24 06:59:07 UTC
db | 2021-09-24 07:03:33.992 UTC [25] LOG: database system was not properly shut down; automatic recovery in progress
db | 2021-09-24 07:03:33.997 UTC [25] LOG: redo starts at 0/1651488
db | 2021-09-24 07:03:33.997 UTC [25] LOG: invalid record length at 0/1651578: wanted 24, got 0
db | 2021-09-24 07:03:33.997 UTC [25] LOG: redo done at 0/1651530
db | 2021-09-24 07:03:33.997 UTC [25] LOG: last completed transaction was at log time 2021-09-24 06:59:07.970281+00
db | 2021-09-24 07:03:34.023 UTC [1] LOG: database system is ready to accept connections
solr | Starting Solr 6.6.5
solr | 2021-09-24 06:59:06.388 INFO (main) [ ] o.e.j.s.Server jetty-9.3.14.v20161028
solr | 2021-09-24 06:59:07.550 INFO (main) [ ] o.a.s.s.SolrDispatchFilter ___ _ Welcome to Apache Solr� version 6.6.5
solr | 2021-09-24 06:59:07.551 INFO (main) [ ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _ Starting in standalone mode on port 8983
solr | 2021-09-24 06:59:07.552 INFO (main) [ ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_| Install dir: /opt/solr
solr | 2021-09-24 06:59:07.601 INFO (main) [ ] o.a.s.s.SolrDispatchFilter |___/\___/_|_| Start time: 2021-09-24T06:59:07.560Z
solr | 2021-09-24 06:59:07.652 INFO (main) [ ] o.a.s.c.SolrResourceLoader Using system property solr.solr.home: /opt/solr/server/solr
solr | 2021-09-24 06:59:07.663 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from /opt/solr/server/solr/solr.xml
solr | 2021-09-24 06:59:07.900 INFO (main) [ ] o.a.s.c.SolrResourceLoader [null] Added 0 libs to classloader, from paths: []
solr | 2021-09-24 06:59:08.326 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true
solr | 2021-09-24 06:59:08.504 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Found 1 core definitions underneath /opt/solr/server/solr
solr | 2021-09-24 06:59:08.505 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Cores are: [ckan]
solr | 2021-09-24 06:59:08.512 INFO (coreLoadExecutor-6-thread-1) [ ] o.a.s.c.TransientSolrCoreCacheDefault Allocating transient cache for 2147483647 transient cores
solr | 2021-09-24 06:59:08.595 INFO (main) [ ] o.e.j.s.Server Started @3423ms
solr | 2021-09-24 06:59:08.606 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.SolrResourceLoader [ckan] Added 53 libs to classloader, from paths: [/opt/solr/contrib/clustering/lib, /opt/solr/contrib/extraction/lib, /opt/solr/contrib/langid/lib, /opt/solr/contrib/velocity/lib, /opt/solr/dist]
solr | 2021-09-24 06:59:08.737 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.SolrConfig Using Lucene MatchVersion: 6.0.0
solr | 2021-09-24 06:59:08.954 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.ManagedIndexSchemaFactory The schema is configured as managed, but managed schema resource managed-schema not found - loading non-managed schema schema.xml instead
solr | 2021-09-24 06:59:09.007 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.IndexSchema [ckan] Schema name=ckan
solr | 2021-09-24 06:59:09.276 WARN (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.SolrResourceLoader Solr loaded a deprecated plugin/analysis class [solr.SynonymFilterFactory]. Please consult documentation how to replace it accordingly.
solr | 2021-09-24 06:59:09.282 WARN (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.SolrResourceLoader Solr loaded a deprecated plugin/analysis class [solr.WordDelimiterFilterFactory]. Please consult documentation how to replace it accordingly.
solr | 2021-09-24 06:59:09.406 WARN (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.IndexSchema 'defaultSearchField' is deprecated, please use 'df' on request instead.
solr | 2021-09-24 06:59:09.406 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.IndexSchema [ckan] default search field in schema is text.
solr | 2021-09-24 06:59:09.406 WARN (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.IndexSchema [ckan] query parser default operator is AND. WARNING: Deprecated, please use 'q.op' on request instead. Will not work from Solr 7
solr | 2021-09-24 06:59:09.687 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.IndexSchema Loaded schema ckan/2.9 with uniqueid field index_id
solr | 2021-09-24 06:59:09.805 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.ManagedIndexSchema Upgraded to managed schema at /opt/solr/server/solr/ckan/conf/managed-schema
solr | 2021-09-24 06:59:09.856 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.ManagedIndexSchemaFactory After upgrading to managed schema, renamed the non-managed schema /opt/solr/server/solr/ckan/conf/schema.xml to /opt/solr/server/solr/ckan/conf/schema.xml.bak
solr | 2021-09-24 06:59:09.857 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.CoreContainer Creating SolrCore 'ckan' using configuration from instancedir /opt/solr/server/solr/ckan, trusted=true
solr | 2021-09-24 06:59:09.940 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.SolrCore solr.RecoveryStrategy.Builder
solr | 2021-09-24 06:59:09.955 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.c.SolrCore [[ckan] ] Opening new SolrCore at [/opt/solr/server/solr/ckan], dataDir=[/opt/solr/server/solr/ckan/data/]
solr | 2021-09-24 06:59:10.167 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.r.XSLTResponseWriter xsltCacheLifetimeSeconds=5
solr | 2021-09-24 06:59:11.245 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.UpdateHandler Using UpdateLog implementation: org.apache.solr.update.UpdateLog
solr | 2021-09-24 06:59:11.246 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.UpdateLog Initializing UpdateLog: dataDir= defaultSyncLevel=FLUSH numRecordsToKeep=100 maxNumLogsToKeep=10 numVersionBuckets=65536
solr | 2021-09-24 06:59:11.285 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.CommitTracker Hard AutoCommit: if uncommited for 15000ms;
solr | 2021-09-24 06:59:11.286 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.CommitTracker Soft AutoCommit: disabled
solr | 2021-09-24 06:59:11.337 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.SolrIndexSearcher Opening [Searcher@58e0f0af[ckan] main]
solr | 2021-09-24 06:59:11.361 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.r.ManagedResourceStorage File-based storage initialized to use dir: /opt/solr/server/solr/ckan/conf
solr | 2021-09-24 06:59:11.391 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.c.SpellCheckComponent Initializing spell checkers
solr | 2021-09-24 06:59:11.402 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.s.DirectSolrSpellChecker init: name=default,field=_text_,classname=solr.DirectSolrSpellChecker,distanceMeasure=internal,accuracy=0.5,maxEdits=2,minPrefix=1,maxInspections=5,minQueryLength=4,maxQueryFrequency=0.01
solr | 2021-09-24 06:59:11.409 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.c.QueryElevationComponent Loading QueryElevation from: /opt/solr/server/solr/ckan/conf/elevate.xml
solr | 2021-09-24 06:59:11.442 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.h.ReplicationHandler Commits will be reserved for 10000
solr | 2021-09-24 06:59:11.500 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.c.QuerySenderListener QuerySenderListener sending requests to Searcher@58e0f0af[ckan] mainExitableDirectoryReader(UninvertingDirectoryReader())
solr | 2021-09-24 06:59:11.501 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.c.QuerySenderListener QuerySenderListener done.
solr | 2021-09-24 06:59:11.501 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.h.c.SpellCheckComponent Loading spell index for spellchecker: default
solr | 2021-09-24 06:59:11.507 INFO (searcherExecutor-7-thread-1-processing-x:ckan) [ x:ckan] o.a.s.c.SolrCore [ckan] Registered new searcher Searcher@58e0f0af[ckan] mainExitableDirectoryReader(UninvertingDirectoryReader())
solr | 2021-09-24 06:59:11.509 INFO (coreLoadExecutor-6-thread-1) [ x:ckan] o.a.s.u.UpdateLog Could not find max version in index or recent updates, using new clock 1711765456429252608
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
ckan | standard_init_linux.go:228: exec user process caused: no such file or directory
ckan exited with code 1
【问题讨论】:
【参考方案1】:有时 solr 可能需要一些时间才能启动,因此您可能会在 CKAN 可以连接的地方遇到类似的错误。启动容器后能否尝试重启CKANdocker-compose restart ckan
【讨论】:
以上是关于ckan 2.9.3 容器无法在 Windows 10 上运行的主要内容,如果未能解决你的问题,请参考以下文章