ish
ish copied to clipboard
nginx doesn’t work.
I tried to run nginx and it shows “bad system call” when I try to test the config file.
Diegos-iPad:~# nginx -v
nginx version: nginx/1.14.1
Diegos-iPad:~# nginx -t
Bad system call
Diegos-iPad:~#
Could you run dmesg
and tell me which missing syscall it is?
of course, give me a sec
Diegos-iPad:~# dmesg
15 missing syscall 329
15 missing syscall 329
That's epoll_create1
. It's going to be a bit before I get epoll working.
Ok, thanks. I'll keep playing with the app. Kudos for it. So far I'm super impressed. BTW, that reply speed was totally unexpected
epoll should be working now. I don't know if that means nginx is fixed though.
I just tried it and it says:
Diegos-iPad:~# nginx -v nginx version: nginx/1.14.1 Diegos-iPad:~# nginx -t Bad system call Diegos-iPad:~# dmesg 3 missing syscall 329
Is the fix coming in a new build? I have build (37)
Sent with GitHawk
I'm about to push build 38, try again once you've updated.
It no longer causes a bad system call, it throws an error due to a file not being found but I’m assuming that’s an error in the package, I’ll try later to investigate further.
Sent with GitHawk
That sounds like it could be #217
Maybe but I’m guessing it’s an error when nginx tries to call some function to check there’s an instance of nginx running or something like that. There’s no bad system call though, also dmesg returns nothing. The actual error is:
Diego:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
Diego:~#
I checked and indeed there’s no file there, i manually created one and now when I run “nginx -t” iSH crashes HARD. I tried removing the file but that didn’t help. I had to delete and reinstall the app.
I tried to run nginx in ISH on my Ipad. At first everything seemed to work well. nginx -t
gave me success messages. Nevertheless, the welcome page of nginx was never accessible. The error log read:
2019/11/27 14:03:18 [alert] 223#0 ioctl(FIOASYNC) failed while spawning "worker process"(25:not a tty)
I configure worker process auto
in nginx.conf. Is this my problem or because ISH doesn't support nginx at present?
nginx uses an obscure api for worker processes that ish doesn't support. I know it works with daemon off and worker_process off.
Thank you for the reply. Daemon off and work _processes off do not produce any error messages in log, but the welcome page of nginx is still inaccessible. I’m sure l’m visiting the right port...
How do you start nginx? I looked it up for alpine and rc-service is not a command in ish.
openrc is not working yet, you have to manually run nginx
.
nginx uses an obscure api for worker processes that ish doesn't support. I know it works with daemon off and worker_process off.
I'm sorry for bumping this issue from last year, but I was also trying to use nginx from iSH a while ago. I had to manually create the /run/nginx/
directory to fix the nginx: [emerg] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
error, and I followed the advice by @tbodt quoted above to no avail. The error.log
didn't have anything saved from the time I started it to the time I closed it and the access.log
is completely empty. dmesg
doesn't show any output, so I'm not sure where the issue is coming from.
I'm trying to run nginx too now, it's running without error but I can't seem to call port 80 or port 81 in the browser.
I tried running a web server using gunicorn on port 8000 and it is working fine. I'm not sure if I miss a configuration for nginx to run properly.
Those ports are restricted on iOS if I remember correctly. Try using something in the 2000s
I have given up for nginx to work on iSH for now.
I'll just use python3's http.server
to host static html then gunicorn
to run REST apis.
python3 -m http.server 80
gunicorn rest:api
Those ports are restricted on iOS if I remember correctly. Try using something in the 2000s
I had a feeling it had something to do with this. I would say find some way to get past this (other than changing the port number to >1024) but that would most definitely get the app removed from the App Store. Maybe there's some way that the app could reject the port bind calls for anything below 1024 that way users aren't confused about why nginx or any other program is "listening" on that port but not actually working.
Those ports are restricted on iOS if I remember correctly. Try using something in the 2000s
I had a feeling it had something to do with this. I would say find some way to get past this (other than changing the port number to >1024) but that would most definitely get the app removed from the App Store. Maybe there's some way that the app could reject the port bind calls for anything below 1024 that way users aren't confused about why nginx or any other program is "listening" on that port but not actually working.
I was able to run a webserver on port 80 using this command:
python3 -m http.server 80
@tbodt or @saagarjha may have to chime in then
Port 80 is generally allowed, in fact there are app store apps (such as VLC) that run web servers on port 80. More likely nginx is broken.
nginx version 1.20.2,use nginx -g "master_process off;"
to run nginx will be ok.
However, every time you request a backend, you need to switch the task between ISH and browser,It may be that ISH cannot refresh data in the background.
nginx version 1.20.2,use
nginx -g "master_process off;"
to run nginx will be ok.However, every time you request a backend, you need to switch the task between ISH and browser,It may be that ISH cannot refresh data in the background.
Try this command to enable running iSH in background
cat /dev/location > /dev/null &
iPhone/iPad may ask you if it's ok to give away your location but it isn't what you think it is.
nginx version 1.20.2,use
nginx -g "master_process off;"
to run nginx will be ok. However, every time you request a backend, you need to switch the task between ISH and browser,It may be that ISH cannot refresh data in the background.Try this command to enable running iSH in background
cat /dev/location > /dev/null &
iPhone/iPad may ask you if it's ok to give away your location but it isn't what you think it is.
thanks,it work.
I have to use @oukanghua ‘s line with master_process off to be able to visit localhost… but I cannot for the life of me figure out the permissions (and ownership) or nginx.conf… I can get indexing to work for a target folder, but when it comes to serving the file the connection immediately dies. I’ve tried /var/www, /usr/share/nginx/html, htdocs, and none work.