apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.97k stars 1.09k forks source link

Console Proxy - Failed to connect to server - Unable to decode token #9448

Open big3v opened 1 month ago

big3v commented 1 month ago
ISSUE TYPE
COMPONENT NAME
Console Proxy System VM
CLOUDSTACK VERSION
4.19.1.0
CONFIGURATION

consoleproxy.sslEnabled: no consoleproxy.url.domain: empty novnc.console.default: yes

OS / ENVIRONMENT
N/A
SUMMARY

When attempting to view the console for a virtual machine instance, the connection to the server fails. This issue prevents users from accessing the console interface of their VMs.

STEPS TO REPRODUCE
1. Navigate to the VM instances page.
2. Select a specific VM instance.
3. Attempt to open the console view for the selected VM.
EXPECTED RESULTS

The console should load and allow interaction with the VM instance.

ACTUAL RESULTS

A connection error occurs, and the console fails to load.

console proxy logs:

2024-07-25 17:38:13,854 ERROR [cloud.consoleproxy.ConsoleProxyPasswordBasedEncryptor] (qtp9703889-42:null) Unexpected exception
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
        at java.base/com.sun.crypto.provider.CipherCore.prepareInputBuffer(CipherCore.java:1011)
        at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:848)
        at java.base/com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
        at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2202)
        at com.cloud.consoleproxy.ConsoleProxyPasswordBasedEncryptor.decryptText(ConsoleProxyPasswordBasedEncryptor.java:99)
        at com.cloud.consoleproxy.ConsoleProxyPasswordBasedEncryptor.decryptObject(ConsoleProxyPasswordBasedEncryptor.java:134)
        at com.cloud.consoleproxy.ConsoleProxyHttpHandlerHelper.getQueryMap(ConsoleProxyHttpHandlerHelper.java:52)
        at com.cloud.consoleproxy.ConsoleProxyNoVNCHandler.onConnect(ConsoleProxyNoVNCHandler.java:76)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70)
        at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onConnect(JettyAnnotatedEventDriver.java:178)
        at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.openSession(AbstractEventDriver.java:217)
        at org.eclipse.jetty.websocket.common.WebSocketSession.open(WebSocketSession.java:493)
        at org.eclipse.jetty.websocket.common.WebSocketSession.onOpened(WebSocketSession.java:459)
        at org.eclipse.jetty.io.AbstractConnection.onOpened(AbstractConnection.java:213)
        at org.eclipse.jetty.io.AbstractConnection.onOpen(AbstractConnection.java:205)
        at org.eclipse.jetty.io.AbstractEndPoint.upgrade(AbstractEndPoint.java:444)
        at org.eclipse.jetty.server.HttpConnection.onCompleted(HttpConnection.java:412)
        at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:832)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
        at java.base/java.lang.Thread.run(Thread.java:829)
2024-07-25 17:38:13,860 ERROR [cloud.consoleproxy.ConsoleProxyHttpHandlerHelper] (qtp9703889-42:null) Unable to decode token
boring-cyborg[bot] commented 1 month ago

Thanks for opening your first issue here! Be sure to follow the issue template!