Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Nginx errors at startup #106

Open
molpo95 opened this issue Apr 11, 2022 · 3 comments
Open

Nginx errors at startup #106

molpo95 opened this issue Apr 11, 2022 · 3 comments
Assignees

Comments

@molpo95
Copy link

molpo95 commented Apr 11, 2022

Describe the bug
I am trying to create a nginx webserver on Unikraft.
While other unikernels seem to work for me, nginx only gives errors.

It boots, finds the config but does not read it properly then it shuts down.

Everything should have been set up according to the documentation, unless I have done something wrong.

To Reproduce
I have installed kraft according to the this site on ubuntu 20.04.
The app was installed using the "kraft up", configured to kvm and x86-64.

The kernel was started with the following command:
sudo qemu-system-x86_64 -fsdev local,id=myid,path=$(pwd)/fs0,security_model=none
-device virtio-9p-pci,fsdev=myid,mount_tag=fs0,disable-modern=on,disable-legacy=off
-netdev bridge,id=en0s3,br=virbr0
-device virtio-net-pci,netdev=en0s3
-kernel "build/nginx_kvm-x86_64"
-append "netdev.ipv4_addr=172.44.0.2 netdev.ipv4_gw_addr=172.44.0.1 netdev.ipv4_subnet_mask=255.255.255.0 --"
-cpu host -enable-kvm -nographic -m 1024M

Expected behavior
The kernel should start up with the configuration.

Output

o. .o _ _ __ _
Oo Oo ___ () | __ __ __ _ ' ) :
oO oO ' _ | | |/ / _)' _ | |
| )
oOo oOO| | | | | (| | | (
) | ) :
OoOoO ., .::,_., .__,:_, ___)
Tethys 0.5.0~b8be82b
nginx: [emerg] pread() returned only 0 bytes instead of 361 in /nginx/conf/nginx.conf:1

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 20.04.1

Additional context
Add any other context about the problem here.

@gabrielmocanu
Copy link
Member

Hi @molpo95 .

From what I see in your output you are running an older version of Unikraft.
Can you update to the latest version and see if you have the same problem?

@molpo95
Copy link
Author

molpo95 commented May 7, 2022

Hi @gabrielmocanu

I tried reinstalling it fresh on a virtual machine using "pip3 install git+https://github.com/unikraft/kraft.git@staging". It seems that it defaults to [email protected] while setting up the kernel. Have I missed a step? What is the proper way of changing the version used for the kernel?
I am sorry if I am a bother.

@gabrielmocanu
Copy link
Member

Hi @molpo95,

Unfortunately, I couldn't reproduce your behavior. A solution to get the latest changes would be to install kraft manually.
You can find a tutorial for this in this documentation. 1

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

No branches or pull requests

3 participants