manifoldscholar / manifold-omnibus Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Our nginx config has /opt/manifold/embedded/src/client/dist/manifold/www set as the root. There are valid cases for adding files to the webroot, such as a custom robots.txt file, so we may want to expand our nginx config to fallback to a directory that the admin controls.
In submitting a resource batch load process, which included many animated GIFs, we observed our Manifold instance peg two CPUs and remain at a load average of 15 for several minutes. It eventually cooled off, but it was nerve-wracking to watch. There should be a way to throttle the image processing queue to keep the CPU load workable.
For reproduction purposes, the google sheet of the metadata we're using is here:
https://docs.google.com/spreadsheets/d/1ATwb0Jf4dbNqFZd7faRnLEqq898I662G9AnKNRvM6Ps/edit?usp=sharing
and the drive folder is here:
https://drive.google.com/drive/folders/1Uj81gzMflKiyeTObg5npZ7aoIby3d6hz?usp=sharing
We recently upgraded our instance of Manifold from 4.1.0~beta.1-1.el7 to 5.0.0-1.el7 (and ran into some difficulty, which we logged on issue #42). A user noticed that searching wasn't working. In troubleshooting, we determined that the Elastic Search service was not booting up correctly. Looking at the log files:
2020-07-16_22:11:08.31908 [2020-07-16T22:11:08,314][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
2020-07-16_22:11:08.31923 org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: plugins directory [/opt/manifold/embedded/elasticsearch/plugins] not found
2020-07-16_22:11:08.31928 at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31932 at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31938 at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31944 at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31952 at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31958 at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31963 at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31968 Caused by: java.lang.IllegalStateException: plugins directory [/opt/manifold/embedded/elasticsearch/plugins] not found
2020-07-16_22:11:08.31974 at org.elasticsearch.bootstrap.Spawner.spawnNativePluginControllers(Spawner.java:69) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31979 at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:168) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31983 at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31987 at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.15.jar:5.6.15]
2020-07-16_22:11:08.31992 ... 6 more
I could see that ES was failing to load because it could not find this plugins folder:
/opt/manifold/embedded/elasticsearch/plugins
I confirmed this folder did not exist, created it manually, and restarted ES with a sudo manifold-ctl restart elasticsearch
command. I confirmed the service was indeed up:
sudo netstat -plunt | grep 3036
tcp6 0 0 127.0.0.1:3036 :::* LISTEN 26096/java
tcp6 0 0 ::1:3036 :::* LISTEN 26096/java
I then ran a reindex command successfully:
sudo manifold-api manifold:search:reindex
Reindexing Subject...
Reindexing Event...
Reindexing Maker...
Reindexing Annotation...
Reindexing Project...
Reindexing User...
Reindexing ResourceCollection...
Reindexing Resource...
Reindexing Tag...
Reindexing TextSection...
Reindexing Text...
Reindex complete
Ideally, the client would access the API over the FQDN with a hosts entry mapping the FQDN to localhost
My university is rolling out the requirement to install the Qualys vulnerability checking agent on all systems connected to the network, and the first report on our Manifold host complained about the existence of /opt/manifold/embedded/elasticsearch/lib/log4j-core-2.11.1.jar, referencing this NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2021-44228 .
Ingestions can run into open file limits.
See https://github.com/castiron/pancho-puppet/commit/454cd4e2f5aa9208ff946432bc02a1c15149db21
process.env.API_URL = "http://localhost";
Should likely be:
process.env.CLIENT_SERVER_API_URL = "http://localhost";
If we've already installed the package on the Centos VM, the install command will fail:
zdavis@gelatinous-cube:~/src/omnibus-manifold$ rake install:centos7
error: Failed dependencies:
manifold conflicts with manifold-2.0.0~rc.2+git.8.5dc68261-1.el7.x86_64
manifold is obsoleted by manifold-2.0.0~rc.2+git.8.5dc68261-1.el7.x86_64
manifold conflicts with (installed) manifold-2.0.0~rc.2-1.el7.x86_64
manifold is obsoleted by (installed) manifold-2.0.0~rc.2-1.el7.x86_64
Connection to 127.0.0.1 closed.
This is happening because that Platform
class is installing it with the rpm -i
flag instead of the upgrade -U
flag. Perhaps we need to add a rake task specifically for upgrading?
Additionally, I noticed that the install command does not maintain the root user's environment. The command is sudo rpm -ivh #{package_path}
โ but when run as the vagrant user, the path won't include manifold-ctl, which could lead to unexpected upgrade results, since the package seems to be detecting it:
[vagrant@centos7-install pkg]$ sudo rpm -Uvh manifold-2.0.0~rc.2+git.8.5dc68261-1.el7.x86_64.rpm
Preparing... ################################# [100%]
You're about to install manifold!
which: no manifold-ctl in (/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin)
Updating / installing...
1:manifold-2.0.0~rc.2+git.8.5dc6826^C^C################################# [ 50%]
With SSL enabled, running manifold-ctl fails to add process.env.SSL_ENABLED = true;
to the end of /var/opt/manifold/etc/browser-env.js
One user ended up with a 19gb log file, suggesting this log is not being rotated properly. Need to investigate
See end of output:
[root@centos7-install ~]# manifold-ctl
I don't know that command.
/opt/manifold/embedded/bin/omnibus-ctl: command (subcommand)
cleanse
Delete *all* manifold data, and start from scratch.
uninstall
Kill all processes and uninstall the process supervisor (data will be preserved).
upgrade
Run migrations after a package upgrade
General Commands:
cleanse
Delete *all* manifold data, and start from scratch.
help
Print this help message.
reconfigure
Reconfigure the application.
show-config
Show the configuration that would be generated by reconfigure.
uninstall
Kill all processes and uninstall the process supervisor (data will be preserved).
Service Management Commands:
graceful-kill
Attempt a graceful stop, then SIGKILL the entire process group.
hup
Send the services a HUP.
int
Send the services an INT.
kill
Send the services a KILL.
once
Start the services if they are down. Do not restart them if they stop.
restart
Stop the services if they are running, then start them again.
service-list
List all the services (enabled services appear with a *.)
start
Start services if they are down, and restart them if they stop.
status
Show the status of all the services.
stop
Stop the services, and do not restart them.
tail
Watch the service logs of all enabled services.
term
Send the services a TERM.
/opt/manifold/embedded/lib/ruby/gems/2.3.0/gems/omnibus-ctl-0.3.6/lib/omnibus-ctl.rb:570:in `run': undefined method `gsub' for nil:NilClass (NoMethodError)
from /opt/manifold/embedded/lib/ruby/gems/2.3.0/gems/omnibus-ctl-0.3.6/bin/omnibus-ctl:31:in `<top (required)>'
from /opt/manifold/embedded/bin/omnibus-ctl:23:in `load'
from /opt/manifold/embedded/bin/omnibus-ctl:23:in `<main>'
There is a known issue is with the CentOS yum repo, which currently looks like this:
cat /etc/yum.repos.d/manifold-release.repo
[manifold-release]
name=Manifold (release) - $basearch
baseurl=https://storage.googleapis.com/manifold-yum/el7/x86_64/release
enabled=1
gpgcheck=0
The known issue is, attempts to upgrade using Yum are not successful:
sudo yum update manifold
After running the above, the installed version remains the same:
sudo yum list installed | egrep manifold
manifold.x86_64 4.1.0~beta.1-1.el7 @manifold-release
The workaround we've found is to use the manual installation method detailed in the upgrading documentation:
sudo rpm -ivh --nodeps --force manifold-your-version-here.rpm
sudo rpm -qa | grep manifold
The default nginx config in the omnibus package does not include a mime type for EPUB, and at least on Ubuntu16 + 18, EPUB mime types won't be correctly recognized.
Interim fix is:
Edit /opt/manifold/embedded/conf/mime/types
and add this line to the list of mime types:
application/epub+zip epub;
Then restart nginx with manifold-ctl restart nginx
This change will be overwritten when you next upgrade Manifold, but that should be OK because this will be fixed before we generate packages again.
We should probably also default the content-type in the response to application/octet-stream
in cases where nginx can't determine a file's mime-type.
These can be managed via nginx['ssl_protocols']
, but we should have better defaults.
The helpful psql wrapper at /usr/bin/manifold-psql loads connection details from this file. We should make sure it includes the DB name as well. Without it, the db name defaults to the PG username and the manifold-psql command throws an error. The correct DB name is manifold_production
Charles Birmingham reports:
I tried the "manifold-ctl reconfigure --accept-license" command, but it didn't work since there are extra license agreements that don't appear to be taken into account.
There is a mechanism in place for this, but it may not be working quite as expected.
We are adding variables to an environment directory at https://github.com/ManifoldScholar/omnibus-manifold/blob/master/cookbooks/manifold/recipes/manifold-api.rb#L122, but I'm not sure these are being included when the API app is run.
It might make more sense to add these to the API's .env file, rather than to rely on this env dir.
I'm going to look at this over the weekend and publish new packages for v2.0.3.
Need to move to Node 10.x
Installer uses openSSL 1.0 branch, which is EOL on Dec 31, 2019. Need to move to 1.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.