Re: Nginx service fails

2018-03-05 Thread Ludovic Courtès
Hi,

Andreas Enge  skribis:

> On Mon, Mar 05, 2018 at 12:43:35AM +0100, Andreas Enge wrote:
>> $ guix system reconfigure AE/clementi.scm
>> guix system: error: failed to load 'AE/clementi.scm':
>> AE/clementi.scm:5:0: In procedure allocate-struct: Wrong type argument in 
>> position 2: 25
>
> I think I know the answer: .cache contains the compiled file for the operating
> system declaration (clementi.go), and with the recent changes to how these are
> parsed, it is incompatible.

Indeed.  See .  I’ve added a workaround that
addresses the most common use case.

Ludo’.



Re: Nginx service fails

2018-03-04 Thread Andreas Enge
Hello,

On Mon, Mar 05, 2018 at 12:43:35AM +0100, Andreas Enge wrote:
> $ guix system reconfigure AE/clementi.scm
> guix system: error: failed to load 'AE/clementi.scm':
> AE/clementi.scm:5:0: In procedure allocate-struct: Wrong type argument in 
> position 2: 25

I think I know the answer: .cache contains the compiled file for the operating
system declaration (clementi.go), and with the recent changes to how these are
parsed, it is incompatible.

> Is this normal? How are users supposed to know they should delete .cache?

Hopefully, this does not occur with "guix pull", and then it might be
considered normal... Is .cache actually necessary, since we generally
recompile from make files? Or is it needed since the make files do not
encode the precise dependency graph of the modules, as they usually do
for C code? If it is not necessary, could it be disabled by the project?

Andreas




Re: Nginx service fails

2018-03-04 Thread Andreas Enge
PS: I rebooted the virtual machine, and now it looks as if even the
openssh service did not start:
... port 22: Connection refused
:-(




Re: Nginx service fails

2018-03-04 Thread Andreas Enge
Hello Danny,

thanks for your quick reply!

On Mon, Mar 05, 2018 at 12:07:44AM +0100, Danny Milosavljevic wrote:
> find-long-options is supposed to be in gnu/build/linux-boot.scm and
> gnu/services/base.scm is using it.
> 
> It's in there for some weeks now...
> 
> You can find out where guix is by:
> readlink $(which guix)
> and then examine the scm files there...

It should not matter, since I am using "./pre-inst-env" in a current
git checkout. But "guix --version" is at 0.14.0-9.bdf0c64, which also
has find-long-options. I did a successful reconfigure on February 28.

Trying to use the old guix (without ./pre-inst-env), I am also running
into trouble:
$ guix system reconfigure AE/clementi.scm
guix system: error: failed to load 'AE/clementi.scm':
AE/clementi.scm:5:0: In procedure allocate-struct: Wrong type argument in 
position 2: 25

The configuration file looks like this:
(use-modules (gnu))
(use-service-modules networking ssh web)
(use-package-modules screen ssh vim)

(operating-system
  (host-name "clementi")

So line 5 is "operating-system". I think there is a problem with caching
somewhere:
$ rm -rf ~/.cache
$ guix system reconfigure AE/clementi.scm
Now things happen. (But they hang when contacting the substitute server.)

It has also bitten me in the other direction:
When I run "guix system reconfigure...", press "Ctrl-C" immediately, and then
run "./pre-inst-env guix system reconfigure...", I get almost the same message:
guix system: error: failed to load 'AE/clementi.scm':
/home/andreas/guix/AE/clementi.scm:5:0: In procedure allocate-struct: Wrong 
type argument in position 2: 24

Is this normal? How are users supposed to know they should delete .cache?
And when is this actually necessary?

Andreas




Re: Nginx service fails

2018-03-04 Thread Danny Milosavljevic
Hi Andreas,

> 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

find-long-options is supposed to be in gnu/build/linux-boot.scm and
gnu/services/base.scm is using it.

It's in there for some weeks now...

(define agetty-shepherd-service
  (match-lambda
...
 (modules '((ice-9 match) (gnu build linux-boot)))
...
 (start #~(let ((tty #$(default-serial-port)))
...

You can find out where guix is by:

readlink $(which guix)

and then examine the scm files there...


pgpo_XvY34SoN.pgp
Description: OpenPGP digital signature


Re: Nginx service fails

2018-03-04 Thread Andreas Enge
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