【问题标题】:how to set Jena Fuseki port when using Fuseki as a Service?使用 Fuseki 即服务时如何设置 Jena Fuseki 端口?
【发布时间】:2018-09-05 08:38:07
【问题描述】:

我安装 Jena 和 Fuseki 作为服务使用 ansible 角色gremid.fuseki

我想自定义监听主机和监听端口。但是,我不知道。

也许我应该编辑 $FUSEKI_BASE/config.ttl,它的默认内容是

[] rdf:type fuseki:Server ;
# Server-wide context parameters can be given here.
# For example, to set query timeouts: on a server-wide basis:
# Format 1: "1000" -- 1 second timeout
# Format 2: "10000,60000" -- 10s timeout to first result, then 60s timeout to for rest of query.
# See java doc for ARQ.queryTimeout
# ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "10000" ] ;

# Load custom code (rarely needed)
# ja:loadClass "your.code.Class" ;
.

【问题讨论】:

  • 服务端启动时用“--port”或WAR文件形式设置的端口,来自webapp容器服务端。
  • 谢谢。但我想知道当 fuseki 是服务而不是独立服务器时,是否有任何简单的方法来设置“端口”。
  • 你是如何将它作为服务运行的?
  • 官方文档Fuseki as a Service。我使用 ansible 角色 [ansible-role-fuseki ](github.com/paginagmbh/ansible-role-fuseki)
  • “fuseki”服务脚本使用环境变量FUSEKI_ARGS将命令行参数传递给Fuseki服务器。一种方法是使用/etc/default/fuseki。脚本顶部有 cmets。

标签: jena fuseki


【解决方案1】:

当 Fuseki 作为服务运行时,使用发行版中的 fuseki 脚本,命令行参数由环境变量 FUSEKI_ARGS 给出。

服务脚本读取文件/etc/default/fuseki来设置执行环境,其中可以包含FUSEKI_ARGS的环境变量设置。

有许多环境变量可以设置,这些在脚本中都有描述。

目前:

# Configuration
# -------------
# Values are loaded from /etc/default/fuseki, if it exists.
# The description below cover the default settings if /etc/default/fuseki
# does not exist.
#
# Set DEBUG=1 (see below or set the environment variable) to print the
# settings to be used.
#
# JAVA
#   Command to invoke Java. If not set, java (from the PATH) will be used.
#   JAVA_HOME can also be used to set JAVA.
#
# JAVA_OPTIONS
#   Extra options to pass to the JVM.
#
# FUSEKI_HOME
#   Where Fuseki is installed.  If not set, the script will try
#   to guess it based on the script invokation path.
# 
# FUSEKI_BASE
#   The root of the runtime area - logs files, system files, local configuration.
#   Defaults to $FUSEKI_HOME/run.
#
# FUSEKI_RUN
#   Where the fuseki.pid file should be stored.  It defaults
#   first available of /var/run, /usr/var/run, $FUSEKI_HOME and /tmp if not set.
#
# FUSEKI_PID
#   The FUSEKI PID file, defaults to $FUSEKI_RUN/fuseki.pid
#
# FUSEKI_ARGS
#   The arguments to pass to the Fuseki server on the command line. Defaults to:
#                                        # if FUSEKI_CONF is not set
#    --config=$FUSEKI_CONF               # if FUSEKI_CONF is set
#
# FUSEKI_START
#   Path to the jar file. Defaults to $FUSEKI_HOME/fuseki-server.jar 
#
# FUSEKI_CLASSES
#   Path to extra jars to add to the class path.  Defaults to none
#   Should be of the form path/class.jar:path/class2.jar
#
# FUSEKI_CONF
#   The Fuseki configuration file, usually in RDF Turtle notation.
#
# FUSEKI_USER
#   If set, the server will be run as this user
#
# FUSEKI_LOGS
#   Directory where logs will be generated. 
#   Fixed as $FUSEKI_BASE/logs.
#
# FUSEKI_LOGS_STDERROUT
#   Log file with stderr and stdout log output from Fuseki. 
#   Defaults to $FUSEKI_LOGS/stderrout.log

【讨论】:

    猜你喜欢
    • 2012-06-23
    • 2013-08-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-07
    • 2013-03-02
    相关资源
    最近更新 更多