Hello,
I am setting up the develpment version indico instance following the guide https://docs.getindico.io/en/stable/installation/development/
When I run webpack watcher, I have got the error.
cd ~/dev/indico
virtualenv env -p /usr/bin/python2.7
source ./env/bin/activate
cd src
./bin/maintenance/build-assets.py indico --dev --watch
Traceback (most recent call last):
File "./bin/maintenance/build-assets.py", line 273, in <module>
cli()
File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mlx/dev/indico/env/lib/python2.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "./bin/maintenance/build-assets.py", line 181, in build_indico
subprocess.check_call(['npx', 'webpack'] + args)
File "/usr/lib64/python2.7/subprocess.py", line 537, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 524, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
What caused the problem ? WHat should I check ?
Thanks a lot,
“Permission denied” when running webpack seems strange. Try running npx webpack --help
manually and see if this works.
you are right. npx is missing. I re-installed nodejs.
npx -v
6.14.6
“npx webpack --help” works now.
I re-ran “npm install”
(env) [mlx@cindico src]$ npm install
npm WARN leaflet.markercluster@1.4.1 requires a peer of leaflet@~1.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fullcalendar/node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fullcalendar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
audited 2529 packages in 13.789s
104 packages are looking for funding
run `npm fund` for details
found 7 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
./bin/maintenance/build-assets.py indico --dev --watch
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js'
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Main.js'
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Bold/Other.js'
Error from chokidar (/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/mlx/dev1/indico/src/node_modules/mathjax/unpacked/jax/output/SVG/fonts/TeX/SansSerif/Italic/BasicLatin.js'
I have got a lot of errors. I do not understand them.
What should I check ?
Thank you very much!!
Googline for “System limit for number of file watchers reached” most likely helps. Anyway, you can just omit the --watch
to disable the file watcher. Since you won’t edit JS/CSS files having the watcher running isn’t important anyway.
I have fixed th error “System limit for number of file watchers reached”. I hav encountered other problems now.
Here is what I did:
cd ~/dev1/indico/
virtualenv env -p /usr/bin/python2.7
source ./env/bin/activate
cd src
./bin/maintenance/build-assets.py indico --dev --watch &
indico run -h cindico.ihep.ac.cn -q --enable-evalex &
sudo setsebool -P httpd_can_network_connect 1
sudo setsebool -P httpd_read_user_content 1
sudo chown -R mlx:nginx /var/lib/nginx/tmp/
indico run -h 127.0.0.1 -p 8000 -q --enable-evalex --url https://cindico.ihep.ac.cn --proxy &
sudo systemctl start nginx
When I run them above, everything looks ok. I did not get erros.
But , it does not work when I link to https://cindico.ihep.ac.cn in browser.
" 504 Gateway Time-out" is shown at webpage.
There is no any message in log files
$ ls -l
total 0
-rw-rw-r--. 1 mlx mlx 0 Jul 26 14:42 celery.log
-rw-rw-r--. 1 mlx mlx 0 Jul 26 14:42 indico.log
-rw-rw-r--. 1 mlx mlx 0 Jul 26 14:42 other.log
I saw the following line in nginx log
more cindico.ssl_error_log
2020/07/28 15:02:03 [error] 13423#0: *9 upstream timed out (110: Connection timed out) while reading response header from upstream, client: ::ffff:202.122.32.62, server: cindico.ihep.ac.cn, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:8000/", host: "cindico.ihep.ac.cn"
$ cat indico/indico.conf
# General settings
SQLALCHEMY_DATABASE_URI = 'postgresql:///indico'
SECRET_KEY = ......
#BASE_URL = 'http://127.0.0.1:8000'
BASE_URL = 'https://cindico.ihep.ac.cn'
CELERY_BROKER = 'redis://127.0.0.1:6379/0'
REDIS_CACHE_URL = 'redis://127.0.0.1:6379/1'
CACHE_BACKEND = 'redis'
DEFAULT_TIMEZONE = 'Asia/Shanghai'
DEFAULT_LOCALE = 'en_GB'
ENABLE_ROOMBOOKING = True
CACHE_DIR = '/home/mlx/dev1/indico/data/cache'
TEMP_DIR = '/home/mlx/dev1/indico/data/tmp'
LOG_DIR = '/home/mlx/dev1/indico/data/log'
STORAGE_BACKENDS = {'default': 'fs:/home/mlx/dev1/indico/data/archive'}
ATTACHMENT_STORAGE = 'default'
# Development options
DB_LOG = True
DEBUG = True
SMTP_USE_CELERY = False
WHat should I check ?
Thanks a lot,
Does accessing http://127.0.0.1:8000
directly on the server work? And try not sending the process into the background with &
so you actually see if it shows any error, receives requests, etc.
PS: Just to be sure: This is an internal test setup, right? Because if cindico.ihep.ac.cn
was a public host, this deployment - especially with --enable-evalex
- would be highly insecure.
Irun “indico proxy” in frontend
indico run -h 127.0.0.1 -p 8000 -q --enable-evalex --url https://cindico.ihep.ac.cn --proxy
and try
lynx http://127.0.0.1:8000
it shows “HTTP request sent; waiting for response.”
No errors show at proxy
indico run -h 127.0.0.1 -p 8000 -q --enable-evalex --url https://cindico.ihep.ac.cn --proxy
Does “Indico proxy” not work ?
This is an internal test setup, it cannot be access forn outside.
The setup with nginx as described in the dev setup guide works fine for us. I’m afraid we cannot really help you debug this problem but my guess would be some weird issue with selinux or your local firewall if not even accessing the dev server via 127.0.0.1:8000 works…