could not parse environment variables
See original GitHub issueDescription
environment command in beanstalk platform scripts does not work Sorry for posting this here bug but I don’t know where to report this
Steps to reproduce
ssh to the beanstalk instance and execute the command
/opt/elasticbeanstalk/bin/get-config environment
Observed result
could not parse environment variables
Expected result
list of environment variables
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: amzn2
- it works using optionsettings command
/opt/elasticbeanstalk/bin/get-config optionsettings
- My environment variables:
"ANALYTICS_AWS_KEY": "",
"ANALYTICS_AWS_REGION": "eu-west-1",
"ANALYTICS_AWS_SECRET": "",
"ANALYTICS_AWS_URL": "https://sqs.eu-west-1.amazonaws.com/********/awseb-**********",
"ANALYTICS_ENABLED": "true",
"ANALYTICS_SECRET_KEY": "*************",
"APP_ADMIN_MAIL": "contact@******.com",
"APP_DEBUG": "false",
"APP_ENV": "local",
"APP_KEY": "base64:xb/***********=",
"APP_NAME": "Laravel",
"APP_URL": "https://prod.core.******.com",
"AWS_ACCESS_KEY_ID": "",
"AWS_BUCKET": "",
"AWS_DEFAULT_REGION": "eu-west-1",
"AWS_SECRET_ACCESS_KEY": "",
"BROADCAST_DRIVER": "log",
"CACHE_DRIVER": "redis",
"DB_CONNECTION": "mongodb",
"DB_DATABASE": "******",
"DB_DSN": "mongodb://*****:**(&**#**=***@*****:27017/*****?authSource=admin",
"ELASTICSEARCH_HOST": "https://*****.eu-west-1.es.amazonaws.com:443",
"ELASTICSEARCH_INDEX": "scout",
"FILESYSTEM_DRIVER": "public",
"FIREBASE_CREDENTIALS": "storage/********.json",
"FIREBASE_ENABLE_DEBUG": "false",
"FIREBASE_PROJECT": "******",
"LOGGING_APP_TAG": "*******.logs",
"LOGGING_NGINX_TAG": "*******.logs",
"LOG_CHANNEL": "stack",
"MAIL_ENCRYPTION": "tls",
"MAIL_FROM_ADDRESS": "admin@********.com",
"MAIL_FROM_NAME": "${APP_NAME}",
"MAIL_HOST": "smtp.*******",
"MAIL_MAILER": "smtp",
"MAIL_PASSWORD": "********",
"MAIL_PORT": "2525",
"MAIL_USERNAME": "******",
"MIX_PUSHER_APP_CLUSTER": "${PUSHER_APP_CLUSTER}",
"MIX_PUSHER_APP_KEY": "${PUSHER_APP_KEY}",
"PUSHER_APP_CLUSTER": "mt1",
"PUSHER_APP_ID": "",
"PUSHER_APP_KEY": "",
"PUSHER_APP_SECRET": "",
"QUEUE_CONNECTION": "redis",
"REDIS_CLIENT": "predis",
"REDIS_HOST": "***-prod.rodwzz.***",
"REDIS_PASSWORD": null,
"REDIS_PORT": "6379",
"SCOUT_DRIVER": "elastic",
"SCOUT_QUEUE": "true",
"SESSION_DRIVER": "file",
"SESSION_LIFETIME": "120"
- Beanstalk Solution:
PHP 7.3 running on 64bit Amazon Linux 2/3.1.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Troubleshoot issues when passing environment variables to ...
I want to troubleshoot issues when passing environment variables to my Amazon Elastic Container Service (Amazon ECS) task. Short description.
Read more >Environment properties are not passed to application in ...
No. I mean in the actual variable value, in ANY env var that is in EB. Our issue was that we had a...
Read more >Setting the remote environment - Ansible Documentation
You can use the environment keyword at the play, block, or task level to set an environment variable for an action on a...
Read more >Problems with Environment Variables
If the error message states that the environment variable is not set, IT MEANS PRECISELY THAT ! The most likely reason is that...
Read more >Craft cms environment Variable not parse
I am using craft cms version 3.7.42. when i use my system email that give me my .env variable name only not parse...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a workaround I wrote this script :
I had a similar issue:
get-config environment
would fail on one Amazon Linux 2 environment (“could not parse environment variables”), but it was working on others (with different environment variables). Turns outget-config environment
was choking on an env var that was set to"null"
(i.e. the 4-characters string “null”) - I updated it and it worked 🎉