* Re: Nginx service fails [not found] <20180304222749.GA23799@jurong> @ 2018-03-04 23:06 ` Andreas Enge 2018-03-05 7:23 ` bug#30706: " Ricardo Wurmus ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Andreas Enge @ 2018-03-04 23:06 UTC (permalink / raw) To: guix-devel; +Cc: bug-guix Well, I am turning this into a bug report, since it still occurs with the latest git commit ac1a9ce8b07f3b80900ee08436ff6e683e8dc195 . This is the result of "./pre-inst-env guix system reconfigure ...", where "..." is my configuration file: ... creating nginx log directory '/var/log/nginx' creating nginx run directory '/var/run/nginx' creating nginx temp directories '/var/run/nginx/{client_body,proxy,fastcgi,uwsgi,scgi}_temp' nginx: [alert] could not open error log file: open() "/gnu/store/pp71iff1qxwhh82vm34g18h9kmn0xrg5-nginx-1.13.9/logs/error.log" failed (2: No such file or directory) nginx: the configuration file /gnu/store/5ixkryw6jl32cm6d1g9jb8dm9rbz8csc-nginx.conf syntax is ok nginx: configuration file /gnu/store/5ixkryw6jl32cm6d1g9jb8dm9rbz8csc-nginx.conf test is successful `/gnu/store/zchh8s3r1bbmia3zfxsyhsz3c4b9fmps-openssh-authorized-keys/root' -> `/etc/ssh/authorized_keys.d/root' `/gnu/store/zchh8s3r1bbmia3zfxsyhsz3c4b9fmps-openssh-authorized-keys/andreas' -> `/etc/ssh/authorized_keys.d/andreas' guix system: loading new services: user-homes term-auto nginx... shepherd: Evaluating user expression (register-services (primitive-load "/gnu/st?") ?). guix system: error: exception caught while executing 'eval' on service 'root': find-long-options: unbound variable Installing for i386-pc platform. /gnu/store/1dnbfda2p1bxwyl0rcm96ka9pmi0wb88-grub-2.02/sbin/grub-install: warning: disk does not exist, so falling back to partition device /dev/xvda2. /gnu/store/1dnbfda2p1bxwyl0rcm96ka9pmi0wb88-grub-2.02/sbin/grub-install: warning: disk does not exist, so falling back to partition device /dev/xvda2. /gnu/store/1dnbfda2p1bxwyl0rcm96ka9pmi0wb88-grub-2.02/sbin/grub-install: warning: disk does not exist, so falling back to partition device /dev/xvda2. /gnu/store/1dnbfda2p1bxwyl0rcm96ka9pmi0wb88-grub-2.02/sbin/grub-install: error: cannot find a GRUB drive for /dev/sda. Check your device.map. guix system: error: failed to install bootloader /gnu/store/9iv63jm07klxvrr4fpwv6q5vpnca13ja-bootloader-installer The final error is "normal", since I am installing in a Xen virtual machine, where /dev/sda does not exist; it did not matter before. The real error occurs above, the "uncaught exception". But: # herd status nginx herd: service 'nginx' could not be found Then I do a # ./pre-inst-env guix system roll-back # herd status nginx herd: service 'nginx' could not be found Otherwise said, I can go back, but my previously running web server has definitely gone! How do I get it back? Andreas ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30706: Nginx service fails 2018-03-04 23:06 ` Nginx service fails Andreas Enge @ 2018-03-05 7:23 ` Ricardo Wurmus 2018-03-05 7:43 ` Andreas Enge 2018-03-05 10:09 ` Ludovic Courtès [not found] ` <87k1uqbzq9.fsf@gnu.org> 2 siblings, 1 reply; 6+ messages in thread From: Ricardo Wurmus @ 2018-03-05 7:23 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel, 30706 Andreas Enge <andreas@enge.fr> writes: > Well, I am turning this into a bug report, since it still occurs with > the latest git commit ac1a9ce8b07f3b80900ee08436ff6e683e8dc195 . > > This is the result of "./pre-inst-env guix system reconfigure ...", > where "..." is my configuration file: > > ... > creating nginx log directory '/var/log/nginx' > creating nginx run directory '/var/run/nginx' > creating nginx temp directories '/var/run/nginx/{client_body,proxy,fastcgi,uwsgi,scgi}_temp' > nginx: [alert] could not open error log file: open() "/gnu/store/pp71iff1qxwhh82vm34g18h9kmn0xrg5-nginx-1.13.9/logs/error.log" failed (2: No such file or directory) > nginx: the configuration file /gnu/store/5ixkryw6jl32cm6d1g9jb8dm9rbz8csc-nginx.conf syntax is ok > nginx: configuration file /gnu/store/5ixkryw6jl32cm6d1g9jb8dm9rbz8csc-nginx.conf test is successful > `/gnu/store/zchh8s3r1bbmia3zfxsyhsz3c4b9fmps-openssh-authorized-keys/root' -> `/etc/ssh/authorized_keys.d/root' > `/gnu/store/zchh8s3r1bbmia3zfxsyhsz3c4b9fmps-openssh-authorized-keys/andreas' -> `/etc/ssh/authorized_keys.d/andreas' > guix system: loading new services: user-homes term-auto nginx... > shepherd: Evaluating user expression (register-services (primitive-load "/gnu/st?") ?). > guix system: error: exception caught while executing 'eval' on service 'root': > find-long-options: unbound variable I had the same error when updating my i686 netbook after a long while. After a reboot everything seemed to be fine, though. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30706: Nginx service fails 2018-03-05 7:23 ` bug#30706: " Ricardo Wurmus @ 2018-03-05 7:43 ` Andreas Enge 0 siblings, 0 replies; 6+ messages in thread From: Andreas Enge @ 2018-03-05 7:43 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: guix-devel, 30706 On Mon, Mar 05, 2018 at 08:23:18AM +0100, Ricardo Wurmus wrote: > I had the same error when updating my i686 netbook after a long while. > After a reboot everything seemed to be fine, though. Ah, thanks for the information! A reboot made things worse in my case - I rebooted the virtual machine, and now I cannot ssh into it any more. So it looks like I will have to set it up from scratch again... In my case, the problem occurred between February 28 and March 4. Andreas ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30706: Nginx service fails 2018-03-04 23:06 ` Nginx service fails Andreas Enge 2018-03-05 7:23 ` bug#30706: " Ricardo Wurmus @ 2018-03-05 10:09 ` Ludovic Courtès [not found] ` <87k1uqbzq9.fsf@gnu.org> 2 siblings, 0 replies; 6+ messages in thread From: Ludovic Courtès @ 2018-03-05 10:09 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel, 30706 Andreas Enge <andreas@enge.fr> skribis: > guix system: loading new services: user-homes term-auto nginx... > shepherd: Evaluating user expression (register-services (primitive-load "/gnu/st?") ?). > guix system: error: exception caught while executing 'eval' on service 'root': > find-long-options: unbound variable The problem we have here is that the agetty service expects ‘find-long-options’ from linux-boot.scm, and it expects it at the top level. So what happens above is that we evaluate in PID 1 code like: (make <service> ;; … #:start (let ((tty … (find-long-options …) …)) …)) If you run this on an “old” GuixSD, ‘find-long-options’ is undefined. Thus the whole (register-services …) expression fails to evaluate, and we end up with some of the services missing. Conclusions: 1. ‘guix system reconfigure’ should probably register services one by one so that if one of the service expressions is erroneous, we don’t bork everything. See ‘upgrade-shepherd-services’. 2. IWBN to delay execution of this whole default-tty thing to the #:start method. Ideas, Danny? In general we should do as little as possible at the top level in the Shepherd config file. Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <87k1uqbzq9.fsf@gnu.org>]
* bug#30706: Nginx service fails [not found] ` <87k1uqbzq9.fsf@gnu.org> @ 2018-03-06 16:24 ` Danny Milosavljevic 2018-03-10 15:30 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Danny Milosavljevic @ 2018-03-06 16:24 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel, 30706 [-- Attachment #1: Type: text/plain, Size: 1320 bytes --] Hi Ludo, > If you run this on an “old” GuixSD, ‘find-long-options’ is undefined. How can it be that (gnu services base) with find-long-options call is present but the (gnu build linux-boot)'s find-long options isn't present? Aren't they either both added by "guix system reconfigure" (or both removed)? Also when selecting an old generation in the Grub boot menu, isn't both (gnu build linux-boot) and (gnu services base) at the same generation when starting up the service (as opposed to stopping the old service)? > 1. ‘guix system reconfigure’ should probably register services one by > one so that if one of the service expressions is erroneous, we > don’t bork everything. See ‘upgrade-shepherd-services’. Yes please. > 2. IWBN to delay execution of this whole default-tty thing to the > #:start method. Ideas, Danny? The idea was that if you specify a serial console at boot that you can actually log in at that console. So it's trying to find out whether, at the time of service start, there is a serial console specified (in the Linux command line), and if so, start an agetty. Otherwise do not start that agetty. We could also do that without a guix service - but I thought it would be nice to have a guix service for it as well. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30706: Nginx service fails 2018-03-06 16:24 ` Danny Milosavljevic @ 2018-03-10 15:30 ` Ludovic Courtès 0 siblings, 0 replies; 6+ messages in thread From: Ludovic Courtès @ 2018-03-10 15:30 UTC (permalink / raw) To: Danny Milosavljevic; +Cc: guix-devel, 30706 Heya, Danny Milosavljevic <dannym@scratchpost.org> skribis: >> If you run this on an “old” GuixSD, ‘find-long-options’ is undefined. > > How can it be that (gnu services base) with find-long-options call is present > but the (gnu build linux-boot)'s find-long options isn't present? The service-upgrade code loads new service definitions in PID 1. However, it does not force a reload of already-loaded modules. What happens here is that (gnu build linux-boot), the one without ‘find-long-options’, is already available in PID 1. Thus, when end up using that one, which lacks ‘find-long-options’. We could call ‘reload-module’, but that’s probably not a great idea as it could cause breakage in previously-loaded code in PID 1. So I think the current approach is the safest, and breakage of this sort should be quite rare; we should pay attention to such issues, though, and try hard to avoid them. (Note that there’s no problem once you reboot, of course.) >> 1. ‘guix system reconfigure’ should probably register services one by >> one so that if one of the service expressions is erroneous, we >> don’t bork everything. See ‘upgrade-shepherd-services’. > > Yes please. > >> 2. IWBN to delay execution of this whole default-tty thing to the >> #:start method. Ideas, Danny? > > The idea was that if you specify a serial console at boot that you can > actually log in at that console. > > So it's trying to find out whether, at the time of service start, > there is a serial console specified (in the Linux command line), and if > so, start an agetty. Otherwise do not start that agetty. > > We could also do that without a guix service - but I thought it would be > nice to have a guix service for it as well. I agree. I think what you did in c32e3ddedd103318ca3f0a4bf0c91c91e2517806 is good. The effect here is just that agetty would fail to start upon reconfigure, but that’s an acceptable limitation IMO. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-03-10 15:31 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20180304222749.GA23799@jurong> 2018-03-04 23:06 ` Nginx service fails Andreas Enge 2018-03-05 7:23 ` bug#30706: " Ricardo Wurmus 2018-03-05 7:43 ` Andreas Enge 2018-03-05 10:09 ` Ludovic Courtès [not found] ` <87k1uqbzq9.fsf@gnu.org> 2018-03-06 16:24 ` Danny Milosavljevic 2018-03-10 15:30 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).