Giter Site home page Giter Site logo

Comments (7)

ixrjog avatar ixrjog commented on July 18, 2024

如下命令试下

login 1 -A # 高权限账户登录
login 1 --account root_hy # 指定账户登录

from opscloud4.

unixtommy avatar unixtommy commented on July 18, 2024

opscloud shell>login 1 -A
java.lang.NullPointerException
Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.
opscloud shell>login 1 --account root_hy
java.lang.NullPointerException
Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.
opscloud shell>stacktrace
java.lang.NullPointerException
at com.baiyi.opscloud.sshserver.command.server.ServerLoginCommand.login(ServerLoginCommand.java:103)
at com.baiyi.opscloud.sshserver.command.server.ServerLoginCommand$$FastClassBySpringCGLIB$$e626b320.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:58)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at com.baiyi.opscloud.sshserver.aspect.InvokeSessionUserAspect.around(InvokeSessionUserAspect.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at com.baiyi.opscloud.sshserver.command.server.ServerLoginCommand$$EnhancerBySpringCGLIB$$766110b9.login()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
at org.springframework.shell.Shell.evaluate(Shell.java:180)
at com.baiyi.opscloud.sshserver.ExtendedShell.evaluate(ExtendedShell.java:94)
at com.baiyi.opscloud.sshserver.ExtendedShell.run(ExtendedShell.java:84)
at com.baiyi.opscloud.sshserver.ExtendedShell.run(ExtendedShell.java:62)
at com.baiyi.opscloud.sshserver.SshShellRunnable.run(SshShellRunnable.java:227)
at java.lang.Thread.run(Thread.java:748)
一样的错误,会是配置的问题?

from opscloud4.

ixrjog avatar ixrjog commented on July 18, 2024

看问题好像是sshkey没配置

  1. 凭据配置参考(公钥、私钥都填上并注意格式,保存后数据会加密并且无法看到内容)
    image

  2. 服务器账户配置参考
    image

from opscloud4.

unixtommy avatar unixtommy commented on July 18, 2024

解决了。这个用户名必须得是操作系统中真实存在的
QQ20220331-171434@2x

新问题: 服务器里的账户是不能删除的吗 ?我测试了服务器数量为零的账户也不能删除

QQ20220331-171557@2x

from opscloud4.

ixrjog avatar ixrjog commented on July 18, 2024

我看了下代码的确没有删除接口,一般不需要删除你可以修改这个账户为有效的账户即可
image

from opscloud4.

ixrjog avatar ixrjog commented on July 18, 2024

删除代码开发完成 5be5d8d
需要在RBAC中新增资源(API)

from opscloud4.

unixtommy avatar unixtommy commented on July 18, 2024

OK多谢

from opscloud4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.