Centos yum shows different latest versions - centos

i have two servers running centos, they are located in the same Data Center
i want to update my mod-pagespeed module
Server 1:
[root#web2 11]# yum update mod-pagespeed
Loaded plugins: auto-update-debuginfo, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.linuxwerk.com
* epel: mirrors.n-ix.net
* extras: mirror.softaculous.com
* updates: centosmirror.netcup.net
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mod-pagespeed-beta.x86_64 0:1.7.30.4-3847 will be updated
---> Package mod-pagespeed-beta.x86_64 0:1.9.32.2-4321 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================================
Updating:
mod-pagespeed-beta x86_64 1.9.32.2-4321 mod-pagespeed 5.8 M
Transaction Summary
=================================================================================================================================================================================================
Upgrade 1 Package(s)
Server 2
[root#web ~]# yum update mod-pagespeed
Loaded plugins: auto-update-debuginfo, fastestmirror, priorities, security
Determining fastest mirrors
epel/metalink | 26 kB 00:00
* base: ftp.plusline.de
* epel: mirrors.n-ix.net
* extras: ftp.plusline.de
* updates: ftp.plusline.de
10gen | 951 B 00:00
base | 3.7 kB 00:00
cr | 3.3 kB 00:00
dag | 1.9 kB 00:00
extras | 3.4 kB 00:00
mod-pagespeed | 951 B 00:00
rbel5 | 1.9 kB 00:00
updates | 3.4 kB 00:00
varnish-3.0 | 951 B 00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mod-pagespeed-stable.x86_64 0:1.7.30.4-3847 will be updated
---> Package mod-pagespeed-stable.x86_64 0:1.8.31.5-4307 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
mod-pagespeed-stable x86_64 1.8.31.5-4307 mod-pagespeed 5.4 M
Transaction Summary
================================================================================
Upgrade 1 Package(s)
so you see server2 says the latest version is 1.8.* server 1 says 1.9.* is
they differ in base, epel, extras mirrors,
how can i load the same version on server2 ?

mod-pagespeed-beta and mod-pagespeed-stable are not the same package. Install whichever of those you want on both servers and you will likely have the same version. Assuming the mirrors are both up-to-date as you were told on the version of this question you posted to serverfault.

Related

Next.js - Vercel build failed - An unexpected internal error occurred

we use vercel for hosting our next.js project, which worked properly until now. After a while, I've just deployed my site to vercel which has a lot of pregenerated static pages (FAQ pages localized version ca 7500 sites) (earlier it worked...)
Here is the Build log:
[15:22:56.443] Cloning github.com/*** (Branch: main, Commit: 7458f54)
[15:22:57.144] Cloning completed: 701.296ms
[15:22:57.492] Installing build runtime...
[15:23:00.574] Build runtime installed: 3.082s
[15:23:01.366] Looking up build cache...
[15:23:01.611] Build Cache not found
[15:23:01.808] Installing dependencies...
[15:23:01.809] Detected `package-lock.json` generated by npm 7...
[15:23:10.887] npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[15:23:11.276] npm WARN deprecated source-map-url#0.4.0: See https://github.com/lydell/source-map-url#deprecated
[15:23:11.727] npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
[15:23:11.781] npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
[15:23:12.182] npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
[15:23:12.295] npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[15:23:12.585] npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[15:23:14.213] npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[15:23:14.691] npm WARN deprecated har-validator#5.1.5: this library is no longer supported
[15:23:14.966] npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
[15:23:18.649] npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[15:23:19.369] npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[15:23:22.146] npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
[15:23:24.656] npm WARN deprecated core-js#1.2.7: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
[15:23:31.757]
[15:23:31.757] added 1284 packages in 30s
[15:23:31.757]
[15:23:31.758] 123 packages are looking for funding
[15:23:31.758] run `npm fund` for details
[15:23:31.783] Detected Next.js version: 12.1.0
[15:23:31.796] Detected `package-lock.json` generated by npm 7...
[15:23:31.797] Running "npm run build"
[15:23:32.080]
[15:23:32.081] > nextjs-builder-io-landing-page#1.0.0 build
[15:23:32.081] > next build
[15:23:32.081]
[15:23:32.551] info - Loaded env from /vercel/path0/.env.production
[15:23:32.729] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[15:23:32.729] This information is used to shape Next.js' roadmap and prioritize features.
[15:23:32.729] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[15:23:32.729] https://nextjs.org/telemetry
[15:23:32.729]
[15:23:32.767] info - Checking validity of types...
[15:23:36.278] warn - No ESLint configuration detected. Run next lint to begin setup
[15:23:36.285] info - Creating an optimized production build...
[15:23:36.286] warn - using beta Middleware (not covered by semver) - https://nextjs.org/docs/messages/beta-middleware
[15:23:37.976]
[15:23:37.976] warn - The `purge`/`content` options have changed in Tailwind CSS v3.0.
[15:23:37.976] warn - Update your configuration file to eliminate this warning.
[15:23:58.984] info - Compiled successfully
[15:23:58.985] info - Collecting page data...
[15:24:02.966] info - Generating static pages (0/7848)
[15:24:07.379] info - Generating static pages (1962/7848)
[15:24:09.446] info - Generating static pages (3924/7848)
[15:24:11.397] info - Generating static pages (5886/7848)
[15:24:15.350] info - Generating static pages (7848/7848)
[15:24:15.367] info - Finalizing page optimization...
[15:24:17.180]
[15:24:17.230] Page Size First Load JS
[15:24:17.230] ┌ ○ /__builder-customgrid__ 3.8 kB 152 kB
[15:24:17.230] ├ ○ /__builder-customlist__ 2.94 kB 158 kB
[15:24:17.230] ├ ○ /__builder-hero__ 3.37 kB 152 kB
[15:24:17.231] ├ ○ /__builder-money__ 1.32 kB 153 kB
[15:24:17.231] ├ ○ /__builder-nav__ 2.29 kB 167 kB
[15:24:17.231] ├ ○ /__builder-subtab__ 2.76 kB 141 kB
[15:24:17.231] ├ ○ /__builder-tabcontent__ 4.95 kB 153 kB
[15:24:17.231] ├ /_app 0 B 129 kB
[15:24:17.231] ├ ƒ /_middleware 36.4 kB 166 kB
[15:24:17.231] ├ ● /[[...page]] 138 kB 313 kB
[15:24:17.231] ├ └ css/f63802154ef558ff.css 1.21 kB
[15:24:17.231] ├ ○ /404 2.47 kB 141 kB
[15:24:17.231] ├ ○ /500 2.39 kB 141 kB
[15:24:17.231] ├ λ /api/sitemap 0 B 129 kB
[15:24:17.231] ├ λ /blog 2.45 kB 161 kB
[15:24:17.231] ├ ● /blog/[article] (ISR: 5 Seconds) (4886 ms) 790 B 159 kB
[15:24:17.231] ├ ├ /default/blog/%2Fblog%2Fblog5 (581 ms)
[15:24:17.231] ├ ├ /default/blog/%2Fblog%2Fblog2-is-lehet (554 ms)
[15:24:17.231] ├ ├ /default/blog/%2Fblog%2Fblog6 (551 ms)
[15:24:17.231] ├ ├ /default/blog/%2Fblog%2Fblog-3-url (547 ms)
[15:24:17.231] ├ ├ /default/blog/%2Fblog%2Fblog-8-english (544 ms)
[15:24:17.232] ├ ├ /default/blog/%2Fblog%2Fblog4 (542 ms)
[15:24:17.232] ├ ├ /default/blog/%2Fblog%2Fblog7 (529 ms)
[15:24:17.232] ├ └ [+2 more paths] (avg 519 ms)
[15:24:17.232] ├ ○ /builder-symbol 351 B 172 kB
[15:24:17.232] ├ ● /help/[maincategory] (1386 ms) 4.07 kB 162 kB
[15:24:17.232] ├ ├ /default/help/how-can-i-get-a-wallet
[15:24:17.232] ├ ├ /default/help/how-much-does-it-cost-to-register-a-new-wallet
[15:24:17.232] ├ ├ /default/help/what-is-the-difference-between-a-personal-and-a-business-wallet
[15:24:17.232] ├ └ [+340 more paths]
[15:24:17.232] ├ ● /help/[maincategory]/[subcategory] (447 ms) 4.3 kB 165 kB
[15:24:17.232] ├ ├ /default/help/business/how-can-i-get-a-wallet
[15:24:17.232] ├ ├ /default/help/business/send-money
[15:24:17.232] ├ ├ /default/help/business/receive-money
[15:24:17.232] ├ └ [+110 more paths]
[15:24:17.232] ├ ● /help/[maincategory]/[subcategory]/[help] (20710 ms) 3.87 kB 162 kB
[15:24:17.232] ├ ├ /default/help/business/how-can-i-get-a-wallet/what-is-identification-and-why-is-it-necessary
[15:24:17.232] ├ ├ /default/help/business/how-can-i-get-a-wallet/how-are-individuals-identified
[15:24:17.232] ├ ├ /default/help/business/how-can-i-get-a-wallet/how-can-i-top-up-my-wallet
[15:24:17.232] ├ └ [+7272 more paths]
[15:24:17.233] ├ ● /integrations-and-plugins 3.11 kB 161 kB
[15:24:17.233] └ ● /integrations-and-plugins/[id] 1.46 kB 160 kB
[15:24:17.233] + First Load JS shared by all 129 kB
[15:24:17.233] ├ chunks/framework-5f4595e5518b5600.js 42 kB
[15:24:17.233] ├ chunks/main-30b5b660246d0905.js 32.6 kB
[15:24:17.233] ├ chunks/pages/_app-ad24afc8f8ad930a.js 52.8 kB
[15:24:17.233] ├ chunks/webpack-dd16877f2d410294.js 1.9 kB
[15:24:17.233] └ css/84deb26cd7ef277b.css 10.5 kB
[15:24:17.234]
[15:24:17.234] ƒ (Middleware) intercepts requests (uses _middleware)
[15:24:17.234] λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
[15:24:17.234] ○ (Static) automatically rendered as static HTML (uses no initial props)
[15:24:17.235] ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
[15:24:17.235] (ISR) incremental static regeneration (uses revalidate in getStaticProps)
[15:24:17.235]
[15:24:20.013] Traced Next.js server files in: 268.788ms
[15:24:20.666] Created all serverless functions in: 652.943ms
[15:24:23.997] Uploading build outputs...
[15:26:55.132] Deploying build outputs...
[15:53:13.710] An unexpected internal error occurred
I contacted the support, but no answer yet, and also saw a github thread 2 weeks ago:
https://github.com/vercel/community/discussions/436
Any idea how can I solve this?
Anyways, I tried with the FAQ page fallback option set to true, false, blocking, none of them seems to work.
Your build is crashed for no visible reasons - try to reduce build time.
Once I have contacted Vercel support (support#vercel.com) for mostly the same issues, they investigated my reasons, but they mostly recommend me to reduce build time (<30 mins it's ok)
You need to set your pages with ISR.
ISR does not mean that all your pages will be rendered during build, it means if your page wasn't rendered during the build and will be stored in cache once visited
Example: imagine you have 15999 categories to build. Max build time is 45 mins according to vercel docs. You should build only part of information during build (500 categories). So, in getStaticPaths, you need to get only 500 categories and make it "lightweight" - include only your parameter (in my example its' pid)
Try to adapt all your pages to reduce build time. Also, don't forget about Vercel API limits.
Here is my example:
export async function getStaticProps(context) {
const pid = context.params.pid;
if (context.params.pid == 'undefined'){
console.log("here we have an error: " + pid)
}
//you render your category
const res = await fetch(process.env.APIpath + '/api/public/category/getCategory?pid=' + (pid));
const data = await res.json();
return {
props: {
...(await serverSideTranslations(context.locale, ['common'])),
category: data
}
}
}
export async function getStaticPaths(context) {
// you render only 500 products intead of 15666 products
const res = await fetch(process.env.APIpath + '/api/public/category/getFewCategories')
const posts = await res.json()
let paths = []
for (const post of posts){
//I am using multilanguage here
for (const locale of context.locales){
paths.push({params: {pid: post.linkRewrite[locale] }, locale: locale})
}
}
return { paths, fallback: 'blocking'}
}
I just restarted the build 24h later, and everything worked ok.
I guess sometimes it is just a problem with Vercel itself.

How to run docker-compose as non root user?

By default docker use a root user in a Dockerfile. If I use a root user (docker default user), I can build flask image with (docker build and docker run) or docker-compose up --build and everything works fine apart from having a warning about Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager.
To avoid the warning, I then decided to add a non root user in the Dockerfile. The warning disappeared indeed, I can also build flask image with (docker build and docker run) that works fine. But unfortunately it doesn't work anymore with docker-compose up --build
So the question is: how to avoid the warning above and still have docker-compose up --build working fine
Here are my Dockerfile and docker-compose.yml with non root user
FROM python:3.10
RUN useradd -ms /bin/bash myuser
USER myuser
WORKDIR /home/myuser
RUN pip install --upgrade --user pip
COPY --chown=myuser:myuser ./code/* ./
RUN pip install -r requirements.txt --user --no-warn-script-
location
ENV PATH="/home/myuser/.local/bin:${PATH}"
version: '3.9'
services:
flask:
build: .
container_name: flask_container
command: python main.py
# user: 1000:1000
ports:
- 5000:5000
volumes:
- ./code:/home/myuser
After running docker-compose up --build I'm getting the following error(same error when using user: 1000:1000): ModuleNotFoundError: No module named 'flask'
Collecting Flask
Downloading Flask-2.0.3-py3-none-any.whl (95 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.6/95.6 KB 2.1
MB/s eta 0:00:00
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.1.1-py3-none-any.whl (15 kB)
Collecting Werkzeug>=2.0
Downloading Werkzeug-2.0.3-py3-none-any.whl (289 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 289.2/289.2 KB 4.4
MB/s eta 0:00:00
Collecting Jinja2>=3.0
Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.6/133.6 KB 3.0
MB/s eta 0:00:00
Collecting click>=7.1.2
Downloading click-8.0.4-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.5/97.5 KB 2.7
MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp310-cp310-
manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Installing collected packages: Werkzeug, MarkupSafe,
itsdangerous, click, Jinja2, Flask
Successfully installed Flask-2.0.3 Jinja2-3.0.3 MarkupSafe-2.1.1
Werkzeug-2.0.3 click-8.0.4 itsdangerous-2.1.1
Removing intermediate container 79206447dcf5
---> 51797f14d971
Step 8/8 : ENV PATH="/home/myuser/.local/bin:${PATH}"
---> Running in bc4b778bac5d
Removing intermediate container bc4b778bac5d
---> 195f721ef077
Successfully built 195f721ef077
Successfully tagged docker-dev_flask:latest
Creating flask_container ... done
Attaching to flask_container
flask_container | Traceback (most recent call last):
flask_container | File "/home/myuser/main.py", line 1, in
<module>
flask_container | from flask import Flask
flask_container | ModuleNotFoundError: No module named 'flask'
flask_container exited with code 1
But everything works fine when using root user
FROM python:3.10
WORKDIR /code
COPY ./code/* ./
RUN pip install -r requirements.txt
version: '3.9'
services:
flask:
build: .
container_name: flask_container
command: python main.py
ports:
- 5000:5000
volumes:
- ./code:/code
docker-compose up --build doesn't fail but gives a warning about using a root user.
Collecting Flask
Downloading Flask-2.0.3-py3-none-any.whl (95 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.6/95.6 KB 1.8
MB/s eta 0:00:00
Collecting click>=7.1.2
Downloading click-8.0.4-py3-none-any.whl (97 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.5/97.5 KB 1.5
MB/s eta 0:00:00
Collecting Jinja2>=3.0
Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.6/133.6 KB 1.8
MB/s eta 0:00:00
Collecting Werkzeug>=2.0
Downloading Werkzeug-2.0.3-py3-none-any.whl (289 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 289.2/289.2 KB 1.8
MB/s eta 0:00:00
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.1.1-py3-none-any.whl (15 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp310-cp310-
manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Installing collected packages: Werkzeug, MarkupSafe,
itsdangerous, click, Jinja2, Flask
Successfully installed Flask-2.0.3 Jinja2-3.0.3 MarkupSafe-
2.1.1 Werkzeug-2.0.3 click-8.0.4 itsdangerous-2.1.1
WARNING: Running pip as the 'root' user can result in broken
permissions and conflicting behaviour with the system package
manager. It is recommended to use a virtual environment
instead: https://pip.pypa.io/warnings/venv
Removing intermediate container b9626dc2cd44
---> 42f016cc5667
Successfully built 42f016cc5667
Successfully tagged docker-dev_flask:latest
Creating flask_container ... done
Attaching to flask_container
flask_container | * Serving Flask app 'main' (lazy loading)
flask_container | * Environment: production
flask_container | WARNING: This is a development server. Do
not use it in a production deployment.
flask_container | Use a production WSGI server instead.
flask_container | * Debug mode: off
flask_container | * Running on all addresses.
flask_container | WARNING: This is a development server. Do
not use it in a production deployment.
flask_container | * Running on http://172.18.0.2:5000/ (Press
CTRL+C to quit)
How can I solve this issue ? Thanks for your help

Could not access file "pglogical" while trying to install pglogical

I'm following instructions from https://github.com/2ndQuadrant/pglogical to install pglogical on postgres 12 on Centos 8. The install seems be successful:
yum -y install postgresql12-pglogical
Last metadata expiration check: 0:21:30 ago on Wed 30 Sep 2020 09:32:13 PM CDT.
Dependencies resolved.
=====================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================================================================================================================================
Installing:
postgresql12-pglogical x86_64 2.3.2-1.el8 2ndquadrant-dl-default-release-pg12 145 k
Installing dependencies:
postgresql12 x86_64 12.4-1PGDG.rhel8 pgdg12 1.6 M
postgresql12-server x86_64 12.4-1PGDG.rhel8 pgdg12 5.2 M
Transaction Summary
=====================================================================================================================================================================================================================================================
Install 3 Packages
Total download size: 7.0 M
Installed size: 29 M
Downloading Packages:
(1/3): postgresql12-12.4-1PGDG.rhel8.x86_64.rpm 1.5 MB/s | 1.6 MB 00:01
(2/3): postgresql12-pglogical-2.3.2-1.el8.x86_64.rpm 117 kB/s | 145 kB 00:01
(3/3): postgresql12-server-12.4-1PGDG.rhel8.x86_64.rpm 4.0 MB/s | 5.2 MB 00:01
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.3 MB/s | 7.0 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : postgresql12-12.4-1PGDG.rhel8.x86_64 1/3
Running scriptlet: postgresql12-12.4-1PGDG.rhel8.x86_64 1/3
failed to link /usr/bin/psql -> /etc/alternatives/pgsql-psql: /usr/bin/psql exists and it is not a symlink
failed to link /usr/bin/clusterdb -> /etc/alternatives/pgsql-clusterdb: /usr/bin/clusterdb exists and it is not a symlink
failed to link /usr/bin/createdb -> /etc/alternatives/pgsql-createdb: /usr/bin/createdb exists and it is not a symlink
failed to link /usr/bin/createuser -> /etc/alternatives/pgsql-createuser: /usr/bin/createuser exists and it is not a symlink
failed to link /usr/bin/dropdb -> /etc/alternatives/pgsql-dropdb: /usr/bin/dropdb exists and it is not a symlink
failed to link /usr/bin/dropuser -> /etc/alternatives/pgsql-dropuser: /usr/bin/dropuser exists and it is not a symlink
failed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-pg_basebackup: /usr/bin/pg_basebackup exists and it is not a symlink
failed to link /usr/bin/pg_dump -> /etc/alternatives/pgsql-pg_dump: /usr/bin/pg_dump exists and it is not a symlink
failed to link /usr/bin/pg_dumpall -> /etc/alternatives/pgsql-pg_dumpall: /usr/bin/pg_dumpall exists and it is not a symlink
failed to link /usr/bin/pg_restore -> /etc/alternatives/pgsql-pg_restore: /usr/bin/pg_restore exists and it is not a symlink
failed to link /usr/bin/reindexdb -> /etc/alternatives/pgsql-reindexdb: /usr/bin/reindexdb exists and it is not a symlink
failed to link /usr/bin/vacuumdb -> /etc/alternatives/pgsql-vacuumdb: /usr/bin/vacuumdb exists and it is not a symlink
Running scriptlet: postgresql12-server-12.4-1PGDG.rhel8.x86_64 2/3
Installing : postgresql12-server-12.4-1PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql12-server-12.4-1PGDG.rhel8.x86_64 2/3
Installing : postgresql12-pglogical-2.3.2-1.el8.x86_64 3/3
Running scriptlet: postgresql12-pglogical-2.3.2-1.el8.x86_64 3/3
Verifying : postgresql12-pglogical-2.3.2-1.el8.x86_64 1/3
Verifying : postgresql12-12.4-1PGDG.rhel8.x86_64 2/3
Verifying : postgresql12-server-12.4-1PGDG.rhel8.x86_64 3/3
Installed:
postgresql12-12.4-1PGDG.rhel8.x86_64 postgresql12-pglogical-2.3.2-1.el8.x86_64 postgresql12-server-12.4-1PGDG.rhel8.x86_64
Complete!
But when I try to restart postgres, I get this error
systemctl restart postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.
Relevant portions of the journalctl -xe
-- Unit postgresql.service has begun starting up.
Sep 30 21:54:59 aba postmaster[305963]: 2020-10-01 02:54:59.825 UTC [305963] FATAL: could not access file "pglogical": No such file or directory
Sep 30 21:54:59 aba postmaster[305963]: 2020-10-01 02:54:59.825 UTC [305963] LOG: database system is shut down
Sep 30 21:54:59 aba systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 21:54:59 aba systemd[1]: postgresql.service: Failed with result 'exit-code'.
Sep 30 21:54:59 aba systemd[1]: Failed to start PostgreSQL database server.
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit postgresql.service has failed.
--
-- The result is failed.
I am lost!
Your session log tells the the server was installed as a prerequisite, but the "link" messages insinuate that there was already an incompatible client version in place. Probably you had installed PostgreSQL from the CentOS packages, but the pglogical RPMs pulled in the PGDG packages.
The error message probably means that shared_preload_libraries contains pglogical, but pglogical.so could not be found in the lib directory.
Presumably the installation process edited the configuration in your old server installation, but installed the shared object in the new one.
Upshot: you cannot use those pglogical binaries with your installation. Either switch to the PGDG RPMs or build pglogical from source.
You see that there is a certain amount of conjecture in my deductions, but that should help you solve the problem.

Kubernetes 1.6 install issue with centos 7

I am trying to install kubernetes on my centos 7 machine. added below yum repo. when I install the package its giving version 1.6 & 1.5.
unable to install the kubernetes package in my master server.
[root#centos-master yum.repos.d]# yum list|grep kube
kubeadm.x86_64 1.6.2-0 #kubernetes
kubectl.x86_64 1.6.2-0 #kubernetes
kubelet.x86_64 1.6.2-0 #kubernetes
kubernetes-cni.x86_64 0.5.1-0 #kubernetes
cockpit-kubernetes.x86_64 135-4.el7.centos extras
kubernetes.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-client.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-master.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-node.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-unit-test.x86_64 1.5.2-0.5.gita552679.el7 extras
rkt.x86_64 1.25.0-1 kubernetes
here is the report for api server.
# yum provides kube-apiserver
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dallas-tx.riverfrontnetworks.com
* extras: cosmos.illinois.edu
* updates: mirror.solarvps.com
kubernetes-master-1.3.0-0.3.git86dc49a.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.4.0-0.1.git87d9d8d.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.5.2-0.2.gitc55cf2b.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
repo added.
# cat kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
how can I install 1.6 version. here is the error message.
yum install kubernetes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dallas-tx.riverfrontnetworks.com
* extras: cosmos.illinois.edu
* updates: mirror.solarvps.com
Resolving Dependencies
--> Running transaction check
---> Package kubernetes.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Processing Dependency: kubernetes-node = 1.5.2-0.5.gita552679.el7 for package: kubernetes-1.5.2-0.5.gita552679.el7.x86_64
--> Processing Dependency: kubernetes-master = 1.5.2-0.5.gita552679.el7 for package: kubernetes-1.5.2-0.5.gita552679.el7.x86_64
--> Running transaction check
---> Package kubernetes-master.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Processing Dependency: kubernetes-client = 1.5.2-0.5.gita552679.el7 for package: kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64
---> Package kubernetes-node.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Running transaction check
---> Package kubernetes-client.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
kubernetes x86_64 1.5.2-0.5.gita552679.el7 extras 36 k
Installing for dependencies:
kubernetes-client x86_64 1.5.2-0.5.gita552679.el7 extras 14 M
kubernetes-master x86_64 1.5.2-0.5.gita552679.el7 extras 25 M
kubernetes-node x86_64 1.5.2-0.5.gita552679.el7 extras 14 M
Transaction Summary
===============================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 53 M
Installed size: 302 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): kubernetes-1.5.2-0.5.gita552679.el7.x86_64.rpm | 36 kB 00:00:00
(2/4): kubernetes-client-1.5.2-0.5.gita552679.el7.x86_64.rpm | 14 MB 00:00:07
(3/4): kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64.rpm | 25 MB 00:00:12
(4/4): kubernetes-node-1.5.2-0.5.gita552679.el7.x86_64.rpm | 14 MB 00:00:06
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 3.8 MB/s | 53 MB 00:00:14
Running transaction check
Running transaction test
Transaction check error:
file /usr/bin/kubectl from install of kubernetes-client-1.5.2-0.5.gita552679.el7.x86_64 conflicts with file from package kubectl-1.6.2-0.x86_64
file /usr/bin/kubelet from install of kubernetes-node-1.5.2-0.5.gita552679.el7.x86_64 conflicts with file from package kubelet-1.6.2-0.x86_64
Thanks
SR
For kubernetes 1.6.2 we need only these rpms. when we run the
kubeadm init
command. it starts other process automatically.
# rpm -qa |grep kube
kubelet-1.6.2-0.x86_64
kubeadm-1.6.2-0.x86_64
kubernetes-cni-0.5.1-0.x86_64
kubectl-1.6.2-0.x86_64
More info here:
https://kubernetes.io/docs/getting-started-guides/kubeadm/
Thanks
SR
You seem to have installed kubelet & kubectl 1.5.2 already.You can uninstall 1.5.2 and retry the install of 1.6.x.
Yum normally installs the latest version of a package, regardless of which repository provides it.In this case it has a conflicting package already installed.
Edit: Removed the Centos extras reference as it was out of context.

yum installation manager not working in centos 6.6

I'm facing a problem with yum installation manager in centos 6.6
root#mmopuru:~ # cat /etc/*release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
root#mmopuru:~ # uname -a
Linux mmopuru.puppetlabs.vm 2.6.32-504.el6.i686 #1 SMP Wed Oct 15 03:02:07 UTC 2014 i686 i686 i386 GNU/Linux
Its throwing following err. I tried clean all but no use.
root#mmopuru:~ # yum install python-pip
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
* ius: ftp.neowiz.com
* remi-safe: mirror.innosol.asia
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
How to resolve this?
When I run yum repolist
root#mmopuru:~ # yum repolist
Loaded plugins: fastestmirror, security
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
epel/metalink | 4.0 kB 00:00
* epel: ftp.cuhk.edu.hk
* ius: mirror.amsiohosting.net
* remi-safe: mirrors.thzhost.com
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel | 4.3 kB 00:00
epel/primary_db | 4.9 MB 00:05
ius | 2.2 kB 00:00
ius/primary_db | 194 kB 00:01
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 22 kB 00:00
update | 3.4 kB 00:00
update/primary_db | 3.7 MB 00:01
repo id repo name status
addons CentOS-6 - Addons 0
*epel Extra Packages for Enterprise Linux 6 - i386 9,857
ius IUS Community Packages for Enterprise Linux 6 - i386 356
remi-safe Safe Remi's RPM repository for Enterprise Linux 6 - i386 32
update CentOS-6 - Updates 989
repolist: 11,234
The content of /etc/yum.repos.d/centos-internal.repo is
root#mmopuru:~ # cat /etc/yum.repos.d/centos-internal.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#released updates
enabled=0
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
enabled=0
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
Remove the "addons" repository definition, which doesn't exists for CentOS 6 (it only exists for CentOS 5, but is empty).
I have just answered a similar question i.e. same error but for EPEL repo. I am answering here, may be it can come helpful for some future SO user.
Solution: The quick fix is to update your SSL certificates:
yum -y upgrade ca-certificates
Chances are the above error may also occur while certificate update, if so, just disable the repo i.e. addons which is causing the error, use the following command:
yum -y upgrade ca-certificates --disablerepo=addons
In case you're getting this same error for a different repo, just put it's name against the --disablerepo=<repo-name> flag.
Note: use sudo if you're not the root user.