Hey guys! I am trying to have Datahub work withou...
# troubleshoot
r
Hey guys! I am trying to have Datahub work without a user at all. I've seen ways to add users, but I do not know if you could just deactivate the default user all together!
b
You're referring to using datahub without logging in, similar to demo site?
r
Yes, that also works!
b
https://github.com/datahub-project/datahub/blob/master/docker/datahub-frontend/env/docker.env you will want to set env var:
Copy code
AUTH_JAAS_ENABLED=false
b
You can!!! AUTH_JAAS_ENABLED=false AUTH_OIDC_ENABLED=false
It will log everyone in as the root datahub user
r
Hmm let me give it a try
I have changed them, but still it's asking for credentials.
b
just to check, are the variables reflected in the frontend pod? ie printenv
r
Copy code
$ sudo docker exec -it datahub-frontend-react sh
/ $ printenv
ELASTIC_CLIENT_HOST=elasticsearch
HOSTNAME=datahub-frontend-react
SHLVL=1
HOME=/home/datahub
ELASTIC_CLIENT_PORT=9200
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DATAHUB_APP_VERSION=1.0
JAVA_OPTS=-Xms512m -Xmx512m -Dhttp.port=9002 -Dconfig.file=datahub-frontend/conf/application.conf -Djava.security.auth.login.config=datahub-frontend/conf/jaas.conf -Dlogback.configurationFile=datahub-frontend/conf/logback.xml -Dlogback.debug=false -Dpidfile.path=/dev/null
DATAHUB_PLAY_MEM_BUFFER_SIZE=10MB
KAFKA_BOOTSTRAP_SERVER=broker:29092
DATAHUB_GMS_HOST=datahub-gms
DATAHUB_TRACKING_TOPIC=DataHubUsageEvent_v1
PWD=/
SERVER_PORT=9002
DATAHUB_SECRET=YouKnowNothing
DATAHUB_GMS_PORT=8080
Don't see it!
b
how are you deploying datahub
r
I am quite limited by the privileges' I have on this machine, but I am using the quickstart.sh script I had to change a bit some docker ymls to force repo pull from our own Nexus repo, which in turn goes and fetches the images.
b
so you're not specifying a docker-compose file anywhere? the key is to add env variables to the docker-compose deployment, the frontend container.
r
I see, I would have hoped that after I make the change in the env file, quickstart will pick it up.
I have issues with sudo right running things, so I have to manually change parts where I use docker-compose or docker to add sudo 🙂
I need to specifically mention those...
b
i would find it easier to just use a single command
docker-compose -p datahub -f ./docker/quickstart/docker-compose-without-neo4j.yml up -d
add a sudo to the command?
r
Copy code
$ sudo /usr/local/bin/docker-compose -p datahub -f ./docker/docker-compose-without-neo4j.yml up -d
ERROR: Service 'datahub-gms' depends on service 'mysql' which is undefined.
b
my bad.
Copy code
sudo /usr/local/bin/docker-compose -p datahub -f ./docker/quickstart/docker-compose.quickstart.yml up -d
if this works, then you can just insert the env var in the specified compose file
r
Hmm, how do I do that? 😄
aa just add an environment under the react image
b
in the yml file add the 2 variables under the frontend section like so
Copy code
datahub-frontend-react:
    container_name: datahub-frontend-react
    depends_on:
    - datahub-gms
    environment:
    - DATAHUB_GMS_HOST=datahub-gms
    - DATAHUB_GMS_PORT=8080
    - DATAHUB_SECRET=YouKnowNothing
    - DATAHUB_APP_VERSION=1.0
    - DATAHUB_PLAY_MEM_BUFFER_SIZE=10MB
    - JAVA_OPTS=-Xms512m -Xmx512m -Dhttp.port=9002 -Dconfig.file=datahub-frontend/conf/application.conf
      -Djava.security.auth.login.config=datahub-frontend/conf/jaas.conf -Dlogback.configurationFile=datahub-frontend/conf/logback.xml
      -Dlogback.debug=false -Dpidfile.path=/dev/null
    - KAFKA_BOOTSTRAP_SERVER=broker:29092
    - DATAHUB_TRACKING_TOPIC=DataHubUsageEvent_v1
    - ELASTIC_CLIENT_HOST=elasticsearch
    - ELASTIC_CLIENT_PORT=9200
    - AUTH_JAAS_ENABLED=false
    - AUTH_OIDC_ENABLED=false
r
After I logged out and tried to enter I get an error. Restarting things now.
b
hmmm you get led to this page?
r
Yes.. I can't avoid it!
b
by right it shouldnt prompt for login when you go to http://localhost:9002. @big-carpet-38439 any ideas
r
Removing the variables make it work again.
But with user/pass.
I also tried only one variable set to false, but still does not work.
@big-carpet-38439, any chance you had some time to look at this?