[Dachs-support] error in GAVO repository?

Mariangeles Mendoza ninesmp75 at gmail.com
Wed Apr 7 13:08:27 CEST 2021


 Hi,

 Following Markus' guidelines, I changed the Dockerfile for the one copied
below.
 When I lift the dachs services, I get the following messages in console:

-----------------------------------------------------------------
services_vo         | *** Error: Oops.  Unhandled exception
OperationalError.
services_vo         |
services_vo         | Exception payload: FATAL:  role "root" does not exist
services_vo         |
services_vo         | Updating meta for import
--------------------------------------------------------

The database (db) is previously raised in another container (services_db).


But when I look in the browser: http://localhost:8080.
There is no reference to my tables or services.
Only it appears:

'''
myDATA

Please check out our site help.
''''


and not like before (with beta version):
'''
myDATA

"In addition to the services listed below, we offer access to numerous
tables using TAP or
form-based ADQL".

Please check out our site help.
''''

In order to access to my tables and services.
I have to write explicitly:

http://localhost:8080/browse/myDATAy/vo


These some my files:

Dockerfile:
--------------------------------------------------------
ARG DEBIAN_IMAGE="buster"
FROM "debian:$DEBIAN_IMAGE"

ARG APT_REPO="release"

ARG PKG_NAME="gavodachs2-server"

ARG PG_VERSION=11
ENV PG_VERSION=${PG_VERSION}

RUN apt-get update && apt-get -y upgrade && \
    apt-get install -y subversion python3 python3-setuptools python3-pip \
    curl git gnupg2 locales sudo vim wget nano  && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

RUN sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d

RUN echo "deb http://vo.ari.uni-heidelberg.de/debian ${APT_REPO} main"     \
        > /etc/apt/sources.list.d/gavo.list                         && \
    wget -qO - http://docs.g-vo.org/archive-key.asc | apt-key add -

RUN DEBIAN_FRONTEND='noninteractive'              && \
    apt-get update                                && \
    apt-get install -y "$PKG_NAME"                && \
    apt-get install -y postgresql-$PG_VERSION-q3c     && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

RUN pip3 install cryptography astropy psycopg2-binary twisted lxml && \
    pip3 install Pillow pymoc pyparsing==2.2 rjsmin testresources && \
    pip3 install matplotlib docutils && \
    pip3 install future

ENV GAVO_ROOT="/var/gavo"
ENV GAVO_INPUTS="${GAVO_ROOT}/inputs"
ENV GAVO_SETTINGS="/etc/gavo.rc"
ENV GAVOSETTINGS="$GAVO_SETTINGS"

COPY ./config/vo/gavo.rc "$GAVOSETTINGS"

COPY ./config/vo/defaultmeta.txt ${GAVO_ROOT}/etc/defaultmeta.txt
COPY ./config/vo/dsn ${GAVO_ROOT}/etc/dsn
COPY ./config/vo/feed ${GAVO_ROOT}/etc/feed
COPY ./config/vo/trustedquery ${GAVO_ROOT}/etc/trustedquery
COPY ./config/vo/untrustedquery ${GAVO_ROOT}/etc/untrustedquery

COPY ./config/vo/startup.sh /startup.sh

RUN mkdir -p ${GAVO_INPUTS}/myDATA
COPY ./config/vo/vo.rd ${GAVO_INPUTS}myDATA/vo.rd

RUN chmod +x /startup.sh

CMD /startup.sh
---------------------------------------------------------------------------------------------

startup.sh
-------------------------------------------------------
gavo init -d 'host=services_db dbname=db'
gavo imp -m myDATA/vo.rd
gavo pub myDATA/vo.rd
gavo serve start -f
---------------------------------------------

/etc/dns
-----------------------------------------------------
database = db
host = services_db
port = 5432
user = admin
password = admin
-------------------------------------------------------


Is there something wrong?


Best wishes,
Maria Ángeles

On Fri, Mar 19, 2021 at 12:35 PM Markus Demleitner <
msdemlei at ari.uni-heidelberg.de> wrote:

> Dear Maria,
>
> On Fri, Mar 19, 2021 at 10:01:03AM +0100, Mariangeles Mendoza wrote:
> > We think it's a problem with a function passing of Python 2 to 3 in the
> file
> > '/gavo/formal/twistedpatch.py'.
> >
> > We have temporally solved this error patching the code,
> >
> > Original:
> > L251:  for k, v in _flatten.iteritems(root.attributes):
> > New:
> > L 1: from future.utils import iteritems
> > ....
> > ....
> > L252: for k, v in iteritems(root.attributes):
> > ....
> >
> > But we have to patch the code again when we  download again
> > the software from Gavo repository.
>
> Oh wow, I'm amazed what you do works at all, since:
>
> > RUN svn co
> > http://svn.ari.uni-heidelberg.de/svn/gavo/python/tags/release-2.0.3/
> dachs
>
> ...the 2.0 series of DaCHS was something like an extended beta after
> migrating to python 3, and 2.1 was the first "real" release (in which
> this bug has long been fixed -- phwey).
>
> Do you remember why you're installing from SVN rather than from the
> proper Debian repo?
>
> Now, *if* you need to run from SVN for some reason, then just pull
> from trunk -- that should *usually* work.  But I'd still discourage
> it unless there are strong overriding reasons.
>
> Unless such strong overriding reasons exist, my first recommendation
> would be to use a proper, upgradable VM rather than docker, and if
> you have to use docker, base your Docker files on what Carlos does at
> https://github.com/chbrandt/docker-dachs.
>
> This should make it so your custom code would essentially reduce to:
>
> > gavo imp -m MyDATA/vo.rd
> > gavo pub MyDATA/vo.rd
>
> -- and less code is almost always a win.
>
> Thanks,
>
>         Markus
> --
> Dachs-support mailing list
> Dachs-support at g-vo.org
> https://lists.g-vo.org/mailman/listinfo/dachs-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.g-vo.org/pipermail/dachs-support/attachments/20210407/40550d8b/attachment.htm>


More information about the Dachs-support mailing list