You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "sht2017 (via GitHub)" <gi...@apache.org> on 2024/04/04 19:44:00 UTC

[I] Not Sure What's Going Wrong With My Windows Installation [couchdb]

sht2017 opened a new issue, #5028:
URL: https://github.com/apache/couchdb/issues/5028

   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   Cannot start couchdb server on Windows with a fresh install.
   
   According to the error message, seems it may caused by improper permission configuration or missing files ({badmatch,{error,eacces}). Tried to install it on another path and repair it, still stayed the same.
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   Start the InstallationFile.msi, install without checking the checkbox registered as Windows Service. Keeps the rest of settings default.
   ```cmd
   ${InstallationPath}\bin>couchdb.cmd
   {"Kernel pid terminated",application_controller,"{application_start_failure,couch_log,{{shutdown,{failed_to_start_child,couch_log_server,{{badmatch,{error,eacces}},[{couch_log_writer,init,0,[{file,\"src/couch_log_writer.erl\"},{line,36}]},{couch_log_server,init,1,[{file,\"src/couch_log_server.erl\"},{line,56}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,423}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]}}},{couch_log_app,start,[normal,[]]}}}"}
   Kernel pid terminated (application_controller) ({application_start_failure,couch_log,{{shutdown,{failed_to_start_child,couch_log_server,{{badmatch,{error,eacces}},[{couch_log_writer,init,0,[{file,"src/couch_log_writer.erl"},{line,36}]},{couch_log_server,init,1,[{file,"src/couch_log_server.erl"},{line,56}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{couch_log_app,start,[normal,[]]}}})
   ```
   
   ## Expected Behaviour
   
   [NOTE]: # ( Tell us what you expected to happen. )
   Start the couchdb server.
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB version used: 3.3.3-2 (Latest release on (https://neighbourhood.ie/download-apache-couchdb-win/)[https://neighbourhood.ie/download-apache-couchdb-win/])
   * Browser name and version: Google Chrome 123.0.6312.86 (Stable) (x64)
   * Operating system and version: Windows 11 23H2 (22631.3296)
   
   ## Additional Context
   
   [TIP]:  # ( Add any other context about the problem here. )
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Inherited Permissions Not Applied in CouchDB's Windows Installer [couchdb]

Posted by "sht2017 (via GitHub)" <gi...@apache.org>.
sht2017 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2041225562

   > Hi,
   > 
   > commenting on your video from above: The msi is doing an administrative installation of CouchDB (UAC window is opening during setup), so the install directory has system rights. Looking at the wix installer we have this:
   > 
   > ```
   > <CreateFolder>
   >   <Permission User="[WIX_ACCOUNT_LOCALSYSTEM]" GenericAll="yes" />
   >   <Permission User="[WIX_ACCOUNT_ADMINISTRATORS]" GenericAll="yes" />
   >   <Permission User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericExecute="yes" />
   > </CreateFolder>
   > ```
   > 
   > So users in the USERS group will get read/execute access by default ...
   
   I still believe so. 
   Since the part you provide,
   `<Permission User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericExecute="yes" />`
   Obviously, the USERS group will not get write access by default. If anyone tries to start CouchDB server without the administrator's permission it will fail anyway due to the lack of write access to the default log path as I occoured.
   ```
   {"Kernel pid terminated",application_controller,"{application_start_failure,couch_log,{{shutdown,{failed_to_start_child,couch_log_server,{{badmatch,{error,eacces}},[{couch_log_writer,init,0,[{file,\"src/couch_log_writer.erl\"},{line,36}]},{couch_log_server,init,1,[{file,\"src/couch_log_server.erl\"},{line,56}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,423}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]}}},{couch_log_app,start,[normal,[]]}}}"}
   Kernel pid terminated (application_controller) ({application_start_failure,couch_log,{{shutdown,{failed_to_start_child,couch_log_server,{{badmatch,{error,eacces}},[{couch_log_writer,init,0,[{file,"src/couch_log_writer.erl"},{line,36}]},{couch_log_server,init,1,[{file,"src/couch_log_server.erl"},{line,56}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{couch_log_app,start,[normal,[]]}}})
   
   Crash dump is being written to: erl_crash.dump...
   ```
   So I guess we may need to consider that to let the USERs group obtain write access to the path, or change the default path for log file...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Inherited Permissions Not Applied in CouchDB's Windows Installer [couchdb]

Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2040405365

   Hi,
   
   commenting on your video from above:
   The msi is doing an administrative installation of CouchDB (UAC window is opening during setup), so the install directory has system rights. Looking at the wix installer we have this:
   ```
   <CreateFolder>
     <Permission User="[WIX_ACCOUNT_LOCALSYSTEM]" GenericAll="yes" />
     <Permission User="[WIX_ACCOUNT_ADMINISTRATORS]" GenericAll="yes" />
     <Permission User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericExecute="yes" />
   </CreateFolder>
   ```
   So users in the USERS group will get read/execute access by default ...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Inherited Permissions Not Applied in CouchDB's Windows Installer [couchdb]

Posted by "sht2017 (via GitHub)" <gi...@apache.org>.
sht2017 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2041644001

   @big-r81 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Not Sure What's Going Wrong With My Windows Installation [couchdb]

Posted by "sht2017 (via GitHub)" <gi...@apache.org>.
sht2017 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2038341782

   > `{error,eacces}` is the important bit. couchdb is not permitted to write to the log file location you've configured.
   
   
   
   > Hey,
   > 
   > your user account has no write permissions on your installation directory. Check your users security settings.
   
   Thanks, for solving it by resetting the installation path permission. However, somehow the setup program for Windows would alternate the installation path permission. I doubt that might be a bug because it won't make the installation path auto-inherit the parent-path's permission.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Not Sure What's Going Wrong With My Windows Installation [couchdb]

Posted by "sht2017 (via GitHub)" <gi...@apache.org>.
sht2017 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2038339459

   Solved, somehow the setup program for Windows would alternate the installation path permission. That might be a bug?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Inherited Permissions Not Applied in CouchDB's Windows Installer [couchdb]

Posted by "sht2017 (via GitHub)" <gi...@apache.org>.
sht2017 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2050611974

   > Hi,
   > 
   > I think we should not mix things here. The current setup is an administrative installation (exactly a system-wide install) with the possibility to install and run CouchDB as a Windows service (with administrator privileges). So far, all is working as expected. Currently, CouchDB is not intended to run under a "normal" user after installation. At the moment you have the possibility (workaround) change the installation folder permissions to have write access for the current user after the installation.
   > 
   > To fix this as a whole, there need to be more changes to the process of distributing it for Windows:
   > 
   > 1. Create an installer, which allows a system-wide or user-wide installation of CouchDB and / or
   > 2. Distribute CouchDB as a zipped package without installation at all
   > 
   > I would welcome any PRs which provide more flexible and user-friendly installation methods in the [CouchDB Glazier](https://github.com/apache/couchdb-glazier) repository. 😉
   
   Sure, I'll look into the [CouchDB Glazier](https://github.com/apache/couchdb-glazier) repository =)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Not Sure What's Going Wrong With My Windows Installation [couchdb]

Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2038090471

   Hey,
   
   your user account has no write permissions on your installation directory. Check your users security settings.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Inherited Permissions Not Applied in CouchDB's Windows Installer [couchdb]

Posted by "sht2017 (via GitHub)" <gi...@apache.org>.
sht2017 closed issue #5028: Inherited Permissions Not Applied in CouchDB's Windows Installer
URL: https://github.com/apache/couchdb/issues/5028


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Not Sure What's Going Wrong With My Windows Installation [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2038105007

   `{error,eacces}` is the important bit. couchdb is not permitted to write to the log file location you've configured.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Inherited Permissions Not Applied in CouchDB's Windows Installer [couchdb]

Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on issue #5028:
URL: https://github.com/apache/couchdb/issues/5028#issuecomment-2044330305

   Hi,
   
   I think we should not mix things here. The current setup is an administrative installation (exactly a system-wide install) with the possibility to install and run CouchDB as a Windows service (with administrator privileges). So far, all is working as expected. Currently, CouchDB is not intended to run under a "normal" user after installation.
   At the moment you have the possibility (workaround) change the installation folder permissions to have write access for the current user after the installation.
   
   To fix this as a whole, there need to be more changes to the process of distributing it for Windows:
   
   1. Create an installer, which allows a system-wide or user-wide installation of CouchDB and / or
   2. Distribute CouchDB as a zipped package without installation at all
   
   I would welcome any PRs which provide more flexible and user-friendly installation methods in the [CouchDB Glazier](https://github.com/apache/couchdb-glazier) repository. 😉 
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org