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

Stream manager streams visualization #40

Closed
tomikpik opened this issue Jun 26, 2024 · 18 comments
Closed

Stream manager streams visualization #40

tomikpik opened this issue Jun 26, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@tomikpik
Copy link

tomikpik commented Jun 26, 2024

I've encountered an issue while trying to open the streams overview

aws.greengrass.Nucleus: 2.12.6
aws.greengrass.LocalDebugConsole: 2.4.2

greengrass.log

2024-06-26T11:41:55.272Z [ERROR] (WebSocketWorker-222) com.aws.greengrass.localdebugconsole.SimpleHttpServer: Error while listing streams:. {serviceName=aws.greengrass.LocalDebugConsole, currentState=RUNNING}
com.amazonaws.greengrass.streammanager.client.exception.ConnectException: Connect failed
	at com.amazonaws.greengrass.streammanager.client.StreamManagerClientImpl.connect(StreamManagerClientImpl.java:177)
	at com.amazonaws.greengrass.streammanager.client.StreamManagerClientImpl.<init>(StreamManagerClientImpl.java:91)
	at com.amazonaws.greengrass.streammanager.client.StreamManagerClientFactory.build(StreamManagerClientFactory.java:49)
	at com.aws.greengrass.localdebugconsole.StreamManagerHelper.connect(StreamManagerHelper.java:75)
	at com.aws.greengrass.localdebugconsole.StreamManagerHelper.listStreams(StreamManagerHelper.java:88)
	at com.aws.greengrass.localdebugconsole.DashboardServer.streamManagerListStreams(DashboardServer.java:402)
	at com.aws.greengrass.localdebugconsole.DashboardServer.onMessage(DashboardServer.java:262)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.server.WebSocketServer.onWebsocketMessage(WebSocketServer.java:673)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:885)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:819)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.server.WebSocketServer$WebSocketWorker.doDecode(WebSocketServer.java:1046)
	at com.aws.greengrass.localdebugconsole.lib.org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:1028)
Caused by: java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.connect0(Native Method)
	at java.base/sun.nio.ch.Net.connect(Net.java:579)
	at java.base/sun.nio.ch.Net.connect(Net.java:568)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:633)
	at java.base/java.net.Socket.connect(Socket.java:583)
	at java.base/java.net.Socket.<init>(Socket.java:507)
	at java.base/java.net.Socket.<init>(Socket.java:287)
	at java.base/javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:271)
	at com.amazonaws.greengrass.streammanager.client.StreamManagerClientImpl.connect(StreamManagerClientImpl.java:137)
	... 13 more

Expected behavior:
StreamManager streams are shown in the local debug console streams overview.

Thanks
Tomas

@tomikpik tomikpik added the bug Something isn't working label Jun 26, 2024
@tomikpik
Copy link
Author

image

@MikeDombo
Copy link
Member

Is stream manager installed and running without error?

@tomikpik
Copy link
Author

yes, there are no errors in the stream manager log and it works normally.

@MikeDombo
Copy link
Member

When you refresh the local debug console, is it able to connect?

Please show the configuration from the CLI or the local debug console of Stream manager as well as Local debug console components.

@tomikpik
Copy link
Author

I've attached the configuration below.
What do you mean by refreshing the local debug console? Refreshing the web page or restarting the component? I've tried both but the behavior is still the same

---
componentType: "PLUGIN"
configuration:
  httpsEnabled: false
  port: "10441"
  websocketPort: "10442"
dependencies:
- "aws.greengrass.Cli:SOFT"
- "aws.greengrass.Nucleus:SOFT"
lifecycle: {}
runtime:
  keystorePassphrase: ...
version: "2.4.2"

---
componentType: "GENERIC"
configuration:
  JVM_ARGS: "-Xms64m -Xmx576m"
  LOG_LEVEL: "INFO"
  port: ""
  STREAM_MANAGER_AUTHENTICATE_CLIENT: "true"
  STREAM_MANAGER_ENABLE_LOCK_ON_METADATA_STORE: "false"
  STREAM_MANAGER_EXPORTER_MAX_BANDWIDTH: "5500"
  STREAM_MANAGER_EXPORTER_S3_DESTINATION_MULTIPART_UPLOAD_MIN_PART_SIZE_BYTES: "5242880"
  STREAM_MANAGER_EXPORTER_THREAD_POOL_SIZE: "1"
  STREAM_MANAGER_SERVER_PORT: "8088"
  STREAM_MANAGER_STORE_ROOT_DIR: "."
dependencies:
- "aws.greengrass.TokenExchangeService:HARD"
- "aws.greengrass.Nucleus:SOFT"
lifecycle:
  setEnv:
    LOG_LEVEL: "INFO"
    STREAM_MANAGER_AUTHENTICATE_CLIENT: "true"
    STREAM_MANAGER_ENABLE_LOCK_ON_METADATA_STORE: "false"
    STREAM_MANAGER_EXPORTER_MAX_BANDWIDTH: "5500"
    STREAM_MANAGER_EXPORTER_S3_DESTINATION_MULTIPART_UPLOAD_MIN_PART_SIZE_BYTES: "5242880"
    STREAM_MANAGER_EXPORTER_THREAD_POOL_SIZE: "1"
    STREAM_MANAGER_SERVER_PORT: "8088"
    STREAM_MANAGER_STORE_ROOT_DIR: "."
  startup:
    script: ...
version: "2.1.12"

@tomikpik tomikpik changed the title Stream manager sterams visualization Stream manager streams visualization Jun 26, 2024
@MikeDombo
Copy link
Member

I mean refreshing the page in the browser, yes.

The error you're getting is that the connection is being refused. This would happen if the local debug console is trying to connect to the wrong port. The port field in the stream manager configuration is empty, but it should not be empty. That field is automatically set by stream manager when it starts up. This indicates a problem with stream manager.

Please review the logs for stream manager during its startup and try restarting the stream manager component.

@tomikpik
Copy link
Author

According to the stream manager documentation, the only option to configure the port is via STREAM_MANAGER_SERVER_PORT parameter, which is (in our case) set to 8088. So I don't understand what do you mean by the port field.

Attaching stream manager logs after clicking on "reinstall" in the local debug console

2024-06-26T13:08:55.006Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:08:55,006 [INFO] (Thread-0) com.amazonaws.iot.greengrass.streammanager.StreamManagerService: Shutting down StreamManager services. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2024-06-26T13:08:55.008Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:08:55,008 [INFO] (Thread-0) com.amazonaws.iot.greengrass.streammanager.server.StreamServer: Shutting down streamServer. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2024-06-26T13:08:59.034Z [INFO] (Copier) aws.greengrass.StreamManager: Startup script exited. {exitCode=143, serviceName=aws.greengrass.StreamManager, currentState=STOPPING}
2024-06-26T13:08:59.039Z [INFO] (pool-3-thread-50) aws.greengrass.StreamManager: shell-runner-start. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING, command=["java -Xms64m -Xmx576m -cp /opt/.../greengrass/v2/packages/a..."]}
2024-06-26T13:09:00.248Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:00,246 [INFO] (main) com.amazonaws.iot.greengrass.streammanager.server.GreengrassCoreV2SDKWrapper: Socket file path: /opt/.../greengrass/v2/ipc.socket. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:00.263Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. Jun 26, 2024 1:09:00 PM software.amazon.awssdk.eventstreamrpc.EventStreamRPCConnection$1 onConnectionSetup. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:00.263Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. INFO: Socket connection /opt/.../greengrass/v2/ipc.socket:8033 to server result [AWS_ERROR_SUCCESS]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:00.301Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. Jun 26, 2024 1:09:00 PM software.amazon.awssdk.eventstreamrpc.EventStreamRPCConnection$1 onProtocolMessage. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:00.302Z [WARN] (Copier) aws.greengrass.StreamManager: stderr. INFO: Connection established with event stream RPC server. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:00.502Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:00,502 [WARN] (main) com.amazonaws.iot.greengrass.streammanager.utils.FileChannelCache: FileChannelCache not initialized! Using defaults. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.026Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,025 [INFO] (main) com.amazonaws.internal.DefaultServiceEndpointBuilder: {iotsitewise, eu-west-1} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'iotsitewise.eu-west-1.amazonaws.com'.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.146Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,146 [WARN] (main) com.amazonaws.iot.greengrass.streammanager.server.protocol.AuthHandler: Greengrass v1 Auth SDK not detected. Attempting to use the v2 SDK.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.147Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,147 [INFO] (main) com.amazonaws.iot.greengrass.streammanager.server.StreamServer: Starting streamServer on port: 8088. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.153Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,153 [INFO] (main) com.amazonaws.iot.greengrass.streammanager.export.decider.Decider: Starting decider. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.378Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,377 [INFO] (pool-6-thread-1) com.amazonaws.iot.greengrass.streammanager.server.GreengrassCoreV2SDKHandler: Publish the stream manager port: 8088. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.378Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,378 [INFO] (pool-6-thread-1) com.amazonaws.iot.greengrass.streammanager.server.StreamServer: StreamServer ready to accept connections on port 8088. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=STARTING}
2024-06-26T13:09:01.381Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:01,381 [INFO] (pool-6-thread-1) com.amazonaws.iot.greengrass.streammanager.server.GreengrassCoreV2SDKHandler: Stream Manager reporting the state: RUNNING. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:03.263Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:03,263 [WARN] (nioEventLoopGroup-3-1) com.amazonaws.iot.greengrass.streammanager.utils.InputValidation: Setting flushOnWrite with persistence set to memory has no effect.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:03.273Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:03,273 [WARN] (nioEventLoopGroup-3-1) com.amazonaws.iot.greengrass.streammanager.export.ExportManager: The message stream S3StatusStream doesn't have any export definition.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.178Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:11,173 [ERROR] (nioEventLoopGroup-3-2) com.amazonaws.iot.greengrass.streammanager.server.handlers.MessageStreamHandler: Caught exception in MessageStreamHandler. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.178Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. java.net.SocketException: Connection reset. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) ~[?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) ~[?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:254) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:11.179Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at java.lang.Thread.run(Thread.java:840) [?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:15.058Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:15,058 [WARN] (nioEventLoopGroup-3-4) com.amazonaws.iot.greengrass.streammanager.utils.InputValidation: Setting flushOnWrite with persistence set to memory has no effect.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:15.067Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:15,067 [WARN] (nioEventLoopGroup-3-4) com.amazonaws.iot.greengrass.streammanager.export.ExportManager: The message stream S3StatusStream doesn't have any export definition.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-06-26T13:09:31.067Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Jun 26 13:09:31,066 [WARN] (nioEventLoopGroup-3-6) com.amazonaws.iot.greengrass.streammanager.utils.InputValidation: Setting flushOnWrite with persistence set to memory has no effect.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}

@MikeDombo
Copy link
Member

MikeDombo commented Jun 26, 2024

Correct, you should not configure the port field, but if you look at the configuration you posted from Stream manager there is a port field set to "". This is set automatically when stream manager starts successfully to the actual port stream manager is using.

@tomikpik
Copy link
Author

tomikpik commented Jun 26, 2024

Oh I see, but what can I do with it? Maybe check is some other process is using the default 8088 port?
It is hard to find out what is wrong there because our components can interact with with stream manager without any issues

@MikeDombo
Copy link
Member

GreengrassCoreV2SDKHandler: Publish the stream manager port: 8088

This log line indicates that stream manager did update the port field in the configuration. Using the local debug console, view the configuration from stream manager and see that the port field is set to 8088. If it is not set, you could set it yourself using the local debug console and then the console will be able to successfully connect.

@tomikpik
Copy link
Author

tomikpik commented Jun 26, 2024

I don't know why but the port is suddenly filled in. And the visualization works in local debug console works as well.

But sice we have this conversation here, I'd like to ask you for one more advice - what I was initially trying to achieve using the local debug console is to debug some shadow syncing problem we're facing.

The thing is that I am not sure if the shadow update (initiated on cloud) is not propagated to the ShadowManager or if we're just not handling the shadow update correctly in our component.

How would you troubleshoot this? What is the best way how to check the current shadow state stored in the ShadowManager?

Thank you
Tomas

@MikeDombo
Copy link
Member

MikeDombo commented Jun 26, 2024

The local debug console cannot show anything related to Shadows directly. You can use the builtin message test console to subscribe to all local pubsub topics and then publish a message to the local shadow topic which will let you read the shadow contents the same way you would do this in a component. If you think your shadow is not syncing, then make a change and review the logs relating to shadow manager; there is probably an error which is most likely due to missing permissions. If there is no error, then the most likely cause is a misconfiguration of the shadow manager.

To be clear, subscribe to # on the local pubsub bus. And publish to $aws/things/<thing name here>/shadow/get or $aws/things/<thing name here>/shadow/name/<shadow name here>/get to request the shadow state

I don't know why but the port is suddenly filled in

This is most likely because you restarted Stream manager and it was able to update the port field properly this time.

@tomikpik
Copy link
Author

Ok, I'll try to diagnose the problem this way.

Ane one more question:
In the StreamManager section there is (in my case): Export max bandwidth 5.37 KB/s
but the component configuration is STREAM_MANAGER_EXPORTER_MAX_BANDWIDTH: "5500"

The documentation says

(Optional) The average maximum bandwidth (in kilobits per second) that stream manager can use to export data.

And if I am not mistaken 5500 kilobits per second should be 687.5 kilobytes per second.

The question is: Is there a mistake in the documentation or in the visualization of the configured value in the local debug console?

@MikeDombo
Copy link
Member

MikeDombo commented Jun 26, 2024

The configuration simply shows the value which you set it to (nothing else is setting these values), you must have set it to 5500 when you deployed the component. If you want a different value, update it in a deployment or locally using the local debug console.

I see what you mean. It is showing 5500/1024 which is 5.37

This is an error in the console's math. It is assuming bytes instead of bits.

@tomikpik
Copy link
Author

tomikpik commented Jun 26, 2024

Ok, but when the documentation says this value is in "kilobits per second" should it be 5.37 megabits in the local debug console?
I don't want to be annoying, It just makes me wonder whether I have the correct value configured in the StreamManager.

@MikeDombo
Copy link
Member

5500 kilobits per second is 5.37 megabits per second, yes.

#41

@tomikpik
Copy link
Author

I think for now all my questions were answered so thank you.

@saranyailla
Copy link
Member

Tracking the STREAM_MANAGER_EXPORTER_MAX_BANDWIDTH display issue it #41. Closing the issue as the questions are all answered. Please feel free to re-open if you've have more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants