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

Invalid option specification (Namespace: 'aws:elasticbeanstalk:environment', OptionName: 'Domain'): Unknown configuration setting. #532

Open
jakubLangr opened this issue Jan 18, 2025 · 1 comment

Comments

@jakubLangr
Copy link

Description

Briefly describe the bug you are facing.

Even after deleting all "Domains" from all relevant files/configs I still get the error above. I am using. custom domain, but any references to it have been deleted. Please help.

Steps to reproduce

Provide steps to replicate. This should include: exact ebcli commands, any relevant configuration files(sanitized), platform version, region, as well as any additional information you think is relevant.

.ebextensions/node-settings.config

option_settings:
  # Node.js settings
  aws:elasticbeanstalk:container:nodejs: 
    NodeCommand: "npm start"
    ProxyServer: apache
    GzipCompression: true
  
  # Proxy settings
  aws:elasticbeanstalk:environment:proxy:staticfiles:
    /static: /static
    /dist: dist
  
  # Environment variables
  aws:elasticbeanstalk:application:environment:
    NODE_ENV: production
    PORT: 8080
    NPM_CONFIG_PRODUCTION: true
    NPM_USE_PRODUCTION: true
  
  # Instance settings
  aws:autoscaling:launchconfiguration:
    InstanceType: t2.micro
  
  # Load balancer settings
  aws:elasticbeanstalk:environment:
    LoadBalancerType: application
  
  # Health check settings
  aws:elasticbeanstalk:environment:process:default:
    HealthCheckPath: /health
    Port: '8080'
    Protocol: HTTP
    HealthCheckTimeout: 5
    HealthCheckInterval: 10
    HealthyThresholdCount: 3
    UnhealthyThresholdCount: 5
    
packages:
  yum:
    gcc: []
    make: []
    openssl-devel: []
    libxml2: []
    libxml2-devel: []

commands:
  01_node_get:
    cwd: /tmp
    test: '[ ! -f /usr/bin/node ] && echo "node not installed"'
    command: 'curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -'
  02_node_install:
    cwd: /tmp
    test: '[ ! -f /usr/bin/node ] && echo "node not installed"'
    command: 'sudo yum -y install nodejs'

files:
  "/opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh":
    mode: "000755"
    owner: root
    group: root
    content: |
      #!/bin/bash
      set -e
      
      APP_DIR=/var/app/staging
      
      echo "Preparing for deployment..."
      
      if [ ! -d $APP_DIR ]; then
        mkdir -p $APP_DIR
        chown webapp:webapp $APP_DIR
        chmod 755 $APP_DIR
      fi
      
      if [ -d /tmp/deployment/application ]; then
        cd /tmp/deployment/application
        echo "Installing production dependencies..."
        npm ci --production
        
        echo "Copying application files..."
        cp -r * $APP_DIR/
        
        echo "Setting permissions..."
        chown -R webapp:webapp $APP_DIR
        chmod -R 755 $APP_DIR
      fi 

eb deploy

Observed result

Please provide command output with --debug flag set.

2025-01-19 01:42:37,290 (DEBUG) ebcli.lib.aws : Response: {'Events': [{'EventDate': datetime.datetime(2025, 1, 18, 21, 42, 34, 376000, tzinfo=tzutc()), 'Message': 'Failed to deploy application.', 'ApplicationName': 'wapi-web', 'EnvironmentName': 'wapi-web-prod-1', 'RequestId': 'b6d523b8-c4cc-4330-b747-a61861179916', 'Severity': 'ERROR'}, {'EventDate': datetime.datetime(2025, 1, 18, 21, 42, 34, 212000, tzinfo=tzutc()), 'Message': "Invalid option specification (Namespace: 'aws:elasticbeanstalk:environment', OptionName: 'Domain'): Unknown configuration setting.", 'ApplicationName': 'wapi-web', 'EnvironmentName': 'wapi-web-prod-1', 'RequestId': 'b6d523b8-c4cc-4330-b747-a61861179916', 'Severity': 'ERROR'}, {'EventDate': datetime.datetime(2025, 1, 18, 21, 42, 34, 158000, tzinfo=tzutc()), 'Message': '"option_settings" in one of the configuration files failed validation. More details to follow.', 'ApplicationName': 'wapi-web', 'EnvironmentName': 'wapi-web-prod-1', 'RequestId': 'b6d523b8-c4cc-4330-b747-a61861179916', 'Severity': 'ERROR'}], 'ResponseMetadata': {'RequestId': 'e90b0113-9c5e-4450-a335-0b9ac61d878d', 'HTTPStatusCode': 200, 'date': 'Sat, 18 Jan 2025 21:42:37 GMT', 'RetryAttempts': 0}}
2025-01-18 21:42:34    ERROR   "option_settings" in one of the configuration files failed validation. More details to follow.
2025-01-18 21:42:34    ERROR   Invalid option specification (Namespace: 'aws:elasticbeanstalk:environment', OptionName: 'Domain'): Unknown configuration setting.
2025-01-18 21:42:34    ERROR   Failed to deploy application.

2025-01-19 01:42:37,301 (INFO) eb : Traceback (most recent call last):
  File "/opt/miniconda3/lib/python3.12/site-packages/ebcli/core/ebrun.py", line 62, in run_app
    app.run()
  File "/opt/miniconda3/lib/python3.12/site-packages/cement/core/foundation.py", line 882, in run
    return_val = self.controller._dispatch()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/lib/python3.12/site-packages/cement/core/controller.py", line 471, in _dispatch
    return func()
           ^^^^^^
  File "/opt/miniconda3/lib/python3.12/site-packages/cement/core/controller.py", line 477, in _dispatch
    return func()
           ^^^^^^
  File "/opt/miniconda3/lib/python3.12/site-packages/ebcli/core/abstractcontroller.py", line 92, in default
    self.do_command()
  File "/opt/miniconda3/lib/python3.12/site-packages/ebcli/controllers/deploy.py", line 79, in do_command
    deployops.deploy(self.app_name, self.env_name, self.version, self.label,
  File "/opt/miniconda3/lib/python3.12/site-packages/ebcli/operations/deployops.py", line 77, in deploy
    commonops.wait_for_success_events(request_id,
  File "/opt/miniconda3/lib/python3.12/site-packages/ebcli/operations/commonops.py", line 144, in wait_for_success_events
    _raise_if_error_event(event.message)
  File "/opt/miniconda3/lib/python3.12/site-packages/ebcli/operations/commonops.py", line 253, in _raise_if_error_event
    raise ServiceError(message)
ebcli.objects.exceptions.ServiceError: Failed to deploy application.

Expected result

Describe what you expected.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Mac OS 15.0.1
  2. EBCLI version:

eb --version
EB CLI 3.21.0 (Python 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 10:07:17) [Clang 14.0.6 ])
@rahulrajaram
Copy link
Collaborator

@jakubLangr , sorry for the late response. This sounds like an issue potentially in the EB service. Could you please reach out to us via customer support? We should be able to help you based on additional details like account ID, region, etc. after you reach out to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants