I am getting this error and sites are not opening now
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
I got this problem after doing this
yum remove php php-cli php-common php-gd php-ldap php-mysql php-odbc php-pdo php-pear php-pecl-apc php-pecl-memcache php-pgsql php-soap php-xml php-xmlrpc
Most probably there is a configuration file left for php in /etc/httpd/conf.d/ that is loaded by default by apache (having the .conf extension). Since you have removed php, php module can't be loaded and httpd throws that error being unable to start.
So go to /etc/httpd/conf.d, see what .conf files you have there and either remove the php.conf file or at least comment the php module in it so it won't be loaded when apache is restarted. Then try again to restart apache by issuing systemctl restart httpd
Related
Postgres (13.5) cannot start after restarting server (Debian 4.19.208-1)
UPDATE 1
I changed user permissions and now I have another error on starting postgres:
systemctl status postgresql
FATAL: lock file "postmaster.pid" already exists
But I checked pg clusters and there exists only one:
Also I deleted postmaster.pid and there is no file any more:
So I have no errors details but postrges is shutting down.
Any ideas?
==============================================================
I'm trying to start manually sudo service postgresql start but got error:
Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details.
So then I ran systemctl status postgresql
Results:
FATAL: data directory "/var/lib/postgresql/13/main" has invalid permissions
DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
I modified permissions:
chmod u=rwx /var/lib/postgresql/13/main
chmod g=rx /var/lib/postgresql/13/main
But I still see the same error about permissions.
You can see whole results on screenshot
Sorry, I'm not so familiar with Linux
I fixed this problem. I ran postgres not as a service but with logs:
postgresql -D /var/lib/postgresql/13/main
And I saw in the log that problem was with pg_hba.conf. I opened this file - it was empty!
So I restored pg_hba.conf from backup and started postgres as service
I've installed a clean BigBlueButton on Ubuntu server but when I try to run it I can't and when I tried to debug I got this error.
java.io.IOException: error=24, Too many open files
Mar 12 05:35:11 NC-PH-2486 run-prod.sh[27006]: org.apache.catalina.LifecycleException: Failed to start component
Can anyone help?
Try changing LimitNOFILE=8024 from 1024 in /lib/systemd/system/bbb-web.service and then "sudo systemctl restart bbb-web".
Also note that BigBlueButton won't scale to use all of those cores.
Ref:
https://groups.google.com/forum/#!searchin/bigbluebutton-setup/LimitNOFILE|sort:date/bigbluebutton-setup/NkIt3Dq4HhY/nE0d31uoDgAJ
Following, How to capture data change in yugabyte db?
to publish the change logs.
It works properly. But, yb-connector.jar is not resuming the publishing change data logs, after restarting yugabyte db.
Commands Executed:
wget -O yb-cdc-connector.jar https://github.com/yugabyte/yb-kafka-connector/blob/master/yb-cdc/yb-cdc-connector.jar?raw=true
terminal1:
###start yugabyte db
/opt/yugabyte/yugabyte-2.0.10.0/bin/yb-ctl --data_dir "/opt/yugabyte/data" start
terminal2:
###start load generator
julia "/root/gen_users_yb.jl"
terminal3:
###publish change logs
java -jar ./yb-cdc-connector.jar --table_name yugastore.users --master_addrs 127.0.0.1:7100 --log_only
terminal1:
###stop yugabyte db
/opt/yugabyte/yugabyte-2.0.10.0/bin/yb-ctl --data_dir "/opt/yugabyte/data" stop
(Note: upon LibPQ Exception load generator exits and yb-connector waits)
terminal2:
###restarting load generator
julia "/root/gen_users_yb.jl"
Observation: No resumption in publishing logs on terminal 3
Please help me in configure yb-cdc-connector resume printing logs upon yb-ctl restart (stop and start).
This isn't yet supported. Can you create an issue on github https://github.com/yugabyte/yugabyte-db/issues ?
I'm trying to install SonarQube : i ve followed those steps :
Setting up SOnarQube Tuto : here
To summarize it :
Downloading Sonar and moving it to /opt/sonar
adding those coonfig steps to /opt/sonar/conf/sonar.properties :
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
and
sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=9000
implementing sonar as a service:
sudo cp /opt/sonar/bin/linux-x86-64/sonar.sh /etc/init.d/sonar
sudo gedit /etc/init.d/sonar
Insert two new lines:
SONAR_HOME=/opt/sonar
PLATFORM=linux-x86-64
Modify the following lines:
WRAPPER_CMD="${SONAR_HOME}/bin/${PLATFORM}/wrapper"
WRAPPER_CONF="${SONAR_HOME}/conf/wrapper.conf"
...
PIDDIR="/var/run"
Register as a Linux service:
sudo update-rc.d -f sonar remove
sudo chmod 755 /etc/init.d/sonar
sudo update-rc.d sonar defaults
After those steps : i ve tried to run Sonar from : localhost:9000/sonar and after executing : sudo /etc/init.d/sonar start
`
Strangely , it didsn't run .
SO when i run `sudo /etc/init.d/sonar status , i discover that it goes steps after few seconds , and it throws some error in it log file , like the following :
es.log:
2017.12.09 18:05:14 ERROR es[][o.e.b.Bootstrap] Exception
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.6.3.jar:5.6.3]
2017.12.09 18:05:14 WARN es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.3.jar:5.6.3]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.3.jar:5.6.3]
... 6 more
Any suggestions ??
SonarSource has upgraded the Elasticsearch tool used as a part of the latest SonarQube LTS version. As a result SonarQube cannot be run as a root. See this blog and the SonarQube 6.6 upgrade notes and this SO question.
Change the root access to the sonar file. Try running in normal user access.
chown <another user>:<user group> sonar.sh
I was facing the same issue and spend good amount of time before getting the solution.
Error was same as
2017.12.09 18:05:14 ERROR es[][o.e.b.Bootstrap] Exception
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.3.jar:5.6.3]
Solution
Create a ‘sonar’ user using adduser command //I was using linux system
chown -R sonar sonar-install-folder/
Edit the sonar.sh file sonar-install-folder/bin/linux-x86-6 in start script and change the #RUN_AS_USER to be RUN_AS_USER=sonar
And then use below commands
./sonar.sh stop
Gracefully stopping SonarQube...
SonarQube was not running.
./sonar.sh start
Starting SonarQube...
Started SonarQube.
./sonar.sh status
SonarQube is running (22100).
So, basically elastic search doesnt require to be run by root user. By default the RUN_AS_USER was commented in the startup script which was picking my current user which was root, and then some linux permission rules come into picture due to which elasticsearch process was not getting up and which was causing sonar process to go down as well.
It was evident from sonar.log
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2020.05.08 06:36:36 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2020.05.08 06:36:36 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.05.08 06:36:36 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
Create new user to run the sonarQube or access the SonarQube dashboard
for ubuntu flavour user creation.
#sudo adduser sonar.
after executing the above command it will ask for passwd
#adduser sonar sudo
#adduser sonar admin
#sudo su sonar
chown sonar:sonar sonar.sh
root#ubuntu:-$ apachectl restart
Gives me this error:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax
error on line 1 of /etc/apache2/mods-enabled/perl.load: Cannot load
/usr/lib/apache2/modu les/mod_perl.so into server:
/usr/lib/apache2/modules/mod_perl.so: cannot open s
hared object file: No such file or directory Action 'restart' failed.
The Apache error log may have more information.
IN line 140 of apache2.conf there is this:
Include mods-enabled/.load*
Include mods-enabled/.conf*
In the file perl.load there is only one line:
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
Kindly assist me on how I can rectify this as it was working properly until apache did and update and it wont restart now.