can't start zabbix-server on osX: program counter not available for this architecture - macos

I've installed zabbix-2.2 (LTS) from sources on my OS X Yosemite.
When I'm trying to run server by
sudo -u _www /usr/local/sbin/zabbix_server -c /usr/local/etc/zabbix_server.conf
I'm getting following error in /tmp/zabbix_server.log.
What can I do?

Related

How to run "docker-machine create" in OS X?

I started Docker and am now following the tutorial, but for all I know I couldn't run the docker-machine command on OS X.
The documentation states that you run the following command to create a local virtual machine:
docker-machine create --driver virtualbox manager
However, this command doesn't work in OS X (11.6), with the following error:
Running pre-create checks...
Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"
I tried to install the virtualbox; however, another page clearly states that you must not install it on your local machine:
VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac)
Note: If your system does not satisfy these requirements, you can install Docker Toolbox, which uses Oracle VirtualBox instead of HyperKit.
So I only installed Docker for Mac and not virtualbox. So what am I missing here? The example page says you can run the tutorial on OS X, so I wonder how I can proceed...
You can follow along and run this example using Docker for Mac, Docker for Windows or Docker for Linux.
I had the same issue today and resolved it by installing VirtualBox as an additional step after installing Docker for Mac (I did so with brew install --cask virtualbox)
I don't recall having to do the extra install previously, but maybe I already had VirtualBox already installed because of another tool (like Vagrant). Anyway, this is explained in the Docker Machine documentation:
If you are using Docker for Mac
Docker for Mac uses HyperKit, a lightweight macOS virtualization
solution built on top of the Hypervisor.framework in macOS 10.10
Yosemite and higher.
Currently, there is no docker-machine create driver for HyperKit, so
you will use virtualbox driver to create local machines. (See the
Docker Machine driver for Oracle VirtualBox.) Note that you can run
both HyperKit and Oracle VirtualBox on the same system. To learn more,
see Docker for Mac vs. Docker Toolbox.
Make sure you have the latest VirtualBox correctly installed on your system (either as part of an earlier Toolbox install, or manual
install).
I had the same issue. At the same spot ;-)
For me the xhyve driver, available from https://github.com/zchee/docker-machine-driver-xhyve, worked.
In short:
brew install docker-machine-driver-xhyve
You get a notice some links need to be created manually, so copy those and execute
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Create:
docker-machine create --driver xhyve manager
Without VirtualBox. Im using OS X 10.11.6, too.
After updating my docker docker-machine command stopper working on my mac terminal.
So found after updating my docker I'll have to reinstall docker-machine CLI just to get the latest version.
Updated docker-machine to latest one using the command below helped me making docker-machine command working again.
base=https://github.com/docker/machine/releases/download/v0.16.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-
machine &&
chmod +x /usr/local/bin/docker-machine
See Docs (https://docs.docker.com/machine/install-machine/#install-machine-directly)

Service command on Mac OS X

I used to be able to execute on the Mac OS X (10.10.5) command line:
$ sudo service tomcat7 status
However, I must have accidentally deleted the package associated with service command and I am unable to find the name of the service package to reinstall. Any pointers would be greatly helpful.
I can't find service in either /sbin/ or /bin/ or /usr/sbin/
I think you need launchctl.
sudo launchctl load /Library/LaunchDaemons/org.apache.tomcat.plist
See https://www.joel.lopes-da-silva.com/2008/05/13/installing-tomcat-on-mac-os-x/
If you want to start mysql on OSX which is installed through brew, please use this command:
brew services start mysql#5.6
Update the mysql version based on the system mysql version.

How to switch active erlang in macport?

How to activate version #17.4?
I have OS X 10.9.5, MacPorts 2.3.3. And active erlang #R15B03+ssl
Do this:
$ sudo port list | grep erlang
erlang #R15B03 lang/erlang
erlsom #1.2.1 erlang/erlsom
log4erl #0.8.6 erlang/log4erl
mochiweb #2.7.0 erlang/mochiweb
rebar #2.5.1 erlang/rebar
tsung #1.4.2 erlang/tsung
erlang #17.4 lang/erlang
which erl:
/opt/local/bin/erl
ls -l erl:
lrwxr-xr-x 1 root admin .... erl -> ../lib/erlang/bin/erl
Try to activate port activate erlang #17.4 got
Error: port activate failed: Registry error: erlang #17.4 is not installed.
Try to update/upgrade - nothing. Remove erlang totaly. Install - got installed R15B03...
How to switch to newest version?

sudo: unknown user: postgres

I'm currently trying to run postgresql (9.3) on my iMac but I have some issues with user postgres and psql connection.
I bought an iMac old generation (with snow Leopard) that was migrated to Lion. As followed on other StackOverflow topics I added this line on my .bash_profile :
export PATH=/Library/PostgreSQL/9.3/bin:/usr/bin:$PATH
When launching pg :
sudo su postgres -c '/Library/PostgreSQL/9.3/bin/pg_ctl -D /Library/PostgreSQL/9.3/data/ -m fast start'
it returns :
su: unknown login: postgres
What should I do ?
The default postgres user in OSX 10.8 & 10.9 should be _postgres, you can use sudo -u _postgres to run the command
I got this same error (su: unknown login: postgres) when trying sudo su - postgres. I then managed to log in using sudo psql -U my.username postgres.
I could then create the appropriate users, etc.
Hope that helps.
Try to start from current user:
/Library/PostgreSQL/9.3/bin/pg_ctl -D /Library/PostgreSQL/9.3/data/ -l /usr/local/var/postgres/server.log start
Additional info: How to start PostgreSQL server on Mac OS X?

Repairing Postgresql after upgrading to OSX 10.7.3 Lion

I have the issue described in:
Repairing Postgresql after upgrading to OSX 10.7 Lion
but didn't get it solved.
The Postgres application generating the error is at /usr/bin/psql,
but the correct one is at
/Library/PostgreSQL/9.1/bin/psql.
When I add the later to my path in .bash_profile (or even in /etc/paths), uninstall and install the PG gem, then I still receive the error:
.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `initialize': could not connect to server: Permission denied (PG::Error) Is the server running locally and accepting
I tried it several times, also with the option:
-- --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config
Any idea?
EDIT:
After reading through more posts (like http://www.iainlbc.com/2011/10/osx-lion-postgres-could-not-connect-to-database-postgres-after-homebrew-installation),
I just did the following:
sudo ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket/
And it worked. I don't know at all why. Do I have two installations of Postgres? Where is the app laying behind the /usr/bin/psql file?
After running find / -name .s.PGSQL.5432 -ls, I noticed that the result was:
47366187 0 srwxrwxrwx 1 postgres wheel 0 Dec 3 15:15 /private/tmp/.s.PGSQL.5432
Note that the PGSQL socket file is /private/tmp/.s.PGSQL.5432
Using your suggestion above (but modifying it a bit), I did this:
sudo ln -s /private/tmp /var/pgsql_socket
Restarted terminal and it worked.

Resources