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

Installer - database error detection, MacOS-specific config cases. #4966

Closed
landreev opened this issue Aug 15, 2018 · 20 comments
Closed

Installer - database error detection, MacOS-specific config cases. #4966

landreev opened this issue Aug 15, 2018 · 20 comments
Assignees

Comments

@landreev
Copy link
Contributor

(the name is a placeholder; if anyone can think of a better one, please rename)
It appears that the installer has some issues now, due to the work that was done to accommodate openshift installs.

Most importantly, the installer was supposed to fail if postgres user, database etc. could not be properly configured, with a clear message explaining what happened. Now it just keeps on going - with everything else failing in increasingly confusing ways.
Some MacOS-specific things appear to have been lost.
For example, in order to md5-encode the database password, we used to do

my $hash;
    if ( $WORKING_OS eq "MacOSX" ) {
        $hash = `/bin/echo -n $encode_line | md5`;
    }
    else {
        $hash = `/bin/echo -n $encode_line | md5sum`;
    }

but currently, it looks like it just tries to

    my $hash;
    $hash = `/bin/echo -n $encode_line | md5sum`;

which of course fails on MacOS... but that failure is in turn not properly intercepted etc., as described above.

Finally, it kinda looks like when the postgres install was separated from the rest of the script, lots of postgres-specific code was actually left in the main "install" script - which is confusing and otherwise not awesome.

There may have been a report from an outside user trying to install where they were seeing the "We must be running in Docker! Fancy!" message - even though they were not in fact running under Docker...

There may be more issues - so it looks like we need to make another pass at cleaning it up.

@mheppler mheppler changed the title Installer issues Installer - Fix MacOS Install, PostgreSQL Path Issues Aug 15, 2018
@landreev landreev changed the title Installer - Fix MacOS Install, PostgreSQL Path Issues Installer - database error detection, MacOS-specific config cases. Aug 15, 2018
@pameyer
Copy link
Contributor

pameyer commented Aug 27, 2018

Something else to consider rolling into this one: it appears (from https://groups.google.com/forum/#!topic/dataverse-community/34FWJIlYXNo and elsewhere) that there are cases where the installer should be aborting (due to problems with database configuration, application deployment, etc), but doesn't actually abort.

@djbrooke
Copy link
Contributor

ping @4tikhonov - you mentioned on the call that you were having some installer issues and I pointed you to this issue as a place to put some specifics.

@4tikhonov
Copy link
Contributor

We're having trouble to run on Google Cloud new SOLR Docker image created from this build https://github.com/IQSS/dataverse-docker/tree/master/solr7

@4tikhonov
Copy link
Contributor

We've found the solution for this problem with new SOLR.
For the deployment on Google Cloud both SOLR_HOST and SOLR_PORT should be set to those values:

  • "SOLR_HOST=solr"
  • "SOLR_PORT=8983"

Without SOLR_PORT we're getting error messages as somehow SOLR_PORT is coming from cloud configuration:
bin/solr: line 2068: /usr/local/solr/solr-7.3.0/bin/solr-tcp://10.31.251.78:8983.pid: No such file or directory
bin/solr: line 2065: /usr/local/solr/solr-7.3.0/server/logs/solr-tcp://10.31.251.78:8983-console.log: No such file or directory

@pameyer
Copy link
Contributor

pameyer commented Sep 12, 2018

@4tikhonov could you let us know which version (or which commit) you're using the installer from?

@4tikhonov
Copy link
Contributor

@pameyer it's latest one, 4.9.2

@pameyer
Copy link
Contributor

pameyer commented Sep 12, 2018

@4tikhonov thanks

landreev added a commit that referenced this issue Sep 14, 2018
…ain install script in the postgres-only mode, instead of calling the standalone postgres script. (#4966)
@landreev
Copy link
Contributor Author

@pdurbin where are you seeing that path?
short answer is no, we are not doing this on purpose.

@pdurbin
Copy link
Member

pdurbin commented Sep 21, 2018

@landreev this was as of c90f762 on my Mac. I'll attach the output from the run: installer-run-c90f762-pdurbin-mac.txt

@landreev
Copy link
Contributor Author

with the smtp port - i can add that easily; to get it to work with smtp.google though, doesn't it need more configuration, other than the different port?
with the EZID, I'll implement what was discussed during the meeting - switch the default to datacite and add the 2 lines telling them to register for an account. I will test that it is actually possible to do that and use that setup to publish in the test doi namespace... if it does NOT work easily like that, I would prefer to keep the ezid setup and defer this until 4.10; the ezid config has the advantage of working, and I don't think ezid is going away abruptly any time soon.

@landreev
Copy link
Contributor Author

@pdurbin Do you have a default.config file sitting around?

@landreev
Copy link
Contributor Author

(but yeah, I'm willing to invest a bit of extra work into making it possible to have the installer work with google's smtp out of the box; it would be useful to a lot of people...)

@pdurbin
Copy link
Member

pdurbin commented Sep 21, 2018

@landreev whoops! I do. Sorry! Here it is:

$ cat default.config
HOST_DNS_ADDRESS	localhost
GLASSFISH_DIRECTORY	/home/glassfish/glassfish4
MAIL_SERVER	localhost

@4tikhonov
Copy link
Contributor

As you're changing installation folders please consider to move files folder to docroot containing logos. We've discovered limitation of Google Cloud to mount 2 persistent volumes in the same time (one to keep files and second to keep pictures from logos folder).

After I moved files and logos to docroot it's started to work with persistent volume to keep all stuff that users/admins creating.

@pdurbin
Copy link
Member

pdurbin commented Sep 21, 2018

@4tikhonov sorry, this was my mistake. We are not changing the default installation folder. I had a default.config file that was being read.

@djbrooke djbrooke assigned landreev and unassigned kcondon Sep 24, 2018
landreev added a commit that referenced this issue Sep 24, 2018
the ability to enter a non-default port for the smtp server. (#4966)
@rmo-cdsp
Copy link
Contributor

Hello !

I just ran into this problem (I am on Linux). I tried pulling the last version of develop, but had this problem, so @pdurbin asked me to use the 4966-installer-fixes branch and ... I still has the issue.

I attach my glassfish logs.
server.log.txt

And an extract of the script error:

Attempting to deploy the application.
Command line: /usr/local/glassfish4/bin/asadmin deploy ../../target/dataverse-4.9.2.war
remote failure: Error occurred during deployment: Exception while deploying the app [dataverse-4.9.2] : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.postgresql.ds.PGPoolingDataSource
Error Code: 0. Please see server.log for more details.
Command deploy failed.
Failed to deploy the application! WAR file: ../../target/dataverse-4.9.2.war.
(exit code: 256)
Aborting.

@pdurbin
Copy link
Member

pdurbin commented Sep 26, 2018

@landreev I asked @rmo-cdsp to try the "installer fixes" branch because it worked for me. He's on Linux, if it matters. He (Romain) has code written for NESSTAR import (#4593) and is trying to merge the latest from develop before making a pull request. In IRC I've been trying and failing to help him get a working dev environment set up.

@pdurbin
Copy link
Member

pdurbin commented Sep 26, 2018

I made a couple tiny tweaks to docs and comments (no code changes) and I'm moving this to code review. I didn't execute any code but I did try this branch last week on my Mac (I don't think I wrote down the commit) and it worked fine. @rmo-cdsp and I with help from @pameyer and @donsizemore worked through his installation woes in IRC and he's all set now. Phew.

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

9 participants