WHM/cPanel Copy Multiple Accounts/Packages From Another Server failing for each account? - centos

Just bought a new server that runs WHM/cPanel, same as the old. Trying to use the built in tool to migrate multiple accounts / packages over. I'm able to connect to the other server, it lists out all the packages & accounts, I select all and start the process.
Then it goes through each package and account and fails to copy anything over. This is the error given for a sample account:
Command failed with exit status 255
...etc...
Copying Suspension Info (if needed)...Done
Copying SSL certificates, CSRs, and keys...Privilege de-escalation before loading datastore either failed or was omitted. at /usr/local/cpanel/Cpanel/SSLStorage.pm line 1159
Cpanel::SSLStorage::_load_datastore('Cpanel::SSLStorage::Installed=HASH(0x3c72300)', 'lock', 1) called at /usr/local/cpanel/Cpanel/SSLStorage.pm line 1244
Cpanel::SSLStorage::_load_datastore_rw('Cpanel::SSLStorage::Installed=HASH(0x3c72300)') called at /usr/local/cpanel/Cpanel/SSLStorage/Installed.pm line 634
Cpanel::SSLStorage::Installed::_rebuild_records('Cpanel::SSLStorage::Installed=HASH(0x3c7230 0)') called at /usr/local/cpanel/Cpanel/SSLStorage.pm line 308
Cpanel::SSLStorage::__ANON__() called at /usr/local/cpanel/Cpanel/SSLStorage.pm line 1330
Cpanel::SSLStorage::_execute_coderef('Cpanel::SSLStorage::Installed=HASH(0x3c72300)', 'CODE(0x49ee958)') called at /usr/local/cpanel/Cpanel/SSLStorage.pm line 310
Cpanel::SSLStorage::rebuild_records('Cpanel::SSLStorage::Installed=HASH(0x3c72300)') called at /usr/local/cpanel/scripts/pkgacct line 2888
Script::Pkgacct::__ANON__('Cpanel::SSLStorage::Installed=HASH(0x3c72300)') called at /usr/local/cpanel/scripts/pkgacct line 2913
Script::Pkgacct::backup_ssl_for_user('jshea89', '/home/webwizard/cpmove-jshea89') called at /usr/local/cpanel/scripts/pkgacct line 532
Script::Pkgacct::script('Script::Pkgacct', '--use_backups', '--skiphomedir', 'jshea89', '/home/webwizard', '--split', '--compressed', '--mysql', 5.5, ...) called at /usr/local/cpanel/scripts/pkgacct line 111
==sshcontroloutput==
sh-4.1# exit $RET
exit
sh-4.1$ exit $RET
exit
sshcommandfailed=255`

A bit of a hack, but I went to /usr/local/cpanel/Cpanel/SSLStorage.pm line 1244 and commented out the Carp.
Accounts from my old dead server are now archiving :)

After some researching, I was able to determine that this was caused by incorrect ownership on the /home/user/ssl directory and its subdirectories. Someone had set the owner and group to root:root, when infact it should have been user:user.
Hopefully this helps some of you solve the problem!

Related

How can fixed this error in moodle update?

HelloW!
When I went to upgrade moodle 3.10 to 3.11 and later 4.x.
I got a problem, after installing all the plugins that weren't on disk, and others that weren't found.
When proceeding, I had this image error.
Error Image Print
I use moodle in PT-BR, this is an error log:
Atualizando para nova versão
Importação de idioma: pt_br_old
Impossível achar componente
Outras informações sobre este erro
Informações de depuração: pt_br_old
Error code: cannotfindcomponent×Ignorar essa notificação
Rastreamento de pilha:
line 810 of /lib/componentlib.class.php: lang_installer_exception thrown
line 665 of /lib/componentlib.class.php: call to lang_installer->install_language_pack()
line 45 of /admin/tool/langimport/lib.php: call to lang_installer->run()
line 1741 of /lib/upgradelib.php: call to tool_langimport_preupgrade_update()
line 1856 of /lib/upgradelib.php: call to upgrade_language_pack()
line 519 of /admin/index.php: call to upgrade_core()
log in english:
Updating to new version
Language import: pt_br_old
Impossible to find component
Other information about this error
Debug info: pt_br_old
Error code: cannotfindcomponent×Ignore this notification
Stack tracking:
line 810 of /lib/componentlib.class.php: lang_installer_exception thrown
line 665 of /lib/componentlib.class.php: call to lang_installer->install_language_pack()
line 45 of /admin/tool/langimport/lib.php: call to lang_installer->run()
line 1741 of /lib/upgradelib.php: call to tool_langimport_preupgrade_update()
line 1856 of /lib/upgradelib.php: call to upgrade_language_pack()
line 519 of /admin/index.php: call to upgrade_core()
I installed all the missing plugins on the disk given in the update.
I downloaded and installed the PT-BR Moodle 3.11 language pack in the lang folder and also cleared the cache of the folders inside moodledata in my case it has another name. But i don't delete lang folder in moodledata and exist content in this folder.
path moodledata: /var/AnotherName
I updated the system, ubuntu, entered the permissions in the folder again and nothing worked until now.
I kept the config.php from the old moodle as recommended. The only warning I got in the update was about input_vars below 5000, and about the database not being in exact moodle format. But it was just warnings.

Eclipse / PyDev Stop button not working with OSError: [WinError 6] The handle is invalid error

I have the following Eclipse version on Windows 10:
Version: 2020-09 (4.17.0)
Build id: 20200910-1200
I am using PyDev along with it.
In my code I am using selenium to make a number of url calls (web scraping). When it happens that a particular url is not present or at least not present in the way most of the urls I am reading are, I get the following error:
Traceback (most recent call last):
File "C:\Users\foobar\eclipse-workspace\WeatherUndergroundUnderground\historical\BWI_Fetch.py", line 44, in <module>
main(city, month_date, start_year, end_year)
File "C:\Users\foobar\eclipse-workspace\WeatherUndergroundUnderground\historical\BWI_Fetch.py", line 22, in main
driver.get(city_url);
File "C:\Users\foobar\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "C:\Users\foobar\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\foobar\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror
Exception ignored in: <function Popen.__del__ at 0x0000019267429F70>
Traceback (most recent call last):
File "C:\Users\foobar\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 945, in __del__
self._internal_poll(_deadstate=_maxsize)
File "C:\Users\foobar\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1344, in _internal_poll
if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
OSError: [WinError 6] The handle is invalid
When I get this particular error, eclipse is still running and pushing the red stop button does not work to end the program. I can usually use the red stop button for just about any other python program I have written, but this code/error seems to hang things. How can I end the process from within the Eclipse application?
The error in the stack trace is not really related to PyDev, so, the stack trace error is only really fixable in Selenium/Python (the error says that it's trying to access a process which is already dead on the __del__).
Now, related to the reason why PyDev wasn't able to kill it, I think that you probably have some process which spawned a subprocess and is not reachable anymore because the parent process died and thus it's not possible to create a tree to kill that process from the initial process launched in PyDev.
The actual code which does this in PyDev is: https://github.com/fabioz/winp/blob/master/native/winp.cpp#L208
I think that it should be possible to use the windows api to create a JobObject and then AssignProcessToJobObject and on kill also kill the JobObject so that it kills all associated processes so that things are setup in a way that that this doesn't happen, but this isn't currently done.
As a note, usually I have an alias for: taskkill /im python.exe /f (which will kill all the python.exe processes running in the machine) and it's what I usually use in such cases, so, if something like that happens I just kill all the python.exe processes in the machine.
Although note that if you spawned some other process... say, chrome.exe -- in that process tree, that process must also be killed for the initial shell that launched python to be really disposed.
This error message...
Exception ignored in: <function Popen.__del__ at 0x0000019267429F70>
...implies that the builtins module was destroyed before running __del__ in process of garbage collecting.
Hence PyDev is no more able to communicate with the relevant python modules. As a result Stop button isn't functioning and raises the error:
OSError: [WinError 6] The handle is invalid

pyglet "Unable to share contexts" exception when running PsychoPy demo twice

PsychoPy looks like just what I need. But I want to use my own development environment (a straightforward IPython prompt combined with the editor of my choice) instead of the provided IDE.
The trouble is that you seem to have to quit Python and relaunch after every PsychoPy run. If for example I cd to the ...../demos/coder/stimuli directory and type run gabor.py it runs fine, but if I then type run gabor.py again I get this exception from pyglet:
C:\snap\PsychoPy2\lib\site-packages\pyglet\window\win32\__init__.pyc in _create(self)
259 if not self._wgl_context:
260 self.canvas = Win32Canvas(self.display, self._view_hwnd, self._dc)
--> 261 self.context.attach(self.canvas)
262 self._wgl_context = self.context._context
263
C:\snap\PsychoPy2\lib\site-packages\pyglet\gl\win32.pyc in attach(self, canvas)
261 self._context = wglext_arb.wglCreateContextAttribsARB(canvas.hdc,
262 share, attribs)
--> 263 super(Win32ARBContext, self).attach(canvas)
C:\snap\PsychoPy2\lib\site-packages\pyglet\gl\win32.pyc in attach(self, canvas)
206 raise RuntimeError('Share context has no canvas.')
207 if not wgl.wglShareLists(share._context, self._context):
--> 208 raise gl.ContextException('Unable to share contexts')
209
210 def set_current(self):
ContextException: Unable to share contexts
Is there some sort of pyglet.cleanup() I can call (analogous to pygame.quit()) to allow PsychoPy scripts to run more than once in the same session? Or other way of avoiding this problem?
I'm using the Standalone PsychoPy distro version 1.81.02, untouched. The problem is not specific to IPython---it also can also be demonstrated from the plain Python prompt if you disable sys.exit and type execfile('gabor.py') twice:
C:\snap\PsychoPy2\Lib\site-packages\PsychoPy-1.81.02-py2.7.egg\psychopy\demos\coder\stimuli>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import sys; sys.exit = lambda x:x
>>> execfile('gabor.py')
0.6560 WARNING Movie2 stim could not be imported and won't be available
1.6719 WARNING Monitor specification not found. Creating a temporary one...
>>>
>>> execfile('gabor.py')
Traceback (most recent call last):
[snip]
File "C:\snap\PsychoPy2\lib\site-packages\pyglet\gl\win32.py", line 208, in attach
raise gl.ContextException('Unable to share contexts')
pyglet.gl.ContextException: Unable to share contexts
I don't know how to undo all the pyglet/psychopy initialisation - neither are really designed for you to do this, so there would be some work here. But I'm not sure it's a good idea anyway to run scripts the way you are doing.
The PsychoPy app itself gets around the by launching each script in a new process. It means that you know the namespace is clean on each run. Running your script on top of the previous one can lead to some really hard-to-find bugs because you don't know in what state the previous script left the memory, graphics card and namespace.
cheers
Jon

lvcGame, VBS and HLA setup Error 127 out of LVCGame

I am trying to setup VBS to talk HLA to a legacy app using LVCGame.
I am using openRTI currently in my project. I have LVCGame pointed to a directory with the following dlls:
RTI-NG.dll
OpenRIT.dll (copied from another folder)
libRTI-NG.dll (copy of RTI-NG.dll and renamed)
FedTime.dll
My vbsClient.config relevant lines:
Plugins = HLA-1.3.dll : HLA-1.3\Project\HLA.config
I am getting the following error out of LVCGame:
2014-12-31 10:48:03 INFO (LVCGAME::LVCGame::init) Initialised.
2014-12-31 10:48:03 ERROR (LVCGAME::LVCGame::start) 'class LVCGAME::UTILS::Exception' (src\LVCGame.cpp, line 766): Couldn't load plugin .\lib\HLA-1.3.dll. Error Code: 127
I did send an email to VBS support but it I had any idea what a 127 error was maybe I could get further.
I found that another free RTI Portico implementation is mentioned as working with LVCgame giving that a try has pretty similar results I get and error 126 instead of a 127.
2015-01-02 09:47:47 INFO (LVCGAME::UTILS::IOUtils::extractDllLoadPath) Using DLL path specified as 'D:\Program Files (x86)\Portico\portico-2.0.1\bin\vc10'.
2015-01-02 09:47:47 INFO (LVCGAME::LVCGame::init) Initialised.
2015-01-02 09:47:47 ERROR (LVCGAME::LVCGame::start) 'class LVCGAME::UTILS::Exception' (src\LVCGame.cpp, line 766): Couldn't load plugin .\lib\HLA-1.3.dll. Error Code: 126
2015-01-02 09:47:47 ERROR (LVCGAME::LVCGame::start) LVCGame start failed!
So eventually I found that Portico was creating a log file located in my VBS directory\logs. From there I was able to see that Portico at least was not able to find my .fed file I had the path messed up.

Hudson failing build w/o revealing cause

Every build has failed as of Tuesday. I'm not exactly sure what happened. The Phing targets (clean/prepare) are being executed properly. Additionally, the unit tests are passing with flying colors, with only a warning for duplicate code (not a reason for a fail). I tried removing the phpDoc target to see if that was causing the error, but the build still failed.
Started by user chris Updating
file://localhost/projects/svn/ips-com/trunk
At revision 234 no change for
file://localhost/projects/svn/ips-com/trunk
since the previous build [trunk] $
/opt/phing/bin/phing clean prepare
-logger phing.listener.NoBannerLogger Buildfile:
/var/lib/hudson/.hudson/jobs/IPS/workspace/trunk/build.xml
IPS > clean:
[echo] Clean... [delete] Deleting directory
/var/lib/hudson/.hudson/jobs/IPS/workspace/build
IPS > prepare:
[echo] Prepare...
[mkdir] Created dir: /var/lib/hudson/.hudson/jobs/IPS/workspace/build
[mkdir] Created dir: /var/lib/hudson/.hudson/jobs/IPS/workspace/build/logs
[mkdir] Created dir: /var/lib/hudson/.hudson/jobs/IPS/workspace/build/logs/coverage
[mkdir] Created dir: /var/lib/hudson/.hudson/jobs/IPS/workspace/build/logs/coverage-html
[mkdir] Created dir: /var/lib/hudson/.hudson/jobs/IPS/workspace/build/docs
[mkdir] Created dir: /var/lib/hudson/.hudson/jobs/IPS/workspace/build/app
BUILD FINISHED
Total time: 1.0244 second
[workspace] $ /bin/bash -xe
/tmp/hudson3259012225710915845.sh
+ cd trunk/tests
+ /usr/local/bin/phpunit --verbose -d memory_limit=512M --log-junit
../../build/logs/phpunit.xml
--coverage-clover ../../build/logs/coverage/clover.xml
--coverage-html ../../build/logs/coverage-html/
PHPUnit 3.5.0 by Sebastian Bergmann.
IPS Default_IndexControllerTest .
Default_AuthControllerTest ......
Manage_UsersControllerTest .....
testDeleteInvalidUserId ..
testGetPermissionsForInvalidUserId .. Audit_OverviewControllerTest
............
Time: 14 seconds, Memory: 61.00Mb
[30;42m[2KOK (28 tests, 198
assertions) [0m[2K Writing code
coverage data to XML file, this may
take a moment.
Generating code coverage report, this
may take a moment.
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
Warning: Unknown: Error occured while
closing statement in Unknown on line 0
[workspace] $ /bin/bash -xe
/tmp/hudson1439023061736436000.sh
+ /usr/local/bin/phpcpd --log-pmd ./build/logs/cpd.xml ./trunk phpcpd
1.3.2 by Sebastian Bergmann.
Found 1 exact clones with 6 duplicated
lines in 2 files:
library/Ips/Form/Decorator/SplitInput.php:8-14
library/Ips/Form/Decorator/FeetInches.php:10-16
0.04% duplicated lines out of 16585 total lines of code.
Time: 4 seconds, Memory: 19.50Mb [DRY]
Skipping publisher since build result
is FAILURE Publishing Javadoc [xUnit]
[INFO] - Starting to record. [xUnit]
[WARNING] - Can't create the path
/var/lib/hudson/.hudson/jobs/IPS/workspace/generatedJUnitFiles.
Maybe the directory already exists.
[xUnit] [INFO] - Processing
PHPUnit-3.4 (default) [xUnit] [INFO] -
[PHPUnit-3.4 (default)] - 1 test
report file(s) were found with the
pattern 'build/logs/phpunit.xml'
relative to
'/var/lib/hudson/.hudson/jobs/IPS/workspace'
for the testing framework 'PHPUnit-3.4
(default)'. [xUnit] [INFO] -
Converting
'/var/lib/hudson/.hudson/jobs/IPS/workspace/build/logs/phpunit.xml'
. [xUnit] [INFO] - Stopping recording.
Publishing Clover coverage report...
Publishing Clover XML report...
Publishing Clover coverage results...
Finished: FAILURE
What changed since Tuesday? Try to manually run exactly the same commands that Hudson tries to run from the same directory that Hudson starts it from (usually the jobs workspace directory). Of course with the user account that Hudson is started under.
There are several possibilities. ranging from standard groups for a directory, to permission, or other things outside of Hudson. Was Hudson upgraded? Was a plugin upgraded? Was the OS or php upgraded? Was there a change in the default or user .profile or .env (or the equivalent files)? Does another process accesses the workspace? ......
Once I had the problem that all of the sudden my deployment scripts did not run anymore. The mystery was, that I could still run the script from command line with the Hudson user account. The reason was simple but took a while to uncover. There was a java upgrade from 5 to 6. Both versions were available. After comparing the environment variables, there was a difference in the path. The problem was that the new path was set in the global .profile. But Hudson does not open an interactive shell, therefore the .profile will not be executed. If you have a problem like this, you can put the initialization in the .env file (or whatever the filename is for your system), because this will be run regardless if it is a interactive shell or not. Alternatively you can configure Hudson to set it on master or node/slave level.
if you want a command to not break the 'build' as a failure you have to add #! in front of the command to prevent the flags -xe which produce this behaviour.