-
Notifications
You must be signed in to change notification settings - Fork 5
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
Not all Environment Variables (nameserver, proxy/http) are set #4
Comments
Hi vPotusFlotus,
docker run \
--rm -it \
--network hostlocal \
--ip 192.168.124.20 \
univention/univention-corporate-server \
/bin/bash -c 'cat /etc/resolv.conf && apt-get update && apt-get --assume-yes install iputils-ping && ping -c 3 -W 3 192.168.124.200 && ping -c 3 -W 3 192.168.124.201 && ping -c 3 -W 3 updates.software-univention.de'
docker exec -it ${FQDN} /usr/bin/tail -F /var/log/univention/config-registry.replog
No, but
Yes, it needs time to set the ucr entries ... ( Maybe the section extended usage can help to understand the deploying process ) |
Hi @GinoHarlos , Thanks a lot for your response! If I understand it correctly:
Hence if I pass the Environment Variable 'http_proxy' as an "OS Environment Variable" to the UCS Container (in addition to my initial variables mentioned in my initial post) like so:
It seems to work (99% correct ;-) )! Because it will set the OS Variables ($http_proxy & $https_proxy) and the apt-get update & package installation succeeds. Afterwards the UCS Registry gets set. Why is it 99% working? (I tested this now 3 times, always same results)
The issues mentioned above are not present when I set the environment variables $http_proxy manually by logging in to the container immediately after the container has started. As explained in my 2nd post in this Github Issue (the one with the screenshots). The only downside is that it's lower case so it also gets processed as a UCS Registry Key if I'm not mistaking. This means that I now have the working ucr key set (proxy/http) and also the non-existant 'http/proxy' ucr key because it's passed lowercase. If I pass it in uppercase ($HTTP_PROXY vs $http_proxy), the issue is still the same and UCS cannot reach your repo. I'm not aware of any side-effects of setting a ucr key that actually does not exist or should not be used (http/proxy) because I'm passing the lowercase http_proxy variable in order to let the OS have a proxy setup before it does the apt-get update. I don't know if this is behaving as expected for Univention? Or if you have a guide somewhere to deploy UCS Containers behind a proxy? But this is at least how I seem to get it working, with the above mentioned small issues. Thanks again for your time! |
Hi vPotusFlotus, I have tested with some public HTTP(S) proxies. And the same result for me, it looks not so nicely behind a proxy ... --env http_proxy=http://192.168.124.202:3128/
--env https_proxy=http://192.168.124.202:3128/ Nice! But I think you need this too. --env proxy_http=http://192.168.124.202:3128/
--env proxy_https=http://192.168.124.202:3128/ It will change the file @reqa << EOF: Should one expand the excluded keys? (
@reqa EOF If you in trouble with Jun 25 10:34:22 sh[39]: ● apache2.service - The Apache HTTP Server
Jun 25 10:34:22 sh[39]: Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Jun 25 10:34:22 sh[39]: Active: failed (Result: exit-code) since Fri 2021-06-25 12:34:18 CEST; 14ms ago
Jun 25 10:34:22 sh[39]: Docs: https://httpd.apache.org/docs/2.4/
Jun 25 10:34:22 sh[39]: Process: 14144 ExecStart=/usr/sbin/apachectl start (code=exited, status=226/NAMESPACE) you can have a look here advanced example ... basic example for apparmor security option. This will fix for now the systemd private tmp inside the container. Thanks for your time too! :) |
Hi @GinoHarlos , Thanks for the profound explanation! Indeed it does not look so nicely behind a proxy. Have a nice day! |
Hi,
I'm trying to deploy the Univention-Corporate-Server container behind a proxy and with custom DNS servers:
FQDN=ucs.lab.local; \
For some reason the 'nameservers' are not set in the container. When I run 'ucr get nameserver1' it returns empty. The same for the proxy/http regitstry key: even though it is being passed as env varaible, it is not set.
Passing the forwarders as env variables does seem to work however (ucr get dns/forwarder1 returns the forwarder that I've passed).
This causes the container to hang / not start up correctly because I believe UCS container needs internet access and without a proxy and proper nameservers the container won't get it.
Are we missing something? Can you help us out?
Thanks a lot in advance for your time!
The text was updated successfully, but these errors were encountered: