AWS Jibri AMI first time not working

Hi all,
I created an AWS AMI on my working Jibri instance. What my issue is, when I did the up of AMI by using the c5.xlarge server it isn’t working for the first time. Below I’ve attached the Jibri error log. My error is, it appears an alert as “Jibri failed to start”. But when manually restart then the Jibri works fine. Is there anyone have an idea about this issue please let me know. Thank you.

2020-11-10 05:03:27.089 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.handleJibriIq() Received JibriIq <iq to='jibri@auth._DOMAIN_/1sbzaac7' from='jibribrewery@internal.auth._DOMAIN_/focus' id='amlicmlAYXV0aC5jbGFzcy5ncmFkZWx5Lm5nLzFzYnphYWM3AEFRbG4xLTU2OTgzOQBiXC6MDV/vDPxi+mfJ0SIv' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' action='start' recording_mode='file' room='testclass@conference._DOMAIN_' session_id='tskifgcyvwrbzlqn' app_data='{"file_recording_metadata":{"share":true}}'/></iq> from environment [MucClient id=_DOMAIN_ hostname=_DOMAIN_]
2020-11-10 05:03:27.090 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Received start request, starting service
2020-11-10 05:03:27.172 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.handleStartService() Parsed call url info: CallUrlInfo(baseUrl=https://_DOMAIN_, callName=testclass, urlParams=[])
2020-11-10 05:03:27.173 INFO: [41] org.jitsi.jibri.JibriManager.startFileRecording() Starting a file recording with params: FileRecordingRequestParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://_DOMAIN_, callName=testclass, urlParams=[])), sessionId=tskifgcyvwrbzlqn, callLoginParams=XmppCredentials(domain=recorder._DOMAIN_, username=recorder, password=jibrirecorderpass))
2020-11-10 05:03:27.233 FINE: [41] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Trying to retrieve key 'jibri.chrome.flags' from source 'config' as type kotlin.collections.List<kotlin.String>
2020-11-10 05:03:27.233 FINE: [41] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Successfully retrieved key 'jibri.chrome.flags' from source 'config' as type kotlin.collections.List<kotlin.String>
2020-11-10 05:03:51.520 FINE: [18] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status
2020-11-10 05:03:54.685 INFO: [41] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS
2020-11-10 05:03:54.699 INFO: [41] org.jitsi.jibri.selenium.JibriSelenium.<init>() Starting empty call check with a timeout of PT30S
2020-11-10 05:03:54.708 FINE: [41] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.<init>() Detected os as OS: LINUX
2020-11-10 05:03:54.712 FINE: [41] org.jitsi.jibri.config.debug() FallbackSupplier: checking for value via suppliers:
  LambdaSupplier: 'JibriConfig::recordingDirectory'
  ConfigSourceSupplier: key: 'jibri.recording.recordings-directory', type: 'kotlin.String', source: 'config'
2020-11-10 05:03:54.712 FINE: [41] org.jitsi.jibri.config.debug() LambdaSupplier: Trying to retrieve value via JibriConfig::recordingDirectory
2020-11-10 05:03:54.713 FINE: [41] org.jitsi.jibri.config.debug() FallbackSupplier: failed to find value via LambdaSupplier: 'JibriConfig::recordingDirectory': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$Error: class kotlin.KotlinNullPointerException
2020-11-10 05:03:54.713 FINE: [41] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Trying to retrieve key 'jibri.recording.recordings-directory' from source 'config' as type kotlin.String
2020-11-10 05:03:54.714 FINE: [41] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Successfully retrieved key 'jibri.recording.recordings-directory' from source 'config' as type kotlin.String
2020-11-10 05:03:54.714 FINE: [41] org.jitsi.jibri.config.debug() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.recording.recordings-directory', type: 'kotlin.String', source: 'config'
2020-11-10 05:03:54.714 FINE: [41] org.jitsi.jibri.config.debug() FallbackSupplier: checking for value via suppliers:
  LambdaSupplier: 'JibriConfig::finalizeRecordingScriptPath'
  ConfigSourceSupplier: key: 'jibri.recording.finalize-script', type: 'kotlin.String', source: 'config'
2020-11-10 05:03:54.715 FINE: [41] org.jitsi.jibri.config.debug() LambdaSupplier: Trying to retrieve value via JibriConfig::finalizeRecordingScriptPath
2020-11-10 05:03:54.715 FINE: [41] org.jitsi.jibri.config.debug() FallbackSupplier: failed to find value via LambdaSupplier: 'JibriConfig::finalizeRecordingScriptPath': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$Error: class kotlin.KotlinNullPointerException
2020-11-10 05:03:54.715 FINE: [41] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Trying to retrieve key 'jibri.recording.finalize-script' from source 'config' as type kotlin.String
2020-11-10 05:03:54.716 FINE: [41] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Successfully retrieved key 'jibri.recording.finalize-script' from source 'config' as type kotlin.String
2020-11-10 05:03:54.716 FINE: [41] org.jitsi.jibri.config.debug() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.recording.finalize-script', type: 'kotlin.String', source: 'config'
2020-11-10 05:03:54.716 INFO: [41] org.jitsi.jibri.service.impl.FileRecordingJibriService.<init>() Writing recording to /srv/recordings/tskifgcyvwrbzlqn, finalize script path /usr/local/bin/finalize_recording.sh
2020-11-10 05:03:54.718 FINE: [41] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:recording
2020-11-10 05:03:54.719 INFO: [41] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE -> BUSY
2020-11-10 05:03:54.719 FINE: [41] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status
2020-11-10 05:03:54.719 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.updatePresence() Jibri reports its status is now JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2020-11-10 05:03:54.721 INFO: [41] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Sending 'pending' response to start IQ
2020-11-10 05:03:57.538 FINE: [53] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Visiting url https://_DOMAIN_/testclass#config.iAmRecorder=true&config.externalConnectUrl=null&config.startWithAudioMuted=true&config.startWithVideoMuted=true&interfaceConfig.APP_NAME="Jibri"&config.analytics.disabled=true&config.p2p.enabled=false&config.prejoinPageEnabled=false&config.requireDisplayName=false
2020-11-10 05:03:57.764 FINE: [53] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property 'isJoined' of undefined
2020-11-10 05:03:58.271 FINE: [53] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property 'isJoined' of undefined
2020-11-10 05:03:58.784 INFO: [53] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Waited 1029 milliseconds for call page to load
2020-11-10 05:03:58.793 INFO: [53] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Running
2020-11-10 05:03:58.793 INFO: [53] org.jitsi.jibri.service.impl.FileRecordingJibriService.invoke() Selenium joined the call, starting the capturer
2020-11-10 05:03:58.810 INFO: [53] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.launch() Starting ffmpeg with command ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v libx264 -preset veryfast -profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f mp4 /srv/recordings/tskifgcyvwrbzlqn/testclass_2020-11-10-05-03-54.mp4 ([ffmpeg, -y, -v, info, -f, x11grab, -draw_mouse, 0, -r, 30, -s, 1280x720, -thread_queue_size, 4096, -i, :0.0+0,0, -f, alsa, -thread_queue_size, 4096, -i, plug:bsnoop, -acodec, aac, -strict, -2, -ar, 44100, -b:a, 128k, -af, aresample=async=1, -c:v, libx264, -preset, veryfast, -profile:v, main, -level, 3.1, -pix_fmt, yuv420p, -r, 30, -crf, 25, -g, 60, -tune, zerolatency, -f, mp4, /srv/recordings/tskifgcyvwrbzlqn/testclass_2020-11-10-05-03-54.mp4])
2020-11-10 05:04:03.815 FINE: [18] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2020-11-10 05:04:05.815 FINE: [18] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2020-11-10 05:04:07.836 INFO: [56] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Running
2020-11-10 05:04:07.836 INFO: [56] org.jitsi.jibri.service.impl.FileRecordingJibriService.onServiceStateChange() File recording service transitioning from state Starting up to Running
2020-11-10 05:04:07.837 INFO: [56] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Current service started up successfully, sending on iq <iq to='jibribrewery@internal.auth._DOMAIN_/focus' id='qLqEs-24' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='on'/></iq>
2020-11-10 05:04:13.830 INFO: [18] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {}, all clients muted? true
2020-11-10 05:04:28.802 INFO: [18] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {audio={download=0, upload=0}, download=0, upload=0, video={download=0, upload=0}}, all clients muted? true
2020-11-10 05:04:43.801 INFO: [18] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {audio={download=0, upload=0}, download=0, upload=0, video={download=0, upload=0}}, all clients muted? true
2020-11-10 05:04:51.520 FINE: [18] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status