Puppet + Passenger + Apache/Nginx - ruby

I'm working on a very large puppet deployment, but seem to be hitting a brick wall. My ideal setup is to use Nginx + Passenger to serve puppet. The problem I am having is that Puppet throws errors when running through passenger. If I start puppetmasterd, everything works fine, but serving through Passenger gives the following errors:
Jun 22 07:33:04 $master_hostname puppet-master[15710]: Starting Puppet master version 2.6.8
Jun 22 07:33:04 $master_hostname puppet-master[15720]: No support for http method POST
Jun 22 07:33:04 $master_hostname puppet-master[15720]: Denying access: Forbidden request: $client_hostname($client_ip) access to /report/$client_hostname [save] authenticated at line 0
Jun 22 07:33:04 $master_hostname puppet-master[15720]: Forbidden request: $client_hostname($client_ip) access to /report/$client_hostname [save] authenticated at line 0
Everything seems to point to an auth.conf problem, but my auth.conf file is about as generic as it could get, and like I said, everything works when I serve puppet using Rack directly.
Has anybody ever ran into this issue?

Sounds like this:
http://groups.google.com/group/puppet-users/browse_frm/thread/910994e88f21a497/cae809c17a9acd8a?#cae809c17a9acd8a
The concept being that you need to configure NGINX to pass information through to Puppet as it now provides the SSL layers.

Related

Ruby Mail Gem Relay Access from Localhost to Postfix

I'm on a workstation that doesn't have a FQDN. I'm developing in Ruby and using the mail gem. I host my own mail server on the LAN. I want to forward outgoing emails to this server, off to a gmail recipient (example).
Due to the fact I'm on my workstation (localhost), it not being recognized as part of one of my LAN domains (I have a static IP), it isn't being recognized by Postfix (from my mail server log):
Mar 25 08:44:30 machine.mydomain1.com postfix/smtpd[9653]: sacl_check: mbr_user_name_to_uuid(mygmail#gmail.com) failed: No such file or directory
Mar 25 08:44:30 machine.mydomain1.com postfix/cleanup[9657]: sacl_check: mbr_user_name_to_uuid(mygmail#gmail.com) failed: No such file or directory
Mar 25 08:44:30 machine.mydomain1.com postfix/smtp[9658]: 92946D63CD4: to=<mygmail#gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.14, delays=0.01/0.01/0/0.11, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as AE8ECD63CDA)
Mar 25 08:44:31 machine.mydomain1.com postfix/smtp[9661]: AE8ECD63CDA: to=<mygmail#gmail.com>, relay=gmail-smtp-in.l.google.com[173.194.195.26]:25, delay=0.52, delays=0/0.01/0.34/0.16, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[173.194.195.26] said: 550-5.7.1 [206.248.184.17 11] Our system has detected that this message is 550-5.7.1 not RFC 5322 compliant: 550-5.7.1 'From' header is missing. 550-5.7.1 To reduce the amount of spam sent to Gmail, this message has been 550-5.7.1 blocked. Please visit 550-5.7.1 https://support.google.com/mail/?p=RfcMessageNonCompliant 550 5.7.1 and review RFC 5322 specifications for more information. a2si7453997iog.10 - gsmtp (in reply to end of DATA command))
Mar 25 08:56:42 machine.mydomain1.com postfix/smtpd[9764]: NOQUEUE: reject: RCPT from unknown[192.168.1.4]: 554 5.7.1 <mygmail#gmail.com>: Relay access denied; from=<alpha#mydomain3.ca> to=<mygmail#gmail.com> proto=ESMTP helo=<mydomain3.ca>
I can use the mail gem properly on another box that has a FQDN just fine. I just can't seem to get it to work on my workstation. As it states in the mail server log:
'From' header is missing. 550-5.7.1 To reduce the amount of spam sent to Gmail, this message has been 550-5.7.1 blocked.
I'm assuming this is the machine name from, and not the email sender from. How can I tell the mail server that I'm not localhost? I've messed with the relay and other directives in postfix to no avail. So I'm trying to modify the Ruby syntax to make the server recognize me.
Any insight appreciated as to how I can get this to work. It's my development box and it's working on my production server, but I'd like to have it working on my dev box.
Adding the following fixed it, a config item for the gem:
mail.header['From'] = 'machine.mydomain.com'
Also making sure the relay information in postfix is set properly.

Magento before install on centos 7 getting 500 internal server error

Hi I am trying to install magento 1.9.x and magento2 in my centos operating system.. the following links help to configure apache2.4, php7 and mysql5.7 in centos.
Install magento link
after configure web server, php, mysql, magento files and all. I create database for magento2. Based on above link i did all steps one-by-one. After i run in browser localhost/magento2/
it show 500 Internal server error in firebug and blank browser.
I am beginner of centos and magento
Please any one help how to solve this problem i was spend past two days.
Apache error log:
[Sat Sep 10 14:22:33.728848 2016] [:error] [pid 2809] [client
::1:45432] PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir
"/var/www/html/magento2/var/page_cache" is not writable in
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\‌​nStack
trace:\n#0
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache/Backend/‌​File.php(180):
Zend_Cache::throwException('cache_dir "/var...')\n#1
/var/www/html/magento2/vendor/colinmollenhour/cache-backend-‌​file/File.php(87):
Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\n‌​#2
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(153)‌​:
Cm_Cache_Backend_File->__construct(Array)\n#3
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(94):
Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\n#4
/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend/Factory‌​.php(158):
Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...',
Array, Array, true, true, true)\n#5
/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend
in
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php
on line 209
To me this look like the main problem:
Uncaught Zend_Cache_Exception: cache_dir
"/var/www/html/magento2/var/page_cache" is not writable in /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\‌​nStack
You have the wrong permissions or wrong owner for this folder. You can fix this using chown for fixing the owner of that folder or chmod for fixing writing permissions for that folder.
Try this:
chown -R apache.apache /var/www/html/magento2/
This sets the whole magento2 folder to have apache as owner and group. It is not the best security measure but for testing is fine.

karaf 3.0.1 not starting up

I'm trying to start karaf 3.0.1 in a solaris box (without internet) but getting the following error:
karaf: Ignoring predefined value for KARAF_HOME
Could not resolve mvn:org.eclipse/org.eclipse.osgi/3.8.2.v20130124-134944
and in karaf.log:
Jun 30, 2014 12:21:09 PM org.apache.karaf.main.Main main
SEVERE: Could not launch framework
java.lang.RuntimeException: Could not resolve mvn:org.eclipse/org.eclipse.osgi/3.8.2.v20130124-134944
at org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
at org.apache.karaf.main.Main.createClassLoader(Main.java:315)
at org.apache.karaf.main.Main.launch(Main.java:234)
at org.apache.karaf.main.Main.main(Main.java:171)
the bundles are well in place (system folder) and the org.ops4j.pax.url.mvn.cfg file states:
org.ops4j.pax.url.mvn.repositories=\
file:${karaf.home}/${karaf.default.repository}#id=system.repository, \
file:${karaf.data}/kar#id=kar.repository#multi\
http://repo1.maven.org/maven2#id=central,\
http://repository.springsource.com/maven/bundles/release#id=spring.ebr.release,\
http://repository.springsource.com/maven/bundles/external#id=spring.ebr.external
I've tried running the framework using the three methods (server, service, client) but nothing seems to be working.
my environment is:
KARAF_BASE=/export/home/mehdi/bin/karaf
KARAF_HOME=/export/home/mehdi/bin/karaf
KARAF_ETC=/export/home/mehdi/bin/karaf/etc
KARAF_DATA=/export/home/mehdi/bin/karaf/data
JAVA_HOME=/opt/temp/jre1.7.0_13
I googled a bit and found a workaround which says to add -h 127.0.0.1 to the client script, but still nothing.

Error 403 and XAMPP Error 20024

So I have looked at many places to try and find the answer to this but could really use some other ideas for possibly how to fix this. I have gone into the new XAMPP security concept and change the Deny to Allow
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server- status|server-info))">
Order deny,allow
Allow from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Above is what my httpd-xampp.conf looks like at the bottom. I still am getting the 403 error on the website when I go to the localhost. So I then looked to the error log and found I am getting this error.
[Fri Oct 26 08:58:29.731458 2012] [core:error] [pid 5096:tid 1680] (20024)The given path is misformatted or contained invalid characters: [client ::1:59590] AH00127: Cannot map GET /system/%3C?echo($template. HTTP/1.1 to file
I have no idea what this means but I am running out of options. If anyone could help me or has an idea as to what might be giving me this error. I will try anything.
Thanks in advance
Alright so it turns out the problem is with XAMPP. Not sure why but when I tested this on another dev server everything worked just fine. I am guessing it has something to do with the new XAMPP Security Concept. My best answer to this would be to change the Deny to Allow in that section of your httpd-xampp.conf file. This solution worked for many people except me.
This is mostly due to Apache bug 41441. The Apache coders don't call it a bug and have closed it as WONTFIX in end of 2009. However, I am also experiencing this error on heidisql.com where I get tons of misformatted requests from spammers, harvesters and other broken clients. My error log is full of these, and I would be glad to have a way to handle such requests with a redirect or rewriterule.
Your URL does not contain a colon (:)
/system/%3C?echo($template.
... but %3C translates to "<", which is also used in Windows filesystem paths, which is why Apache is blocking that request for security reasons.

(random?) 500 errors in Magento front and backend - version 1.4.1.1

i need your help once again :)
For some time now i get strange 500 errors in the front and backend of magento. I use magento 1.4.1.1.
The errors can appear everywhere, anytime. I get about 10-20 of them every day. The errorlog reads something like this:
[Wed Oct 17 16:02:19 2012] [warn] [client 93.219.97.29] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: /index.php/admin/sales_order/view/order_id/1617/
[Wed Oct 17 16:02:19 2012] [warn] [client 93.219.97.29] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.xxxx.com/index.php/admin/sales_order/view/order_id/1617/
I have attached a screenshot of the error.
http://i.imgur.com/i6dvO.jpg
Do you guys have any idea what i can do? Thank you very much :)
Greets
I was receiving similar errors on 1.7.0.2 community edition on a Ubuntu 10.04 LTS LAMP server. In my case (using Virtualmin) I had incorrectly set the virtual server to run php in FastCGI as the website owner. The apache user is different from the site owner, and magento multi-site install was setup to run as that apache user.
ALSO, I had uncommented Magento's profiler inside index.php Varien_Profiler::enable();
and turned on the profiler via Magento admin panel (System->Configuration->Developer.
Commenting out the profiler object AND reversing the change to php execution mode did the trick.
See attached for the proper virtualmin setting, found in Virtualmin->Server Configuration->Website Options

Resources