내용으로 건너뛰기

aws.greengrass.clientdevices.mqtt.EMQX fails on Windows

0

Basic deployment for the new EMQX MQTT Broker (https://docs.aws.amazon.com/greengrass/v2/developerguide/mqtt-broker-emqx-component.html) fails on Windows

The EMQX log is failing w/ a Windows Credentials error:

2022-08-19T20:29:26.491Z [INFO] (pool-2-thread-63) aws.greengrass.clientdevices.mqtt.EMQX: shell-runner-start. {scriptName=services.aws.greengrass.clientdevices.mqtt.EMQX.lifecycle.startup.script, serviceName=aws.greengrass.clientdevices.mqtt.EMQX, currentState=STARTING, command=["C:\greengrass\v2\packages\artifacts-unarchived\aws.greengrass.clientdevices.mq..."]}
2022-08-19T20:29:26.492Z [ERROR] (pool-2-thread-63) aws.greengrass.clientdevices.mqtt.EMQX: shell-runner-error. Error while running process. {scriptName=services.aws.greengrass.clientdevices.mqtt.EMQX.lifecycle.startup.script, serviceName=aws.greengrass.clientdevices.mqtt.EMQX, currentState=STARTING, command=["C:\greengrass\v2\packages\artifacts-unarchived\aws.greengrass.clientdevices.mq..."]}
java.io.IOException: Failed to read credential
	at vendored.com.microsoft.alm.storage.windows.internal.WindowsCredUtils.read(WindowsCredUtils.java:36)
	at com.aws.greengrass.util.platforms.windows.WindowsExec.getPassword(WindowsExec.java:298)
	at com.aws.greengrass.util.platforms.windows.WindowsExec.createProcess(WindowsExec.java:116)
	at com.aws.greengrass.util.Exec.exec(Exec.java:316)
	at com.aws.greengrass.util.Exec.background(Exec.java:373)
	at com.aws.greengrass.lifecyclemanager.ShellRunner$Default.successful(ShellRunner.java:110)
	at com.aws.greengrass.lifecyclemanager.GenericExternalService.run(GenericExternalService.java:683)
	at com.aws.greengrass.lifecyclemanager.GenericExternalService.run(GenericExternalService.java:701)
	at com.aws.greengrass.lifecyclemanager.GenericExternalService.run(GenericExternalService.java:629)
	at com.aws.greengrass.lifecyclemanager.GenericExternalService.startup(GenericExternalService.java:343)
	at com.aws.greengrass.lifecyclemanager.Lifecycle.lambda$handleStateTransitionStartingToRunningAsync$9(Lifecycle.java:530)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.jna.LastErrorException: [1168] Element not found.
	at com.sun.jna.Native.invokeInt(Native Method)
	at com.sun.jna.Function.invoke(Function.java:426)
	at com.sun.jna.Function.invoke(Function.java:361)
	at com.sun.jna.Library$Handler.invoke(Library.java:265)
	at com.sun.proxy.$Proxy30.CredRead(Unknown Source)
	at vendored.com.microsoft.alm.storage.windows.internal.WindowsCredUtils.read(WindowsCredUtils.java:31)
	... 15 more
  • Hi, the log which you have posted doesn't contain any errors. Can you provide the EMQX component log file?

    I may also recommend opening a support case through the AWS Console for better private support.

  • One reason why it may fail on startup is if you have an existing program using the same port (8883). Similarly, the Windows firewall (if enabled) may stop things from functioning properly. You can use the following command as an administrator to enable inbound MQTT connections to port 8883. New-NetFirewallRule -DisplayName "Allow MQTT" -Direction Inbound -Protocol TCP -LocalPort 8883 -Action Allow

  • I have updated the original post to include the EMQX log (apologies, I thought it was captured in the greengrass.log). Thanks for your help, happy to open a private support ticket if needed

질문됨 3년 전804회 조회
1개 답변
1
수락된 답변

The error "failed to read credential" means that Greengrass was not able to find the password for the component's runWith user. This does not only apply to EMQX, but to any component which runs an external process. This happens when Greengrass is not running as the user which our instructions would have you run it, or if you did not create and store a user's password following: https://docs.aws.amazon.com/greengrass/v2/developerguide/quick-installation.html

If Greengrass is running as a Windows system service, which is what our instructions will have you do, then the user's password must be stored in the LOCAL_SYSTEM account's credential store. Our instructions have you store the password using the PsExec utility, so see that portion of the instructions to make sure that you've followed that.

If you aren't running Greengrass as a system service, then you should stop Greengrass and instead run it as a system service.

AWS
전문가
답변함 3년 전
전문가
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.