Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LPJon

Pages: [1] 2
1
You need to download the script from my github. Then upload it to your server for it to work properly.

To solve your issue and to also understand it. The "\r" (its whats placed a the end of every line when you press enter in a Windows text editor) is a windows return carriage, and Linux HATES those in scripting. This is caused by copying and pasting from Windows Based text editors like Notepad but can also happen when copying from a web browser. When you see that kind of error with the "\r" you can try running the following commands to fix it "In Place" but first you need to install dos2unix in your server. If you are running CentOS then run following command to install it.
Code: [Select]
yum install -y dos2unix
Once that is installed run the following....be sure to put in the full file path including the file name.
Code: [Select]
dos2unix /scripts/install_netdata
Also, running bash scripts is usually executed as the following, but you need to be in the files directory
Code: [Select]
./<filename>
If the above does not work reply here and I will try to workout a solution for you. The easiest way to do this though is to download the file raw from github onto your computer and use winscp to upload and overwrite the original. Be sure to make a copy of the original file first. Copy and paste always goes wrong with Linux....especially when working on bash scripting with Windows.

NOTE: CentOS Web Panel frequently overwrites these files and will overwrite the code you are changing. They have still not implemented this fix as of 6/27/24 even though I have submitted the code to them. Once netdata is installed it will just work....until you uninstall it and try to re-install it again. Please keep that in mind.

THE BELOW PERTAINS TO THE "Immutable" FILE ATTRIBUTE. THIS FORBIDS ANY CHANGES TO THE FILE AT ALL UNTIL THE ATTRIBUTE IS REMOVED.

To make the change permanent run the following to make the file uneditable including "delete" and "overwrite":
Code: [Select]
chattr +i /scripts/install_netdata
To make the file editable again run the following:
Code: [Select]
chattr -i /scripts/install_netdata
To look at the "Immutable" or "i" attribute run the following:
Code: [Select]
lsattr /scripts/install_netdata

2
I think this is closer to being the actual issue. I'm also seeing the ECC issues in the webserver and and challenge file ending with dkey.

https://github.com/acmesh-official/acme.sh/issues/5044

3
How would you configure that in CWP?

4
I'm already aware of this...the links I provided were just directly from my browser and still showed the 404 error. The 301 redirects must also be in the vhost file for the domain in nginx for an issue to happen. The problem is the FILE that is requested does not exist. The file must exist for the challenge to succeed. The issue is A file is created but with the wrong filename to complete the challenge.

5
So I have found an issue since the last few days as well. I believe it is related to this issue at the following link: https://forum.centos-webpanel.com/index.php?topic=13474.0. This is NOT a DNS problem, that is incorrectly reported by acme.sh. The challenge file that is placed in:
Code: [Select]
/usr/local/apache/autossl_tmp/.well-known/acme-challengeis not the same as what Letsencrypt is looking for resulting in a 404 error. That's why it's reporting a connection/DNS issue. I'm using Nginx->varnish->Apache setup. Not sure what happened but it looks like the file names are not being generated properly.

Example:
Letsencrypt is looking for the challenge in:
Code: [Select]
https://showme.laptop-pitstop.net/.well-known/acme-challenge/aedMkvm4D2h7A9T0MkGBsdTZya_IGEsu3uV7wjMB6H4
when it should be looking for the challenge in:
Code: [Select]
https://showme.laptop-pitstop.net/.well-known/acme-challenge/<actual file name for challenge>

6
So I have found an issue since the last few days as well. I believe it is related to this issue. This is NOT a DNS problem, that is incorrectly reported by acme.sh. The challenge file that is placed in
Code: [Select]
/usr/local/apache/autossl_tmp/.well-known/acme-challenge is not the same as what Letsencrypt is looking for resulting in a 404 error. That's why it's reporting a connection/DNS issue. I'm using Nginx->varnish->Apache setup. Not sure what happened but it looks like the file names are not being generated properly.

7
I opened a support ticket about my migration issues and I included my cleanup script there.

Here's the bugs link on the newer Control Web Panel site: https://bugs.control-webpanel.com/login_page.php
(Seems as though the CentOS branding is going to die off -- makes sense to abstract it for all EL8/EL9 distributions.)

There's also the bug forum that they may tend to peruse more than the overall board generally:
https://forum.centos-webpanel.com/index.php?board=19.0

Well...I tried to setup an account at bugs.control-webpanel.com with the link you gave me above. Turns out I can't get a confirmation email for the account. So I submitted a support ticket instead informing them of it there and posted it in the bugs section of the forum you suggested above at the link below. Just cross referencing it everywhere so it's all linked together for anyone looking into it.

Bugs report section of this forum:
https://forum.centos-webpanel.com/index.php?topic=13060.0

8
Below is a github link to my repo where I have fixed both the netdata install and CWP Pro Terminal install scripts. I didn't know how else to report these so I made a topic here and posted on the forums at the links below. I tried setting up an account at bugs.centos-webpanel.com but could never get a confirmation email.

Forums:
Netdata
https://forum.centos-webpanel.com/index.php?topic=12874.0
CWP Pro Terminal
https://forum.centos-webpanel.com/index.php?topic=13054.0

My Github:
https://github.com/LPJon/cwpfixes

9
...if the update to Python3 would effect any of the standard vanilla installations of CWP. Or would this only effect CWP Server admins that have software requirements specifically for Python2?
The python3 package is called that way -- python3, leaving the python command to call python 2.7.5. So there shouldn't inherently be any interference with any of the default CWP kit. But I am unwilling to test on my production servers, because I've been burned by a python3 upgrade on a Linux Mint system and entered into a circular dependency hell that actually borked the whole system and took some doing to resolve.

But do let us know how it goes. I am curious and watching this thread. I just wanted to mention the python3 caveat after reviewing your script.

That is good to know and very important. I will note here that I did not add any repositories to install Python3. That does not mean that anyone is safe though. For anyone here, I run VPS servers powered by XCP-ng and typically run a snapshot before any package upgrades just to be sure that all is well. I also use BackupPC to make nightly backups of customer and server config files so that a fast restore is possible if the snapshot fails or there is a long standing issue that was missed. You are smart NOT to do things that could cause you major headaches. So far so good though....in truth the Python3 package could be removed after the build of the terminal modules in NPM as it's only needed to compile the modules I believe (Not sure though). As long as you don't delete the node_modules folder in / root / then you should be fine.

I would like to re-write this script to use NVM (Node Version Manager) as I think it would work better for future versions of this module. It would be agile and able to switch Node.js versions or revert fairly easily with failed installations. Just don't have the time without getting sponsored for it right now.

If anyone really want's something like that here is a link to sponsor me on Github. I'm not gonna hold my breath though....this is not a really pressing issue.

https://github.com/sponsors/LPJon

10
This is great -- your contributions seem valuable, resolving longstanding little niggling bugs. Please contribute your code directly to the devs, as they may miss your forum posts and Github code repository. They do appreciate code like this -- they accepted my patch script back in my early days of CWP where I fixed post-migration issues with the cPanel -> CWP migration routine (basic functionality worked, but some cleanup was needed).

Where and how do I submit the code to them? Is there a specific place to do that?

11
If anyone has recently used my script then please run this command to fix a system error which WILL stop netdata from properly installing.

!!!BE SURE TO REMOVE THE SPACES IN THE FILE PATH AT THE END!!!
Code: [Select]
sed -ri 's#(.*)(\$)(gccversion)(.*)#\17\4#' / etc / profile
This will fix the / etc / profile where
Code: [Select]
source /opt/rh/devtoolset-$gccversion/enable was inserted at the end of the file instead of
Code: [Select]
source /opt/rh/devtoolset-7/enable

12
Scripts / Re: CWP Pro Terminal Fails to load with a blank (black) Screen
« on: August 29, 2023, 08:31:32 AM »
If anyone has recently used my script then please run this command to fix a system error which WILL stop netdata from properly installing.

!!!BE SURE TO REMOVE THE SPACES IN THE FILE PATH AT THE END!!!
Code: [Select]
sed -ri 's#(.*)(\$)(gccversion)(.*)#\17\4#' / etc / profile
This will fix the / etc / profile where
Code: [Select]
source /opt/rh/devtoolset-$gccversion/enable was inserted at the end of the file instead of
Code: [Select]
source /opt/rh/devtoolset-7/enable

13
So just to make some things easier I'm posting a link to my Github with a working netdata installer as of 8/29/23. This would be a drop-in replacement for the script already in the server at
Code: [Select]
/scripts/install_netdataIf you just replace the scripts and then run the netdata installer from the Web GUI Dashboard it should install and work correctly.

https://raw.githubusercontent.com/LPJon/cwpfixes/main/install_netdata

14
okay here is the second piece of code needed to keep netdata running after reboots.

Code: [Select]
echo 'd /var/run/netdata 0755 root root' > /usr/lib/tmpfiles.d/netdata.conf
this will make systemd create the directory /var/run/netdata on each reboot so the netdata service can use it for the socket file.

If you want to edit the "install_netdata" script file here is the code that will make the script do this automatically from the start.
Code: [Select]
sed -ie '/# restart netdata/a echo "d /var/run/netdata 0755 root root" > /usr/lib/tmpfiles.d/netdata.conf' /scripts/install_netdata

15
I found another problem here I'm working on now. Apparently when the server is restarted the netdata service is not able to start due to a missing directory it can't create for the socket file. I will report back when I have a solution for it. It looks like the directory is deleted each reboot so it needs a little help.

Pages: [1] 2