Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/node18-prisma-rest-express: No connection established #96

Open
razvand opened this issue Mar 10, 2024 · 2 comments
Open

examples/node18-prisma-rest-express: No connection established #96

razvand opened this issue Mar 10, 2024 · 2 comments

Comments

@razvand
Copy link
Contributor

razvand commented Mar 10, 2024

The Node Prisma example (PR #56) starts, but no connection can be made. Use the following commands to replicate:

port=3000
memory=512M
branch="razvand/examples/catalog-node-prisma"
runtime="library/node/18"
path="examples/node18-prisma-rest-express"

rm -fr catalog
rm start-buildkit.sh

wget https://raw.githubusercontent.com/unikraft/catalog-for-maintainers/main/utils/start-buildkit.sh
source start-buildkit.sh

git clone https://github.com/unikraft/catalog
cd catalog

git remote add unikraft-upb https://github.com/unikraft-upb/catalog
git fetch unikraft-upb
git checkout -b "$branch" unikraft-upb/"$branch"
pushd "$runtime"
sed -i -e "s/# CONFIG_LIBSYSCALL_SHIM_STRACE: 'y'/CONFIG_LIBSYSCALL_SHIM_STRACE: 'y'/" Kraftfile
kraft build --no-cache --no-update --plat qemu --arch x86_64
popd

pushd "$path"
kraft rm --all
kraft run --rm --log-type basic --log-level debug --runtime ../../"$runtime"/.unikraft/build/node_qemu-x86_64 -M "$memory" -p "$port":"$port" . &
sleep 5
kraft stop --all
kraft rm --all
qemu-system-x86_64 -append "vfs.fstab=[ \"initrd0:/:extract:::\"] -- /usr/bin/node /usr/src/server.js"  -cpu max -device virtio-net-pci,mac=02:b0:b0:37:b6:01,netdev=hostnet0 -nographic -initrd .unikraft/build/initramfs-x86_64.cpio -kernel 
../../"$runtime"/.unikraft/build/node_qemu-x86_64 -netdev user,id=hostnet0,hostfwd=tcp::3000-:3000 -m 512M
popd

The output message is:

open("/usr/src/libquery_engine-linux-musl-openssl-3.0.x.so.node", O_RDONLY|O_CLOEXEC|0x8000) = fd:19
fcntl(0x13, 0x2, ...) = 0x0
fstat(fd:19, <out>stat:{st_size=15587664, st_mode=0100644, ...}) = OK
read(fd:19, <out>"\x7FELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00>\x00\x01\x00\x00\x00"..., 960) = 960
mmap(NULL, 15597568, PROT_READ, MAP_PRIVATE, fd:19, 0) = va:0x1000a4a000
mmap(va:0x1000af7000, 10760192, PROT_EXEC|PROT_READ, MAP_PRIVATE|MAP_FIXED, fd:19, 708608) = va:0x1000af7000
mmap(va:0x100153a000, 3608576, PROT_READ, MAP_PRIVATE|MAP_FIXED, fd:19, 11468800) = va:0x100153a000
mmap(va:0x10018ab000, 520192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, fd:19, 15073280) = va:0x10018ab000
mmap(va:0x1001929000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, fd:-1, 0) = va:0x1001929000
close(fd:19) = OK
open("/usr/local/lib/libssl.so.3", O_RDONLY|O_CLOEXEC|0x8000) = No such file or directory (-2)
open("/usr/lib/libssl.so.3", O_RDONLY|O_CLOEXEC|0x8000) = No such file or directory (-2)
open("/lib/libssl.so.3", O_RDONLY|O_CLOEXEC|0x8000) = fd:19
fcntl(0x13, 0x2, ...) = 0x0
fstat(fd:19, <out>stat:{st_size=544728, st_mode=0100755, ...}) = OK
read(fd:19, <out>"\x7FELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00>\x00\x01\x00\x00\x00"..., 960) = 960
mmap(NULL, 548864, PROT_READ, MAP_PRIVATE, fd:19, 0) = va:0x100192a000
mmap(va:0x100193b000, 303104, PROT_EXEC|PROT_READ, MAP_PRIVATE|MAP_FIXED, fd:19, 69632) = va:0x100193b000
mmap(va:0x1001985000, 118784, PROT_READ, MAP_PRIVATE|MAP_FIXED, fd:19, 372736) = va:0x1001985000
mmap(va:0x10019a2000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, fd:19, 487424) = va:0x10019a2000
close(fd:19) = OK
open("/usr/local/lib/libcrypto.so.3", O_RDONLY|O_CLOEXEC|0x8000) = No such file or directory (-2)
open("/usr/lib/libcrypto.so.3", O_RDONLY|O_CLOEXEC|0x8000) = No such file or directory (-2)
open("/lib/libcrypto.so.3", O_RDONLY|O_CLOEXEC|0x8000) = fd:19
fcntl(0x13, 0x2, ...) = 0x0
fstat(fd:19, <out>stat:{st_size=4298000, st_mode=0100755, ...}) = OK
read(fd:19, <out>"\x7FELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00>\x00\x01\x00\x00\x00"..., 960) = 960
mmap(NULL, 4313088, PROT_READ, MAP_PRIVATE, fd:19, 0) = va:0x10019b0000
mmap(va:0x10019f9000, 2777088, PROT_EXEC|PROT_READ, MAP_PRIVATE|MAP_FIXED, fd:19, 299008) = va:0x10019f9000
mmap(va:0x1001c9f000, 847872, PROT_READ, MAP_PRIVATE|MAP_FIXED, fd:19, 3076096) = va:0x1001c9f000
mmap(va:0x1001d6e000, 389120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, fd:19, 3919872) = va:0x1001d6e000
mmap(va:0x1001dca000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, fd:-1, 0) = va:0x1001dca000
close(fd:19) = OK
mprotect(va:0x10018ab000, 491520, PROT_READ) = OK
mprotect(va:0x10019a2000, 40960, PROT_READ) = OK
mprotect(va:0x1001d6e000, 364544, PROT_READ) = OK
rt_sigprocmask(0x0, 0x1000140878, ...) = 0x0
membarrier(0x8, 0x0, ...) = Function not implemented (-38)
rt_sigprocmask(0x0, 0x1000140878, ...) = 0x0
rt_sigaction(0x22, 0x40037b090, ...) = 0x0
tkill(0xb, 0x22, ...) = 0x0
tkill(0xa, 0x22, ...) = 0x0
tkill(0x9, 0x22, ...) = 0x0
tkill(0x8, 0x22, ...) = 0x0
tkill(0x7, 0x22, ...) = 0x0
tkill(0x6, 0x22, ...) = 0x0
tkill(0x5, 0x22, ...) = 0x0
tkill(0x4, 0x22, ...) = 0x0
tkill(0x3, 0x22, ...) = 0x0
tkill(0x2, 0x22, ...) = 0x0

The output message without logging is:

Powered by Unikraft Telesto (0.16.2~ec1f7fe)               
                                                                                                                       
🚀 Server ready at: http://localhost:3000                                                                              
⭐️ See sample requests: http://pris.ly/e/js/rest-express#3-using-the-rest-api                                                                                                                                                                  
en1: Set IPv4 address 10.0.2.15 mask 255.255.255.0 gw 10.0.2.2 
@amroKerkizz
Copy link

Hi im a student at the University of Texas at Austin and would love to help work on this issue!

@razvand
Copy link
Contributor Author

razvand commented Apr 4, 2024

Hi im a student at the University of Texas at Austin and would love to help work on this issue!

Hi, @amroKerkizz , this is already solved internally, but a pull request hasn't yet been submitted. You can take a look at the New list sheet in this document for apps you could add to the catalog. Follow this guide.

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

No branches or pull requests

2 participants