IQSS logo

IRC log for #dataverse, 2018-02-02

Connect via chat.dataverse.org to discuss Dataverse (dataverse.org, an open source web application for sharing, citing, analyzing, and preserving research data) with users and developers.

| Channels | #dataverse index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
08:22 jri joined #dataverse
08:42 jri joined #dataverse
09:00 jri joined #dataverse
14:43 danmcp joined #dataverse
14:47 jri joined #dataverse
14:51 danmcp joined #dataverse
14:52 danmcp left #dataverse
14:53 danmcp joined #dataverse
14:55 pdurbin oh hey danmcp. good morning. welcome
14:55 danmcp pdurbin: thx! Good morning!
15:01 danmcp pdurbin: I was going to look at splitting up the template into multiple configs.  Did you attempt to do that before an hit a roadblock?
15:02 pdurbin Let me take a quick look at https://github.com/IQSS/dataverse/issues/4040 to see what I wrote. I don't think I tried.
15:02 danmcp pdurbin: I remember 1 issue was timing of wanting the db to start first
15:03 danmcp pdurbin: I guess the config will also have to be changed to connect to the remote db
15:03 pdurbin Right. The container for Glassfish loops until the Postgres container is up.
15:03 danmcp pdurbin: how does it know where postgres is?  Is that through config or env var?
15:05 pdurbin I'm looking. :)
15:06 pdurbin So we have this "default.config" file that's used by the Dataverse installer: https://github.com/IQSS/dataverse/blob/v4.8.5/conf/docker/dataverse-glassfish/entrypoint.sh#L116
15:07 pdurbin It looks like this: https://github.com/IQSS/dataverse/blob/v4.8.5/doc/sphinx-guides/source/_static/util/default.config
15:07 pdurbin POSTGRES_SERVER 127.0.0.1
15:07 pdurbin POSTGRES_PORT 5432
15:07 pdurbin etc
15:09 pdurbin But I'm also looking at the template to see if I put anything in there: https://github.com/IQSS/dataverse/blob/v4.8.5/conf/openshift/openshift.json
15:09 danmcp it looks like I can just set an env var then
15:10 pdurbin Yeah. It looks like I added some env vars here, for example: https://github.com/IQSS/dataverse/commit/2198367
15:16 danmcp pdurbin: how were you testing this, it doesn't look like you have a route
15:17 andrewSC pdurbin: looks like directxman12 answered your question? I honestly don't know that much about RPM packaging :S
15:17 danmcp pdurbin: what is the path to dataverse in the url?
15:28 pdurbin danmcp: oh, I add a route here: https://github.com/IQSS/dataverse/blob/v4.8.5/doc/sphinx-guides/source/developers/dev-environment.rst#make-the-dataverse-app-available-via-http
15:28 pdurbin with this: oc expose svc/dataverse-glassfish-service
15:31 danmcp pdurbin: why not have it in the template?
15:31 pdurbin I guess I didn't know it's possible to have it in the template. :)
15:32 pdurbin Fewer steps is definitely better. :)
15:32 danmcp pdurbin: cool, let's try to fix that
15:35 danmcp directxman12: pdurbin and I might meet a little later in the day to work on splitting up the dcs if you are able to join
15:39 pdurbin yep. dcs?
15:39 danmcp pdurbin: deploymentconfigs
15:40 pdurbin ah, thanks
16:01 pdurbin andrewSC: no problem. Thanks for taking a look!
16:56 andrewSC npnp :)
17:03 danmcp joined #dataverse
17:21 directxman12 danmcp: if you haven't started working on the dcs yet, let me know when
17:22 danmcp directxman12: we are in the middle of it now.  will let you know if I get stuck
17:22 pdurbin directxman12: I need to get boost installed somehow
17:24 pdurbin cpl-standalone/../include/cplxx.h:51:10: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
17:27 pdurbin ah, looks like I just needed to `yum install boost-dev`. sorry for the noise, directxman12
17:27 directxman12 pdurbin: ah, yeah, was just about to say that if the dev-toolkit doesn't have it, fedora also ships it, I believe
17:28 directxman12 pdurbin: "worst comes to worst" you can always pull individual RPMs from Fedora if you can't find what you need in an SCL/EPEL/etc (it's a bit of a last resort, but it often works fine until you get a COPR up with what you need, or somesuch)
17:36 soU joined #dataverse
17:37 pdurbin thanks. new error: backends/cpl-odbc/cpl-odbc-private.h:46:11: fatal error: sql.h: No such file or directory
17:39 pdurbin `yum install unixODBC-devel` fixed it. phew :)
17:55 yoh joined #dataverse
18:35 pd joined #dataverse
18:43 Guest42544 I am having trouble accessing: http://guides.dataverse.org/en/latest/developers/dev-environment.html is it down for anyone else?
18:43 pdurbin Guest42544: hi! Yes, unfortunately, it's down. :( Please see https://groups.google.com/d/msg/dataverse-community/B8PlxduoP4U/ntNz5ptBAAAJ
18:44 Guest42544 ok thanks Phil!
18:44 Michael_ joined #dataverse
18:44 Ryan__ joined #dataverse
18:45 Ryan__ left #dataverse
18:47 pdurbin Guest42544: sure. I'm honored you know my name. :)
18:47 pdurbin oh hey, Michael_ is here. from BU?
18:52 Guest42544 yes! and I'm Patrick from BU :)
18:52 Guest42544 oh I guess my nn didn't save. woops. I don't have an irc client installed on this comp so I was just using the web chat
18:52 pdurbin Guest42544: cool. If you type "/nick patrickFromBu" or whatever you won't have "guest" in your name :)
18:56 Michael_ hi!
18:57 Michael_ yes, its Michael from BU
19:03 pdurbin cool, welcome
19:15 Michael_ thanks!
19:40 danmcp joined #dataverse
20:19 danmcp joined #dataverse
20:23 pdurbin danmcp: back. I talked to Leonid and learned a few things about how we do (and plan to change how we do) postgres stuff
20:24 danmcp pdurbin: see the comment I made in the PR: https://github.com/IQSS/dataverse/pull/4450
20:24 danmcp pdurbin: I don't think this is because of the install
20:24 danmcp pdurbin: it seems to do everything with the pg client
20:24 danmcp pdurbin: it just needs to connect with the admin user
20:24 danmcp pdurbin: the question is why it's not
20:25 pdurbin danmcp: yes! exactly. I was confused. I can try to explain.
20:26 pdurbin I don't think we need to run the installer on the server that only has postgres on it.
20:27 pdurbin Instead, we need to tell the installer (running on the server that has Glassfish on it) the "admin" user for the postgres server. On CentOS, this user is "postgres". I think that's what the error you saw was saying.
20:28 danmcp pdurbin: that still doesn't make sense, there technically isn't a change in what I have now and what you have before as it relates to the two containers being isolated from each other
20:28 danmcp pdurbin: the only difference is the hostname they are talking to
20:28 danmcp pdurbin: why would the admin need to be different now?
20:29 pdurbin Also, I mentioned how Harvard Dataverse is moving from physical servers to EC2 instances. I assumed we planned to have an EC2 instance as a dedicated postgres server (like we have now, physically). Instead, the plan is to use some Amazon service for postgres. Postgres as a service hosted by AWS. I'm not sure what it's called.
20:30 danmcp pdurbin: I still don't have any reason why it shouldn't be able to connect :(
20:31 pdurbin danmcp: I think I need to get on your branch and take a look
20:32 danmcp pdurbin: +1  I am trying to debug it inside the container now why it can't connect
20:37 pdurbin I haven't run minishift since september so I might need a bit to get set up.
20:40 danmcp pdurbin: sh-4.2$ PGPASSWORD=secret; export PGPASSWORD; psql -h dataverse-postgresql-service -U postgres -d postgres -c 'SELECT * FROM pg_roles'
20:40 danmcp psql: FATAL:  password authentication failed for user "postgres"
20:40 danmcp pdurbin: that's where I am currently at
20:40 danmcp pdurbin: trying to replicate line 714 in install
20:45 pdurbin danmcp: I'm getting a crazy error from `minishift start": https://paste.fedoraproject.org/paste/mro5ciCHMavD8gA3CTwlQA
20:48 danmcp pdurbin: hrm.  doesn't ring a bell.  Let me ask someone.
20:48 danmcp pdurbin: directxman12 might have a clue ^^
20:48 * directxman12 takes a look
20:49 directxman12 danmcp: pdurbin: if I had to guess, the certificate generation that's trying to guess the appropriate master IP has failed to guess correctly
20:49 directxman12 danmcp: pdurbin: having enumerated all of your IP addresses except the relevant one, it appears
20:50 danmcp pdurbin: can you try resetting everything with your hypervisor and trying again?
20:50 directxman12 danmcp: pdurbin: and ergo the HTTPS client attempting to health-check the master to make sure the cluster is good to go is failing to connect, because it can't trust the connection
20:51 pdurbin danmcp: if you mean a `minishift stop` and `delete`, yep, I'm running that now. :)
20:51 directxman12 it looks like it got the right subnet, but wrong IP within that subnet, interestingly enough
20:52 danmcp pdurbin: also make sure virtual box is cleaned up after you stop
20:54 pdurbin danmcp: ok. It's pulling layers... Pulling image openshift/origin:v3.6.0
20:55 directxman12 pdurbin: what platform are you on, for future reference?
20:55 pdurbin I'm on a Mac. El Capitan (10.11)
20:56 directxman12 k
20:56 directxman12 good to know in the future
20:57 danmcp pdurbin: sh-4.2$ psql -U postgres -W -h dataverse-postgresql-service
20:57 danmcp Password for user postgres:
20:57 danmcp what would I put in there?
20:59 pdurbin danmcp: I'm not sure that there is a password set for the "postgres" user by default. I'm looking at https://www.liquidweb.com/kb/what-is-the-default-password-for-postgresql/
21:00 pdurbin This seems like a better resource: https://serverfault.com/questions/110154/whats-the-default-superuser-username-password-for-postgres-after-a-new-install
21:00 danmcp yeah me either but you are connecting with postgres here: https://github.com/IQSS/dataverse/blob/develop/scripts/installer/install#L714
21:01 danmcp pdurbin: 714 is the line that's failing
21:05 pdurbin danmcp: ah, I just found where in our docs we say to temporarily change postgres auth stuff to "trust"
21:06 pdurbin danmcp: https://github.com/IQSS/dataverse/blob/v4.8.5/doc/sphinx-guides/source/installation/prerequisites.rst#configuring-database-access-for-the-dataverse-application-and-the-dataverse-installer
21:08 danmcp pdurbin: this could be it, but others are saying they are getting connection refused in these sorts of cases
21:08 danmcp pdurbin: also that's for local host connections
21:09 pdurbin ah, I see what you mean
21:09 pdurbin meanwhile, that "stop" and "delete" seemed to help
21:10 danmcp cool
21:12 pdurbin I'm running `oc get events` over and over waiting for "Pulling" to change to "Pulled"
21:13 danmcp pdurbin: So I switched to trying from the postgres pod itself
21:16 pdurbin Ok. I'm still waiting for stuff to download from DockerHub. :/
21:22 danmcp pdurbin: so it works is I connect to localhost from the dataverse container.  so I believe the issue is that postgres isn't configured to allow connections from anything except localhost
21:22 danmcp pdurbin: which is really strange for a container implementation
21:22 danmcp pdurbin: so probably not right
21:23 pdurbin Is MySQL different? Or other databases?
21:23 pdurbin I feel like Postgres is pretty locked down by default.
21:23 danmcp pdurbin: none of them should be this way.  let me debug a little more
21:23 danmcp pdurbin: but the whole point of containers is remote connections
21:23 pdurbin I usually only use Postgres from localhost. I usually only have one server.
21:24 directxman12 danmcp: pdurbin: are you using the Red Hat postgres container, or some other
21:24 danmcp directxman12: it's the centos one
21:25 directxman12 danmcp: if I'm looking at the right container spec, the postgres config has `listen_addresses="*"`
21:25 danmcp directxman12: pdurbin: hrm..  if I try through the pod ip, it tells me invalid password.  that's the same error as when I try through the service through the glassfish pod
21:26 danmcp directxman12: centos/postgresql-94-centos7:latest
21:28 pdurbin danmcp: ok, so it's listening at least.
21:28 directxman12 danmcp: pdurbin: yep, still set as listen_addresses="*"
21:29 directxman12 danmcp: maybe look at what one of the OpenShift postgresql-based quickstarts does?  IIRC, the Django one uses postgres.  Let me double-check
21:29 danmcp directxman12: pdurbin:  and there is custom openshift config in vi /var/lib/pgsql/data/userdata/pg_hba.conf
21:30 danmcp to allow connections from all hosts
21:30 pdurbin I'm still waiting for `oc new-app conf/openshift/openshift.json` to complete. I guess it's still pulling? I can't get at the minishift web interface in way I documented before ( https://192.168.99.100:8443/ ). Seems down.
21:30 danmcp directxman12: pdurbin: I think the issue is on the client side connection string
21:33 pdurbin here's my `oc status`: https://paste.fedoraproject.org/paste/WYK~cHMDG9FnTVQS8pkPmA (deployment #1 failed 21 minutes ago: image change)
21:40 directxman12 pdurbin: `oc status` doesn't really say much.  Can you get the `oc describe` of the pod that the deployment was launching (not the deployer pod, but the actual now-failed pod)
21:42 danmcp pdurbin: directxman12: I think the issue is something along the lines of postgres doesn't let you connect without a password unless you are running locally
21:42 pdurbin directxman12: here's `oc describe dc/dataverse-glassfish`: https://paste.fedoraproject.org/paste/l5k3GfFu7qV-4omhSayRew
21:43 pdurbin danmcp: even if you set it to "trust" or whatever?
21:44 danmcp pdurbin: correct, the way around this is you create postgres with the users you need and then you can connect to it normally
21:44 danmcp pdurbin: we will need to change the install script to make the connection that way as an alternative
21:45 danmcp pdurbin: at least that's the option I see.  going to test a little to prove it
21:46 pdurbin danmcp: ok, by users I assume you mean a postgres role like "dvnapp" (CREATE ROLE dvnapp...)
21:47 danmcp pdurbin: sure.  whatever we need to connect with
21:47 pdurbin oh, duh, instead of 100 (like I documented), this time the minishift gui is running on https://192.168.99.101:8443
21:48 pdurbin danmcp: by default we use dvnapp as the role/user and "secret" as the password. the default database name is "dvndb"
21:49 pdurbin huh. "error: update acceptor rejected dataverse-glassfish-1: pods for rc "dataverse-glassfish-1" took longer than 300 seconds to become ready "
21:50 danmcp pdurbin: these are what are set in the template now:                "env": [                  {                    "name": "POSTGRESQL_USER",                    "value": "pgUserValue"                  },                  {                    "name": "POSTGRESQL_PASSWORD",                    "value": "pgPasswordValue"                  },                  {                    "name": "POSTGRESQL_DATABASE",                    "value": "p
21:50 danmcp gDatabaseValue"                  }                ],
21:50 danmcp pdurbin: do you know why?  Where they just stubs?
21:51 pdurbin danmcp: that may have been me trying to get something to work. They may not do anything. I'm not sure.
21:51 pdurbin I think in practice the values come from the default.config file.
21:55 danmcp pdurbin: these values do something when postgres is initially setup
21:55 danmcp pdurbin: so you can connect from outside of postgres
21:55 danmcp pdurbin: the only way it worked for you before was because it trusted localhost
22:09 danmcp pdurbin: directxman12: this works: PGPASSWORD=secret psql -h 172.17.0.6 -U postgres -d postgres -c 'SELECT * FROM pg_roles'
22:09 danmcp where the ip is the pod ip
22:09 danmcp or the service
22:09 danmcp ip
22:10 danmcp or the service name
22:11 danmcp note this is with my changes to the template to setup the passwords in the postgres image on startup
22:11 danmcp next to figure out what is wrong with this line: if ( $psql_admin_exec eq "" || system( $psql_admin_exec . "/psql -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -U postgres -d postgres -c 'SELECT * FROM pg_roles' > /dev/null 2>&1" ) )
22:13 danmcp pdurbin: do you understand why that line is adding /psql  ?
22:38 pdurbin danmcp: that's sort of weird. I assume the binary is just called "psql".
22:38 danmcp pdurbin: it is and $psql_admin_exec seems to be that string
22:39 danmcp pdurbin: I am trying with what I think is the right string now to see if it works
22:39 pdurbin cool
22:42 danmcp pdurbin: I failed.  need to learn a little more perl :(
22:45 danmcp take 2
22:50 directxman12 danmcp: you should always learn more perl
22:50 directxman12 danmcp: it gives you dark, sorcerous powers
22:51 danmcp directxman12: I agree you should always be in a state of having more perl to learn :)
22:51 directxman12 lol
22:56 danmcp pdurbin: k this is the line it actually runs: PGPASSWORD=secret; export PGPASSWORD; /usr/binPGPASSWORD=secret; export PGPASSWORD; /usr/bin/psql -h dataverse-glassfish-service -U postgres -d postgres -c 'SELECT * FROM pg_roles'
23:02 danmcp pdurbin: directxman12: k I think I have it now
23:03 danmcp will know in 5
23:11 danmcp pdurbin: directxman12: got a lot further.  dataverse might not be happy now that it isn't creating the db and user though.
23:11 danmcp I think I can just setup the admin and let it create the other user
23:12 danmcp will resort to that next
23:13 danmcp this seems good:
23:13 danmcp OK, the Dataverse application appears to be running... using default contact email for root dataverse
23:14 danmcp the dataverse ui is coming up
23:14 danmcp wondering what the user:password is now
23:18 danmcp directxman12: pdurbin: I can login now, it just says I can't connect to solr on localhost now.  will fix that one next
23:18 danmcp pdurbin: previous changes are pushed
23:25 pdurbin danmcp: you got it running? Great!
23:25 danmcp pdurbin: yeah, just working on solr now
23:26 pdurbin Ah, but no Solr. For that one we will need this: curl -X PUT -d localhost:8983 http://localhost:8080/api/admin/settings/:SolrHostColonPort
23:26 pdurbin changing "localhost" to whatever hostname we need
23:27 danmcp pdurbin: cool
23:43 danmcp joined #dataverse

| Channels | #dataverse index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Connect via chat.dataverse.org to discuss Dataverse (dataverse.org, an open source web application for sharing, citing, analyzing, and preserving research data) with users and developers.