unikraft / pykraft

Python library for configuring and building unikernels
Other
177 stars 42 forks source link

Nginx errors at startup #106

Open molpo95 opened 2 years ago

molpo95 commented 2 years ago

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):

Additional context Add any other context about the problem here.

gabrielmocanu commented 2 years ago

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 commented 2 years ago

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 unikraft@0.5 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 commented 2 years ago

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