Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

麒麟V10操作系统无法运行 #174

Open
175222277 opened this issue Nov 22, 2024 · 4 comments
Open

麒麟V10操作系统无法运行 #174

175222277 opened this issue Nov 22, 2024 · 4 comments

Comments

@175222277
Copy link

操作系统为麒麟V10_SP2-X86版本。启动后报错如下:

version:0.6.6, RUST_LOG:info
data dir:nacos_db
thread 'main' panicked at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/thread/mod.rs:678:29:
failed to spawn thread: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
stack backtrace:
   0:     0x557c6584adca - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h304520fd6a30aa07
   1:     0x557c65874dcb - core::fmt::write::hf5713710ce10ff22
   2:     0x557c65846da3 - std::io::Write::write_fmt::hda708db57927dacf
   3:     0x557c6584c0b2 - std::panicking::default_hook::{{closure}}::he1ad87607d0c11c5
   4:     0x557c6584bd1e - std::panicking::default_hook::h81c8cd2e7c59ee33
   5:     0x557c6584c93f - std::panicking::rust_panic_with_hook::had2118629c312a4a
   6:     0x557c6584c627 - std::panicking::begin_panic_handler::{{closure}}::h7fa5985d111bafa2
   7:     0x557c6584b2a9 - std::sys::backtrace::__rust_end_short_backtrace::h704d151dbefa09c5
   8:     0x557c6584c2b4 - rust_begin_unwind
   9:     0x557c646a8a63 - core::panicking::panic_fmt::h3eea515d05f7a35e
  10:     0x557c646a8f36 - core::result::unwrap_failed::h7c8d8bbbcf45dc13
  11:     0x557c649976a1 - rnacos::common::actor_utils::create_actor_at_thread2::h581230940572e0b3
  12:     0x557c64793b20 - rnacos::starter::config_factory::{{closure}}::haa1de8e7ac2c22d0
  13:     0x557c647a23c1 - <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::hdb418805ba89535b
  14:     0x557c64766465 - <core::pin::Pin<P> as core::future::future::Future>::poll::he158b5853507b930
  15:     0x557c64990c5d - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::h7f6219f0834b1042
  16:     0x557c648a1a2f - tokio::runtime::runtime::Runtime::block_on::h2f0466661ff84935
  17:     0x557c649eae17 - rnacos::main::h216fcb8a8821c942
  18:     0x557c64891153 - std::sys::backtrace::__rust_begin_short_backtrace::h531b1ad5b4d35ebe
  19:     0x557c649f60a9 - std::rt::lang_start::{{closure}}::h12b2da58783fbc5d
  20:     0x557c6583d970 - std::rt::lang_start_internal::h4d90db0530245041
  21:     0x557c649eae85 - main
  22:     0x7fc88847024a - <unknown>
  23:     0x7fc888470305 - __libc_start_main
  24:     0x557c646a9331 - _start
  25:                0x0 - <unknown>
[2024-11-22 00:19:23.499256 +00:00 INFO  bean_factory::factory] BeanFactoryCore started
@heqingpan
Copy link
Collaborator

报错信息是因为没有权限,大概是没有对应目录下的写文件权限。

可以检查一下运行用户在运行目录下nacos_db是否有文件写入权限。
可以试试指定数据目录到明确有权限的目录,或者用root账户再运行试试。

@175222277
Copy link
Author

175222277 commented Nov 22, 2024

报错信息是因为没有权限,大概是没有对应目录下的写文件权限。

可以检查一下运行用户在运行目录下nacos_db是否有文件写入权限。 可以试试指定数据目录到明确有权限的目录,或者用root账户再运行试试。

使用root用户登陆,并且宿主机挂载的data目录也设置了:chmod -R 777 data

@175222277
Copy link
Author

增加privileged:true可以正常启动,但是使用dockerswarm模式发布时,privileged:true选项不生效。导致服务无法启动

@heqingpan
Copy link
Collaborator

前面的描述我还以为是直接在麒麟系统运行的,原来是在docker中运行的 😂。
不过其原因都一样,是因为没有文件系统写入权限。

关于docker需要privileged权限,是和宿主机安全配置有关。
一般可以通过关闭selinux改变系统安全策略规避这个问题,就看这会不会和你们的安全要求有冲突。

关闭selinux可以参考文档 https://r-nacos.github.io/docs/notes/deploy_example/linux_deploy/ 中的相关内容。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants