问题描述
当我尝试在Ubuntu 14.04上启动Neo4j数据库时,我看到一条消息:WARNING: not changing user
.这是什么意思,它重要吗?我该如何克服警告?
When I try to start my Neo4j database on Ubuntu 14.04, I see a message: WARNING: not changing user
. What does this mean, is it important and how do I overcome the warning?
警告不会阻止服务器启动.
The warning doesn't stop the server from starting.
完整输出:
adam@ubuntu:~$ sudo service neo4j-service start
Using additional JVM arguments: -server -XX:+DisableExplicitGC - Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow
Starting Neo4j Server...WARNING: not changing user
process [3699]... waiting for server to be ready..... OK.
http://localhost:7474/ is ready.
推荐答案
(措辞不佳)警告告诉您,您不是以root用户身份启动neo4j的.在生产环境中运行neo4j时,通常会期望root用户启动neo4j.
The (badly worded) warning is telling you that you are not starting neo4j as the root user. When running neo4j in production, one would normally expect the root user to start neo4j.
但是在开发过程中,大多数人可能会在本地计算机上使用自己的用户ID运行neo4j,这应该不是问题.
But during development, most people probably run neo4j on their local computer under their own user id -- and this should not be a problem.
此外,请注意neo4j使用UID
环境变量来确定当前用户ID.至少在我的情况下,echo $UID
和sudo echo $UID
返回相同的值.因此,即使使用sudo
启动neo4j,您仍然会看到警告.但是,如果我使用su
成为root用户,则echo $UID
返回0
(root用户ID),而neo4j将不会显示警告.
Also, note that neo4j uses the UID
environment variable to determine the current user ID. At least in my case, echo $UID
and sudo echo $UID
return the same value. Therefore, you will still see the warning even if you use sudo
to start neo4j. However, if I use su
to become the root user, echo $UID
returns 0
(the root user ID), and neo4j will not display the warning.
这篇关于“警告:请勿更改用户"是什么意思?在Neo4j中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!