Issue installing 2.1.9

OK

been away for a couole of days, but managed to get 2.1.9 clone downloaded onto my machine - 2.2 wasnt going to work with some of our custom stuff so decided to persevere with 2.1.9.

Started install this morning using install notes

All ok up to pip install -e .

got the following error almost instantly.

(env) [indico@dev-events02 src]$ pip install -e .
Obtaining file:///opt/indico/dev/indico/src
Exception:
Traceback (most recent call last):
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/req/req_set.py", line 521, in _prepare_file
    req_to_install.check_if_exists()
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/req/req_install.py", line 1036, in check_if_exists
    self.req.name
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 558, in get_distribution
    dist = get_provider(dist)
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 432, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/indico/dev/indico/env/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 859, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (email-validator 1.0.4 (/opt/indico/dev/indico/env/lib/python2.7/site-packages), Requirement.parse('email-validator==1.0.3'), set(['indico']))
(env) [indico@dev-events02 src]$ 

what have i done wrong?

pip uninstall -y email-validator - not sure why it fails due to the invalid version instead of just installing the correct one.

cheers - that worked fine

then run npm install and got this - is this Ok?

(env) [indico@dev-events02 src]$ npm install
npm WARN saveError ENOENT: no such file or directory, open '/opt/indico/dev/indico/src/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/opt/indico/dev/indico/src/package.json'
npm WARN src No description
npm WARN src No repository field.
npm WARN src No README data
npm WARN src No license field.

up to date in 0.414s
found 0 vulnerabilities

2.1 does not use npm - use the 2.1 docs if you are installing 2.1: https://docs.getindico.io/en/v2.1.9/

ops - sorry

rerun using fab setup-deps asnd it done loads (a few syntax errors were displayed, but it carried on ) with a final

Done, without errors.
[localhost] local: mkdir -p /opt/indico/dev/indico/src/indico/htdocs/js/lib
[localhost] local: cp dist/jquery.js /opt/indico/dev/indico/src/indico/htdocs/js/lib/
Installing ckeditor
[localhost] local: ./build.sh --skip-omitted-in-build-config --no-zip --no-tar --build-config ../../build-config.js
/bin/sh: ./build.sh: Permission denied

Fatal error: local() encountered an error (return code 126) while executing './build.sh --skip-omitted-in-build-config --no-zip --no-tar --build-config ../../build-config.js'

Aborting.
(env) [indico@dev-events02 src]$ 

sooo close…

have looked at permissions on both build-config.sh files i can find (ext_modules/ckeditor and ext_modules/dev/builder/ckeditor ) and both are -rw-r–r--

should i just chmod on these 2 to 777?

You pretty much never need/want 777 on anything :slight_smile: Making things world-writable is generally a terrible idea (which was way too common in the bad old times of badly configured shared hosting servers).

Look for a build.sh inside ext_modules/ckedtor/; and chmod +x that file - it looks like it’s not flagged as executable for some reason. You could also try simply rm -rf ext_modules; it should be recreated during fab setup_deps.

Silly question – most of mine are.

I have now got 2.1.9 up and running and source code editable in eclipse.

If I make a change to the source code what do I need to do to see that change in the running code

Cheers.

If it’s a local dev setup with the indico run dev server in debug mode, changes should be picked up automatically…

cheers - thought that was the case, must have changed the wrong bit of code LOL

OK

I have installed 2.1.9 and had it up and running (out of box)

i have installed plugin paypal, added appropriate paypal text to the conf file but see two plugins , the other one is bank transfer, although I have not referenced this in conf file.

i have changed some text in root_category.html

i now cannot get the app to load - just sits there ‘loading’

i had this yesterday and have reinstalled today but got same issue

what i cannot understand is i can run the app now problem until i change a bit of code.

i have flushed out chrome cashes the lot

every time i have used indico run -h dev-events02 -q --enable-evalex and this is being called within an ‘env’

No output in terminal to tell me anything.

If i go and reload code i can run base version up, and all is OK, until i change any source code.

i have even reverted to NOT use eclipse and change code using vi to see if it makes a difference, but it doesn’t - once code change made it just hangs in a ‘loading’ state

Help! Please!!! :slight_smile:

Looking at a virtualBox VM (centos based)which i was initially developing on, which has been working for the last few months (I am now setting up a ‘real’ centos box) I notice the following regards permissions and ownership of the source code (example below)

On the VB VM (which works fine) I get the following

[indico@centos display]$ ls -lh
total 40K
-rw-rw-r--. 1 indico indico 4.1K May  3 10:45 base.html
-rw-rw-r--. 1 indico indico 1.4K May  3 10:45 calendar.html
-rw-rw-r--. 1 indico indico  559 May  3 10:45 _calendar_ongoing_events.html
-rw-rw-r--. 1 indico indico 1.6K May  3 10:45 category.html
-rw-rw-r--. 1 indico indico  746 May  3 10:45 category_list.html
-rw-rw-r--. 1 indico indico 5.2K May  3 10:45 event_list.html
drwxrwxr-x. 2 indico indico   92 May  3 10:45 overview
-rw-rw-r--. 1 indico indico 1.1K May  3 12:05 root_category.html
-rw-rw-r--. 1 indico indico 3.6K May  3 10:45 sidebar.html
[indico@centos display]$ pwd
/home/indico/dev/indico/src/indico/modules/categories/templates/display

On the ‘real’ centos VM (which doesn’t work once i have changed the code) i get this

[indico@dev-events02 display]$ ls -lh
total 40K
-rw-r--r--. 1 indico apache 4.2K Sep  12 10:49 base.html
-rw-r--r--. 1 indico apache 1.4K Sep  12 10:49 calendar.html
-rw-r--r--. 1 indico apache  573 Sep  12 10:49 _calendar_ongoing_events.html
-rw-r--r--. 1 indico apache 1.7K Sep  12 10:49 category.html
-rw-r--r--. 1 indico apache  762 Sep  12 10:49 category_list.html
-rw-r--r--. 1 indico apache 5.3K Sep  12 10:49 event_list.html
drwxrwxr-x. 2 indico apache 4.0K Sep  12 10:49 overview
-rw-r--r--. 1 indico apache  725 Sep  12 13:28 root_category.html
-rw-r--r--. 1 indico apache 3.7K Sep  12 10:49 sidebar.html

Does this have anything to do with it.

in both cases i an logged in as an indico user and running from within an ‘env’

got it running now :slight_smile: - changed group permissions and reinstalled and it is working - not going to touch it anymore!!!

spoke too soon - my changes started to appear and now they have gone and admin showing plugins with nothing added to the indico.conf. sounds like we have serious cache issues here LOL - new day tomorrow!

there is no caching, so it sounds like you are not editing the indico.conf that’s actually being used. if you are not using an env var pointing to the config file, check where the ~/.indico.conf symlink points

Mornin
Thanks for the pointer – I had no env set or a symlink.
I have now made an env to the indico/indico.conf file and had mixed results
My first attempt at starting the app resulted in

/opt/indico/dev/indico/env/lib/python2.7/site-packages/indico/core/config.py:174: UserWarning: Ignoring unknown config key ASSETS_DIR
  warnings.warn('Ignoring unknown config key {}'.format(key))

and it hung.
I stopped it and removed offending ASSETS_DIR entry from config file.
On restart it hangs as below –

(env) [indico@dev-events02 indico]$ indico run -h dev-events02 -q --enable-evalex
 * Serving Indico on http://dev-events02:8000
 * Werkzeug debugger console on http://dev-events02:8000/console
 * Werkzeug debugger console is available to all clients!
 * Running on http://dev-events02:8000/ (Press CTRL+C to quit)

i.e. it doesn’t complete as it used to

(env) [indico@dev-events02 indico]$ indico run -h dev-events02 -q --enable-evalex
 * Serving Indico on http://dev-events02:8000
 * Werkzeug debugger console on http://dev-events02:8000/console
 * Werkzeug debugger console is available to all clients!
 * Running on http://dev-events02:8000/ (Press CTRL+C to quit)
 * Restarting with inotify reloader
 * Debugger is active!
 * Debugger PIN: 162-631-996

I did notice that the indico.conf didn’t have W permissions on group (see yesterdays many posts) so gave the group W permissions – made no difference
My Conf file is now as follows

(env) [indico@dev-events02 indico]$ cat indico.conf
# General settings
SQLALCHEMY_DATABASE_URI = 'postgresql:///indico'
SECRET_KEY = ''
BASE_URL = 'https://dev-events02'
CELERY_BROKER = 'redis://127.0.0.1:6379/0'
REDIS_CACHE_URL = 'redis://127.0.0.1:6379/1'
CACHE_BACKEND = 'redis'
DEFAULT_TIMEZONE = 'UTC'
DEFAULT_LOCALE = 'en_GB'
ENABLE_ROOMBOOKING = False
CACHE_DIR = '/opt/indico/dev/indico/data/cache'
TEMP_DIR = '/opt/indico/dev/indico/data/tmp'
LOG_DIR = '/opt/indico/dev/indico/data/log'
STORAGE_BACKENDS = {'default': 'fs:/opt/indico/dev/indico/data/archive'}
ATTACHMENT_STORAGE = 'default'

# Email settings
SMTP_SERVER = ('127.0.0.1', 1025)
SMTP_USE_TLS = False
SMTP_LOGIN = ''
SMTP_PASSWORD = ''
SUPPORT_EMAIL = 'mark.golder@geant.org'
PUBLIC_SUPPORT_EMAIL = 'mark.golder@geant.org'
NO_REPLY_EMAIL = 'noreply@geant.org'

# Development options
DB_LOG = True
DEBUG = True
SMTP_USE_CELERY = False
(env) [indico@dev-events02 indico]$

Any ideas – I am sooo nearly there as had it running a few times in last 24 hours – just cannot get it to run and pick up my changes (and now this)!).
Mark.

OK

I have identified a pattern.

If I install 2.1.9, and add a INDICO_CONFIG link I can start indico fine. I can change code using Vi or even eclipse and these changes are reflected straight away (GUI) or on a restart (logic) once the change has been saved.

During my initial installation we needed to grant W privilages to the group as these were missing and was causing problems last week.

Once I install the plugins things start to go wrong. Sometimes it will start up, pointing to ‘old’ code (i.e. displaying screens that I had made GUI changes to 15 minutes earlier in their ‘unchanged’ state) or just sit there hanging.


su – indico

source ./env/bin/activate

pip install indico-plugins

If I go through the process of


pip install -e .

fab setup_deps

again then I can start the app up. No problem, but of course I have no plugins.

I have done this process about 4 or 5 times now, with mixed results after each plugin install – but at least I can get back to my ‘base’ code relatively quickly!

Any idea what is happening ??

I am just about to get a restore point made of a ‘good – no plugin’ VM and then try some other stuff but it is quite frustrating to keep having to restore back your original code to try something else out?

That sounds like a misconfiguration somewhere else. Nothing in Indico requires write permissions for group/world…

It sounds a bit like you are using a mix of the development and production setup. For example, you usually do not have an indico user in a dev setup…

I have followed the dev install instructions. i have done this many times with 2.1.8 on Oracle VB VM’s but now doing it on a ‘real’ VM which i had no say in the setup. I an only allowed to sudo to root user and indico is the user Iwhich have always used in all other installs - if fact i can remember yourselves saying never install as root user, always as indico user sometime in the past! Regarding W permissions - if i take away W permissions from the group from src folder down it will not start - put it back and it will! . i wlll get there but it is becoming ‘a pain in the butt’ as my American friends would say LOL

If you install on “a real vm” then you should probably use the “production” setup (even if it’s a demo/staging/whatever system). The “dev” setup guide is really meant for a setup on your local machine where you then do development etc.

Build a wheel locally and install that on the VM using pip install /path/to/indico-whatever.whl instead of pip install indico