Starting graylog2 web interface - passenger

I am running the following command to start my backend.
passenger start -e production
But I am getting this error:
*** ERROR ***
Could not start Passenger Nginx core:
nginx: [alert] could not open error log file: open()
"/var/folders/jb/ln9fjc350gj85ntzrhthxc_85ffn5t/T/passenger-standalone.190uy5z/l
ogs/error.log" failed (2: No such file or directory)
2013/07/24 12:22:47 [emerg] 24155#0: "passenger_pre_start" directive The primary
group of the user specified by the 'default_user' option does not exist. Your
system's user account database is probably broken, please fix it. in
/var/folders/jb/ln9fjc350gj85ntzrhthxc_85ffn5t/T/passenger-standalone.190uy5z/co
nfig:93
Stopping web server... done
Please help.

I have faced the same issue with passenger and fixed.
Fix:
passenger uses 'nobody' as the default user and it takes the group which nobody is belongs to.
Change the default option with 'PassengerDefaultUser' directive in apache/nginx/httpd/virtual-host config.
PassengerDefaultUser your-user
Passenger will run the app with this 'you-user'
6.12.4. PassengerDefaultUser
Phusion Passenger enables user switching support by default. This
configuration option allows one to specify the user that applications
must run as, if user switching fails or is disabled. This option may
only occur once, in the global server configuration. The default value
is nobody.
6.12.5. PassengerDefaultGroup
Phusion Passenger enables user switching support by default. This
configuration option allows one to specify the group that applications
must run as, if user switching fails or is disabled. This option may
only occur once, in the global server configuration. The default value
is the primary group of the user specifified by PassengerDefaultUser.
ERROR which i got
Passenger could not be initialized because of this error: The option
PassengerDefaultUser is set to 'nobody', but its primary group doesn't
exist. In other words, your system's user account database is broken.
Please fix it.

Related

Failed to read values in CFPrefsPlistSource

I write cocoa-app and using Vapor . After starting the server i do get-request from the application. And and I get a message:
[User Defaults] Failed to read values in CFPrefsPlistSource<0x6080000e7500> (Domain: com.apple.PowerManagement, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null)): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access, detaching from cfprefsd
I'm try change SandBox settings, update Xcode(current version is 9.2), create App Groups, reboot my computer. Nothing helps.
If someone faced with a similar error - please help.

problems when install postgresql on windows server 2008

I'm trying to install PostgreSQL 9.0.1 on Windows Server 2008, but every time, there will be such error message
"Problem running post-install step. Installation may not complete
correctly. Failed to start the database server"
in the installation log, it is due to a failure in initdb.exe, error is
"The program postgres is needed by initdb, but was not found in the
same directory as D:\PostgreSQL\9.0\bin\initdb.exe, Check your
installation."
I searched such error in internet and tried the solution in this page "Installing PostgreSQL on Windows Server 2008", but no help.
After reading code of initdb, I know it is caused by the window api CreateProcess in the function pipe_read_line. the calling of CreateProcess returned -5 (access denied). it is because initdb was executed in a subprocess invoked in the functiion CreateRestrictedProcess.
I know it is due to privilege setting, I ran gpedit.msc to add users group (even everyone) into almost all privilege policy, but the error was still there.
I also assigned full control rights of the install target folder to everyone, no help!
I also tried postgresql 9.6.2, the error was still there :-)
from the code, I know if there is the environment variable PG_RESTRICT_EXEC with value 1, initdb will not executed in a restricted process. so before run initdb.exe, I set an environment PG_RESTRICT_EXEC=1 in command prompt, then run initdb.exe. this time such error was gone!!
So I wonder how to change the os settings to allow the installation running without error!

ProFTPD can't connect after install

Installed Webmin successfully on a Debian system.
Created a virtual server, added some users and a domain.
Installed ProFTPD via Webmin's unused modules.
Added a new user with same named group via System -> Users and Groups.
Tried to connect via ftp using my server's external ip and my new user's credentials.
This should work according to most tutorials but it doesn't.
I'm suspecting some other service handles FTP requests before ProFTPD.
Is there a way to monitor protocol handlers? Could it be something else?
Thanks in advance.
because webmin try start it as deamon, but maybe (like me on archlinux) you need to start it as system service... on root:
systemctl start proftpd.service
If you want to look at the logs error (if there is errors, but if server is not start, it should ne have error...) then use:
journalctl -xe command (as root), or
systemctl --failed , or
systemctl status proftpd.service (all of these commands under root user or sudoers users).
So first of all, check that service is running:
systemctl status
then check the config file of webmin service for proftpd use the correct protocol for call service (systemd for example), and then use correct sentence code for start/stop it. Check also it goes to look at the correct config file of proftpd current install place (depend of your distribution or the way you install it).
proftpd is not installed by webmin, proftpd is installed, then from webmin, you install a module who has to communicate with allready installed application proftpd. If this module is well configured for point on actual proftpd installation and correct call of service, then all will have to works.
(please, if this answer help you, do up vote for my answer, without notation when i help, i can not help more because i'm locked by the system, hope you understand)
Have a look at the server's log, check le ProFTP daemon status, check the firewall

Setting up RabbitMQ cluster on Windows servers

I am trying to set up a RabbitMQ cluster on Windows servers, and this requires using shared Erlang cookie file. According to the documentation, all I need to do is to ensure that the root directories on different machines contain the same .erlang.cookie file. So what I did is found these files on both machines and overwrote them with the same shared version.
After that all rabbitmqctl commands failed on the machine with new file version with "unable to connect to node..." error message. I tried to restart RabbitMQ Windows service, but still rabbitmqctl complained. I even reinstalled RabbitMQ on that machine, but then .erlang.cookie was reset back to the old version. Whenever I tried to use new version of cookie file, rabbitmqctl failed. When I restored an old version, it worked fine.
Basically I am stuck and can not proceed with cluster setup until I resolve this issue. Any help is appreciated.
UPDATE: Received an answer from RabbitMQ:
"rabbitmqctl will pick up the cookie from the user home directory while the service will pick it up from C:\windows. So you will need to synchronise those with each other, as well as with the other machine."
This basically means that cookie file needs to be repaced in two places: C:\Windows and current_user.
You have the above correct. The service will use the cookie at C:\Windows and when you use rabbitmqctl.bat to query the status it is using the cookie in your user directory (%USERPROFILE%).
When the cookies don't match the error look like
C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.8.2\sbin>rabbitmqctl.bat status
Status of node 'rabbit#PC-FOOBAR' ...
Error: unable to connect to node 'rabbit#PC-FOOBAR': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit#PC-FOOBAR']
hosts, their running nodes and ports:
- PC-FOOBAR: [{rabbit,49186},{rabbitmqctl30566,63150}]
current node details:
- node name: 'rabbitmqctl30566#pc-foobar'
- home dir: U:\
- cookie hash: Vp52cEvPP1PukagWi5S/fQ==
There is one more gotcha for RabbitMQ cookies on Windows... If you have a %HOMEDIR% and %HOMEPATH% environment variables (as we do in our current test environment, and sets homedir above to U:\), then RabbitMQ will get the cookie there and if there isn't one it makes one up and writes it there. This left me banging my head on my desk for quite a while when trying to get this working. Once I found this gotcha it was obvious the cookie files were the problem (as documented) they were just at an odd location (not documented AFAIK).
Hope this solves someones pain setting up RabbitMQ Clustering on Windows.

rabbitmqctl.bat on Windows XP: unable to connect to node rabbit#MYPCNAME: nodedown

I have just installed RabbitMQ on my WindowsXP PC. I have fulfilled the Erlang OPC15 prereq as well.
My rabitmq seems to be working. I did a simple test using pika in python and it seems to work. The service is urnning.
The problem is that I cannot do anything with rabbitmqctl.bat. I always get the response:
Status of node rabbit#MYPCNAME ...
Error: unable to connect to node rabbit#MYPCNAME: nodedown
diagnostics:
- nodes and their ports on MYPCNAME: [{rabbit,3097},{rabbitmqctl17251,1132}]
- current node: rabbitmqctl17251#mypcname
- current node home dir: C:\Documents and Settings\Myuser
- current node cookie hash: NOTSUREIFTHISISSENSITIVESOREMOVED==
In my rabbitmq log file I get:
=ERROR REPORT==== 12-Feb-2012::17:01:22 ===
** Connection attempt from disallowed node rabbitmqctl17251#mypcname **
From various forums I deduce this has something to do with cookies. What cookies are we talking about? What do I need to do to be able to manage my RabbitMQ instance using rabbitmqctl.bat? Please word your answer in a way that a non-erlang non-functional programmer would understand.
Had the same problem, this instruction straight out of the manual installation guide solved my problem:
Synchronise Erlang Cookies (when running a manually installed Windows Service)
Erlang Security Cookies used by the service account and the user
running rabbitmqctl.bat must be synchronised for rabbitmqctl.bat to
function.
To ensure Erlang cookie files contain the same string, copy the .erlang.cookie file from the Windows directory (normally C:\WINDOWS\.erlang.cookie) to replace the user .erlang.cookie. The user cookie will be in the user's home directory (%HOMEDRIVE%%HOMEPATH%), e.g. C:\Documents and Settings\%USERNAME%\.erlang.cookie or C:\Users\%USERNAME%\.erlang.cookie (Windows Vista and later).
Shortcut command for #Lining answer:
copy C:\Windows\.erlang.cookie %HOMEDRIVE%%HOMEPATH%\.erlang.cookie
Try to create a file called .erlang.cookie in your $HOME directory and put a simple passphrase in there.
Then restart rabbitmq and it might work. If it doesn't then rabbitmq is doing something to make sure you cannot put a system wide cookie in place.
It worked for me after replacing ".erlang.cookie" file under c:\Windows in C:\Documents and Settings\username folder, because cookie should be same as per my understanding.

Resources