I installed passenger with apache on centos7.
After I installed successfully, I put this passenger config in httpd.conf of apache, then I restart apache again, I still get error as below,
Jan 25 04:11:14 ip-10-0-0-201 systemd[1]: Starting The Apache HTTP Server...
Jan 25 04:11:14 ip-10-0-0-201 httpd[26168]: httpd: Syntax error on line 351 of /etc/httpd/conf/httpd.conf: Cannot load /home/centos/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.1.12/buildout/apache2...
Jan 25 04:11:14 ip-10-0-0-201 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 25 04:11:14 ip-10-0-0-201 kill[26170]: kill: cannot find process ""
Jan 25 04:11:14 ip-10-0-0-201 systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 25 04:11:14 ip-10-0-0-201 systemd[1]: Failed to start The Apache HTTP Server.
Jan 25 04:11:14 ip-10-0-0-201 systemd[1]: Unit httpd.service entered failed state.
Jan 25 04:11:14 ip-10-0-0-201 systemd[1]: httpd.service failed.
This is my httpd.conf
#EnableMMAP off
EnableSendfile on
LoadModule passenger_module /home/centos/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.1.12/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/centos/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/passenger-5.1.12
PassengerDefaultRuby /home/centos/.rbenv/versions/2.5.0/bin/ruby
</IfModule>
# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
If i remove code above from httpd.conf, I can still restart apache successfully.
Any suggestions are much appreciated.
Related
24 15:28:57 ivum01-HP-Pro-3330-SFF systemd[1]: marathon.service: Main process exited, code=exited, status=1/FAILURE
Jan 24 15:28:57 ivum01-HP-Pro-3330-SFF systemd[1]: marathon.service: Unit entered failed state.
Jan 24 15:28:57 ivum01-HP-Pro-3330-SFF systemd[1]: marathon.service: Failed with result 'exit-code'.
Jan 24 15:29:57 ivum01-HP-Pro-3330-SFF systemd[1]: marathon.service: Service hold-off time over, scheduling restart.
Jan 24 15:29:57 ivum01-HP-Pro-3330-SFF systemd[1]: Stopped Scheduler for Apache Mesos.
Jan 24 15:29:57 ivum01-HP-Pro-3330-SFF systemd[1]: Starting Scheduler for Apache Mesos...
Jan 24 15:29:57 ivum01-HP-Pro-3330-SFF systemd[1]: Started Scheduler for Apache Mesos.
Jan 24 15:29:57 ivum01-HP-Pro-3330-SFF marathon[1838]: No start hook file found ($HOOK_MARATHON_START). Proceeding with the start script.
Jan 24 15:29:59 ivum01-HP-Pro-3330-SFF marathon[1838]: [scallop] Error: Required option 'master' not found
Jan 24 15:29:59 ivum01-HP-Pro-3330-SFF systemd[1]: marathon.service: Main process exited, code=exited, status=1/FAILURE
Jan 24 15:29:59 ivum01-HP-Pro-3330-SFF systemd[1]: marathon.service: Unit entered failed state.
These are the commands I am using for Marathon:
sudo mkdir -p /etc/marathon/conf
sudo cp /etc/mesos-master/hostname /etc/marathon/conf
sudo cp /etc/mesos/zk /etc/marathon/conf/master
sudo cp /etc/marathon/conf/master /etc/marathon/conf/zk
sudo nano /etc/marathon/conf/zk
The only portion I need to modify in this file is the endpoint. Change it from /mesos to /marathon.
That’s an out of memory error. Are you sure your node has enough memory to run both Mesos Master and Marathon?
I am running Rstudio-server inside a centos container. But I am not able to get the logs from the running container. I have already tried RStudio Server - Application Logs as well as on stackoverflow answer, but they were not any help to me. I have tried various versions of Rstudio-servers.
In my CentOS 7 Docker container, and with my RStudio Server version 1.0.136, I've managed to access to the logs using:
journalctl -u rstudio-server
Some more logs can be found using
journalctl -f
In a more general point of view, there are many logs in the following folder: /var/log/anaconda
According to RStudio Server support, another solution would be to launch rstudio-server with --server-daemonize=0 in order for the output to be directly available on standard output & error.
i performed on my machine and i got all the logs
[root#ccanalytics-dev-dev01 rksharma]# journalctl -u rstudio-server
-- Logs begin at Wed 2017-05-17 15:43:44 EDT, end at Fri 2018-01-12 03:49:17 EST. --
May 18 08:14:00 ccanalytics-dev-dev01.netlink.com systemd[1]: Starting RStudio Server...
May 18 08:14:00 ccanalytics-dev-dev01.netlink.com systemd[1]: Started RStudio Server.
May 18 08:16:02 ccanalytics-dev-dev01.netlink.com rserver[40106]: ERROR system error 13 (Permission denied) [user-value=admin]; OCCURRED AT:
May 18 08:16:02 ccanalytics-dev-dev01.netlink.com rserver-pam[40159]: ERROR pam_authenticate failed: User not known to the underlying authent
May 18 08:44:16 ccanalytics-dev-dev01.netlink.com rserver[40106]: ERROR system error 13 (Permission denied) [user-value=rishabs]; OCCURRED AT
May 18 08:44:16 ccanalytics-dev-dev01.netlink.com rserver-pam[40193]: ERROR pam_authenticate failed: User not known to the underlying authent
May 23 05:17:06 ccanalytics-dev-dev01.netlink.com killall[20898]: rserver: no process found
May 23 05:17:06 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service: control process exited, code=exited status=1
May 23 05:17:06 ccanalytics-dev-dev01.netlink.com systemd[1]: Unit rstudio-server.service entered failed state.
May 23 05:17:06 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service failed.
May 23 05:17:07 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service holdoff time over, scheduling restart.
May 23 05:17:07 ccanalytics-dev-dev01.netlink.com systemd[1]: Starting RStudio Server...
May 23 05:17:07 ccanalytics-dev-dev01.netlink.com systemd[1]: Started RStudio Server.
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service: main process exited, code=killed, status=9/KILL
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com killall[20956]: rserver: no process found
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service: control process exited, code=exited status=1
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: Unit rstudio-server.service entered failed state.
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service failed.
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service holdoff time over, scheduling restart.
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: Starting RStudio Server...
May 23 05:19:00 ccanalytics-dev-dev01.netlink.com systemd[1]: Started RStudio Server.
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com killall[20993]: rserver: no process found
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service: control process exited, code=exited status=1
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com systemd[1]: Unit rstudio-server.service entered failed state.
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service failed.
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service holdoff time over, scheduling restart.
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com systemd[1]: Starting RStudio Server...
May 23 05:22:25 ccanalytics-dev-dev01.netlink.com systemd[1]: Started RStudio Server.
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service: main process exited, code=killed, status=9/KILL
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com killall[21022]: rserver: no process found
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service: control process exited, code=exited status=1
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: Unit rstudio-server.service entered failed state.
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service failed.
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: rstudio-server.service holdoff time over, scheduling restart.
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: Starting RStudio Server...
May 23 05:22:51 ccanalytics-dev-dev01.netlink.com systemd[1]: Started RStudio Server.
May 23 05:23:10 ccanalytics-dev-dev01.netlink.com rsession-rksharma[21050]: ERROR session hadabend; LOGGED FROM: rstudio::core::Error
I am trying docker examples and wanted to set the DOCKER_OPTS, but not able to find /etc/default/docker on amazon linux machine. Where to look for it?
In Amazon linux (CentOS,Fedora,RedHat etc), you can find it in /etc/sysconfig/docker
You need to restart docker service once you update that file.
If you didn't find it, check if docker is installed in that machine. Its recommended to use ecs-optimized-ami for running docker containers.
More details: ECS Optimized AMI
Latest docker versions use /etc/docker/daemon.json for changing the daemon options. I would suggest to use this file instead of environment variables. Look at the below docker documentation for more details
https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
Adding DOCKER_OPTS to /etc/sysconfig/docker will not work in Amazon Linux 2.
You will see this when watching the logs.
journalctl -u docker.service
Jan 17 08:11:07 portal-staging-new systemd[1]: Starting Docker Application Container Engine...
Jan 17 08:11:07 portal-staging-new systemd[1]: Ignoring invalid environment assignment 'DOCKER_OPTS=
Jan 17 08:11:07 portal-staging-new systemd[1]: --cluster-advertise=eth0:2375
Jan 17 08:11:07 portal-staging-new systemd[1]: --cluster-store=consul://consul:8500
Jan 17 08:11:07 portal-staging-new systemd[1]: --host tcp://0.0.0.0:2375
Jan 17 08:11:07 portal-staging-new systemd[1]: --host unix:///var/run/docker.sock
Jan 17 08:11:07 portal-staging-new systemd[1]: --log-driver=gelf
Jan 17 08:11:07 portal-staging-new systemd[1]: --log-opt gelf-address=udp://127.0.0.1:1513
Jan 17 08:11:07 portal-staging-new systemd[1]: --log-opt tag=docker
Jan 17 08:11:07 portal-staging-new systemd[1]: --userland-proxy=false
Jan 17 08:11:07 portal-staging-new systemd[1]: ': /etc/sysconfig/docker
So you will need to add the config to /etc/docker/daemon.json.
So i'm trying to deploy a rails 4.2.5 app, and at the last step of it, while apache2 needs to be reloaded, it fails, and I don't have many informations about this.
I browsed the web, but there isn't many answers about this, so i don't know what to do...
Active: active (exited) (Result: exit-code) since dim. 2016-01-31 03:01:31 CET; 9min ago
Process: 10766 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 10993 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Process: 10773 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
janv. 31 03:08:47 vps240378.ovh.net systemd[1]: apache2.service: control process exited, code=exited status=1
janv. 31 03:08:47 vps240378.ovh.net systemd[1]: Reload failed for LSB: Apache2 web server.
janv. 31 03:10:52 vps240378.ovh.net apache2[10945]: Reloading web server: apache2 failed!
janv. 31 03:10:52 vps240378.ovh.net apache2[10945]: Apache2 is not running ... (warning).
janv. 31 03:10:52 vps240378.ovh.net systemd[1]: apache2.service: control process exited, code=exited status=1
janv. 31 03:10:52 vps240378.ovh.net systemd[1]: Reload failed for LSB: Apache2 web server.
janv. 31 03:11:23 vps240378.ovh.net apache2[10993]: Reloading web server: apache2 failed!
janv. 31 03:11:23 vps240378.ovh.net apache2[10993]: Apache2 is not running ... (warning).
janv. 31 03:11:23 vps240378.ovh.net systemd[1]: apache2.service: control process exited, code=exited status=1
janv. 31 03:11:23 vps240378.ovh.net systemd[1]: Reload failed for LSB: Apache2 web server.
Does anybody know how to deal with it ?
Thanks
Looking at your top three lines you look like you are stopping apache, trying to reload, which falls - because it's stopped. And them starting it again. Is that the issue? If so don't stop apache, just reload. Reload is there so you don't have to restart.
Apologies if this is not the issue just my first take.
Reload provides instructions to children to complete their current request and stop, while new requests are served by your new configuration. If apache is stopped, there's nothing to do.
Need some help moving a rails app from webrick to passenger with apache. Im very new to all this and i cant get it running with passenger. I have tried a bunch of guides and I am not getting any errors apart from the rails server always using webrick instead of passenger. I am working on mac mini OSX as server
I seen that osx comes with a version of mac already installed but i read online that i should load a newer copy so i make sure that the currently installed apache is not running in system preferences/sharing/web sharing.
then i brew install apachetop. followed by gem install passenger and passenger-install-apache2-module .
I then follow the instructions from passenger in terminal which asks me to place some code in the httpd.conf file. which i find in /ect/apache2 from root.
I then add the virtual host info to the apache config file too where /public/mom is location of my rails app.
<VirtualHost *>
ServerName localhost:3000
DocumentRoot /public/mom
RailsEnv development
<Directory /public/mom>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
I then make sure apache is running with sudo apachectl start and try running my rails server but it still runs using webrick.
I have seen posts saying that i need to make sure that passenger is installing with the correct version of apache that i installed. how do i force passenger to install with the apache i installed rather then default? am i ment to be naming the servername within the config file as localhost? Can anyone give me some guidance on how to get the rails app running with passenger . maybe i missed some steps or misunderstood the process completely. thanks
edit: below is apache error_log
[Wed Jul 20 19:17:01 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 19:17:02 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 19:17:02 2011] [notice] Digest: done
[Wed Jul 20 19:17:02 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Wed Jul 20 19:17:22 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 20 19:39:32 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 19:39:45 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 19:39:45 2011] [notice] Digest: done
[Wed Jul 20 19:39:45 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Wed Jul 20 19:43:33 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 20 20:09:35 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
Warning: DocumentRoot [/public/mom] does not exist
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 20:09:35 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 20:09:35 2011] [notice] Digest: done
[Wed Jul 20 20:09:35 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Thu Jul 21 10:36:59 2011] [notice] caught SIGTERM, shutting down
"try running my rails server but it still runs using webrick", seems your webrick is still active.
lsof -i -P |grep 3000
kill -9 WEBRICK_PID