how can i restart my apache2 service in a kubernetes k8s container without erasing all my configuration
I am trying to deploy a web page using an apache server in kubernetes, but when I try to restart my apache service it expels me from the container and all my configuration is deleted, so it is impossible for me to modify the default page that it brings Apache.
do you know?
how many words do you know
See also questions close to this topic
-
Getting mongo authorization errors with userAdminAnyDatabase role
I am trying to get authorization working on a mongo database on a new Ubuntu machine. I have created an admin user with the role userAdminAnyDatabase:
admin> show users [ { _id: 'admin.mongoAdmin', userId: UUID("590a4465-625a-4fa0-af2e-0f2c75777ac5"), user: 'mongoAdmin', db: 'admin', roles: [ { role: 'userAdminAnyDatabase', db: 'admin' } ], mechanisms: [ 'SCRAM-SHA-1', 'SCRAM-SHA-256' ] } ]
but I get authorization errors when I try to do anything:
admin> use test switched to db test test> db.users.find({}) MongoServerError: not authorized on test to execute command { find: "users", filter: {}, lsid: { id: UUID("f3cf2fbc-bbea-4ceb-83a1-b842b5047e74") }, $db: "test" }
I know I am using the correct id/password, as when I try to run the mongo shell with a different password it fails to start with a password error.
Ubuntu version is 20.04.4 (Focal); Mongo version is 5.0.8:
% mongod --version db version v5.0.8 Build Info: { "version": "5.0.8", "gitVersion": "c87e1c23421bf79614baf500fda6622bd90f674e", "openSSLVersion": "OpenSSL 1.1.1f 31 Mar 2020", "modules": [], "allocator": "tcmalloc", "environment": { "distmod": "ubuntu2004", "distarch": "x86_64", "target_arch": "x86_64" } }
-
docker discord.py ffmpeg.exe was not found
My code works on windows fine I'm just stumped on how to migrate it to my docker server for stability reasons and my old vm shit the bed. bellow is my main playing loop
async def main_playing_loop(vc, ctx): global skip while len(queued[str(ctx.guild.id)]) > 0: try: print(vc.is_playing()) while vc.is_playing() or vc.is_paused(): await asyncio.sleep(2) skip_func(vc) pass except AttributeError: pass try: url = str(queued[str(ctx.guild.id)][0]) download_video(ctx, url) vc.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=str(ctx.guild.id) + ".mp3")) del queued[str(ctx.guild.id)][0] except: break
log of what its doing
discord_main_1 | [youtube] dQw4w9WgXcQ: Downloading android player API JSON discord_main_1 | [youtube] dQw4w9WgXcQ: Downloading webpage discord_main_1 | stoping discord_main_1 | [youtube] dQw4w9WgXcQ: Downloading android player API JSON discord_main_1 | [info] dQw4w9WgXcQ: Downloading 1 format(s): 251 discord_main_1 | [download] Destination: 866270239342460930.mp3 [download] 100% of 3.28MiB in 00:00 discord_main_1 | Ignoring exception in command play: discord_main_1 | Traceback (most recent call last): discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 85, in wrapped discord_main_1 | ret = await coro(*args, **kwargs) discord_main_1 | File "/usr/src/bot/main.py", line 125, in play discord_main_1 | vc.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=str(ctx.guild.id) + ".mp3")) discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/player.py", line 225, in __init__ discord_main_1 | super().__init__(source, executable=executable, args=args, **subprocess_kwargs) discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/player.py", line 138, in __init__ discord_main_1 | self._process = self._spawn_process(args, **kwargs) discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/player.py", line 147, in _spawn_process discord_main_1 | raise ClientException(executable + ' was not found.') from None discord_main_1 | discord.errors.ClientException: ffmpeg.exe was not found. discord_main_1 | discord_main_1 | The above exception was the direct cause of the following exception: discord_main_1 | discord_main_1 | Traceback (most recent call last): discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 939, in invoke discord_main_1 | await ctx.command.invoke(ctx) discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 863, in invoke discord_main_1 | await injected(*ctx.args, **ctx.kwargs) discord_main_1 | File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 94, in wrapped discord_main_1 | raise CommandInvokeError(exc) from exc discord_main_1 | discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg.exe was not found.
i have still got the old exe for ffmpeg i was using on win but that doesn't work on Ubuntu. any help is appreciated thanks.
-
Linux on Lightsail instance is asking for a password and it's not working
I'm trying to restart
mariaDB
on Ubuntu but it's not letting me.I enter:
systemctl restart mariadb
and get:
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to restart 'mariadb.service'. Authenticating as: Ubuntu (ubuntu) Password: polkit-agent-helper-1: pam_authenticate failed: Authentication failure ==== AUTHENTICATION FAILED ===
I have the same password for all functions so I do not understand why it is not working. What can I do?
-
Java Spring Webflux on Kubernetes: always [or-http-epoll-1], [or-http-epoll-2], [or-http-epoll-3], [or-http-epoll-4] despite configured resource
Small question regarding a Java 11 Spring Webflux 2.6.6+ web app, containerized and deployed using Kubernetes please.
From the web app application logs, I am seeing things such as:
INFO [service,1bcce5941c742568,22c0ab2133c63a77] 11 --- [or-http-epoll-2] a.b.c.SomeClass : Some message from the reactive pipeline. INFO [service,67cb40974712b3f4,15285d01bce9dfd5] 11 --- [or-http-epoll-4] a.b.c.SomeClass : Some message from the reactive pipeline. INFO [service,5011dc5e09de30b7,f58687695bda20f2] 11 --- [or-http-epoll-3] a.b.c.SomeClass : Some message from the reactive pipeline. INFO [service,8046bdde07b13261,5c30a56a4a603f4d] 11 --- [or-http-epoll-1] a.b.c.SomeClass : Some message from the reactive pipeline.
And always, I can only see
[or-http-epoll-1] [or-http-epoll-2] [or-http-epoll-3] [or-http-epoll-4]
which I think stands for:[reactor-http-epoll-N]
The problem is, no matter how much CPU I allocate from Kubernetes, it is always those 4, no less, no more.
I tried:
resources: requests: cpu: 1 memory: 1G limits: cpu: 2 memory: 2G resources: requests: cpu: 4 memory: 4G limits: cpu: 6 memory: 6G resources: requests: cpu: 10 memory: 10G limits: cpu: 10 memory: 10G
But again, always only those 4.
I am having a hard time understanding what is the problem here, and why am I stuck with only/always 4 "or-http-epoll-".
Thank you
-
How does Kubernetes and Terraform work seamlessly together and what role do they each undertake?
I am a bit confused about the individual roles of Kubernetes and Terraform when using them both on a project.
Until very recently, I had a very clear understanding of both their purposes and everything made sense to me. But, then I heard in one of Nana's videos on Terraform, that Terraform was also very advanced in orchestration and I got confused.
Here's my current understanding of both these tools:
Kubernetes: Orchestration software that controls many docker containers working together seamlessly. Kubernetes makes sure that new containers are deployed based on the desired infrastructure defined in configuration files (written with the help of a tool like Terraform, as IaC).
Terraform: Tool for provisioning, configuring, and managing infrastructure as IaC.
So, when we say that Terraform is a good tool for orchestration, do we mean that it's a good tool for orchestrating infrastructure states or docker containers as well?
I hope someone can clear that out for me!
-
Update node condition type in status
I am trying to patch, clear Node conditions in OpenShift and/or Kubernetes cluster on a worker node. Patch isn't working, trying even workarounds, maybe update the key in etcd.
Main problem that i created new node conditions and then i removed them but they are not removed from list although they are no longer there or being updated by the controller.
$ oc describe node node1.example.com Conditions: Type Status LastHeartbeatTime LastTransitionTime Reason Message ---- ------ ----------------- ------------------ ------ ------- ExampleToRemove False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasSufficientDisk kubelet has sufficient disk space available MemoryPressure False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasSufficientMemory kubelet has sufficient memory available DiskPressure False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasNoDiskPressure kubelet has no disk pressure PIDPressure False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasSufficientPID kubelet has sufficient PID available Ready True Wed, 13 Feb 2019 15:09:42 -0500