Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1.1, 1.2, 1.3
    • Fix Version/s: 1.2, 1.3
    • Component/s: HTTP Interface
    • Labels:
      None
    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      Changing configuration of the ssl port make the server crashing. COnfiguration isn't saved and https isn't available anymore.

      Step to reproduce:

      1. Enable ssl by uncommenting httpsd daemon line in local.ini and set key_file & cert_file in ssl section
      2. start couchdb
      3. Change port using the `_config` interface:

      curl -XPUT 'http://127.0.0.1:5984/_config/ssl/port' -d'"6987"'
      "6986"

      log:

      [error] [<0.95.0>] {error_report,<0.30.0>,
      {<0.95.0>,supervisor_report,
      [{supervisor,{local,couch_secondary_services}},

      {errorContext,child_terminated}

      ,

      {reason,normal}

      ,
      {offender,
      [

      {pid,<0.172.0>},
      {name,httpd},
      {mfargs,{couch_httpd,start_link,[]}},
      {restart_type,permanent},
      {shutdown,brutal_kill},
      {child_type,worker}]}]}}

      =SUPERVISOR REPORT==== 24-Dec-2011::11:54:36 ===
      Supervisor: {local,couch_secondary_services}
      Context: child_terminated
      Reason: normal
      Offender: [{pid,<0.172.0>}

      ,

      {name,httpd}

      ,
      {mfargs,{couch_httpd,start_link,[]}},

      {restart_type,permanent}

      ,

      {shutdown,brutal_kill}

      ,

      {child_type,worker}

      ]

      The server restart but change isn't took in consideration.

      1. https_config_change.patch
        2 kB
        Benjamin Anderson
      2. 0001-fix-COUCHDB-1369.patch
        2 kB
        Benoit Chesneau
      3. 0001-fix-COUCHDB-1369.patch
        2 kB
        Benoit Chesneau
      4. 0001-fix-COUCHDB-1369.patch
        0.7 kB
        Benoit Chesneau

        Activity

        Hide
        Benjamin Anderson added a comment -

        Patch that fixes the bugged behavior.

        Core issue was that couch_httpd:stop/0 wasn't stopping all registered daemons.

        The futon tests pass on my box.

        Show
        Benjamin Anderson added a comment - Patch that fixes the bugged behavior. Core issue was that couch_httpd:stop/0 wasn't stopping all registered daemons. The futon tests pass on my box.
        Hide
        Benoit Chesneau added a comment -

        Attached patch should fix the issue which is due to the fact httpd is restarted on any ssl change. The inverse issue.

        This patch depending on the name of the service we start should register the event depending on the service name.

        Show
        Benoit Chesneau added a comment - Attached patch should fix the issue which is due to the fact httpd is restarted on any ssl change. The inverse issue. This patch depending on the name of the service we start should register the event depending on the service name.
        Hide
        Benoit Chesneau added a comment -

        oups previous patch wasn't taking ip change in consideration in ssl case. New itteration is fixing it.

        Show
        Benoit Chesneau added a comment - oups previous patch wasn't taking ip change in consideration in ssl case. New itteration is fixing it.
        Hide
        Benoit Chesneau added a comment -

        After testing, it appears that previous patch isn't enough.

        Show
        Benoit Chesneau added a comment - After testing, it appears that previous patch isn't enough.
        Hide
        Benoit Chesneau added a comment -

        patch based on the one proposed by Benjamin Anderson but without changing name of the services.

        Note: for 1.3/2.0 we should investigate on a better solution to handle both service. We shouldn't mix there init.

        Show
        Benoit Chesneau added a comment - patch based on the one proposed by Benjamin Anderson but without changing name of the services. Note: for 1.3/2.0 we should investigate on a better solution to handle both service. We shouldn't mix there init.
        Hide
        Benoit Chesneau added a comment -

        fixed in 5cece68ec4e18d6be8e37dfc0e7b786b0e2140c1

        Show
        Benoit Chesneau added a comment - fixed in 5cece68ec4e18d6be8e37dfc0e7b786b0e2140c1

          People

          • Assignee:
            Benoit Chesneau
            Reporter:
            Benoit Chesneau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development