SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / user-83602

jnbdz's questions

Martin Hope
jnbdz
Asked: 2020-01-27 07:34:49 +0800 CST

Unable to get communication between two rootfull containers with podman

  • 3

I have two nginx containers running.

One is listening on port 80 the other 8080.

Here is how I run them:

sudo podman run --rm \
 -t \
 -p 8080:80 \
 --publish-all \
 --name nginx-two \
 -v ./html2/:/usr/share/nginx/html \
 -v ./html2/conf/default.conf:/etc/nginx/conf.d/default.conf \
 -d nginx

The second:

sudo podman run --rm -t -p 80:80 --name nginx -v ./html/:/usr/share/nginx/html -v ./html/conf/conf.d:/etc/nginx/conf.d -d nginx

NGiNX config:

location / {
    proxy_pass http://10.88.0.37:8080;
}

I also tried:

location / {
    proxy_pass http://127.0.0.1:8080;
}

This config is used by the --name=nginx container.

Here is the error I get:

2020/01/26 15:33:05 [error] 8#8: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.88.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "localhost"
10.88.0.1 - - [26/Jan/2020:15:33:05 +0000] "GET / HTTP/1.1" 502 157 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" "-"

Is there way to make these containers communicate with each other?

I also tried using --pod. But then got this error:

Error: cannot set port bindings on an existing container network namespace
networking nginx docker podman
  • 1 Answers
  • 1202 Views
Martin Hope
jnbdz
Asked: 2019-11-02 11:44:03 +0800 CST

How can I access the network of a container?

  • 4

I am sure this was asked a million times but I just cannot find anything online for some reason.

I have two network I created with Podman (similar to Docker).

When I do localhost:9998 it just times out.

So it just can't connect.

Is there a way to create net bridge so that I can curl my container in a specific container network?

UPDATE

[
{
    "cniVersion": "0.4.0",
    "name": "search",
    "plugins": [
        {
            "bridge": "cni-podman0",
            "ipMasq": true,
            "ipam": {
                "ranges": [
                    [
                        {
                            "gateway": "10.89.0.1",
                            "subnet": "10.89.0.0/24"
                        }
                    ]
                ],
                "routes": [
                    {
                        "dst": "0.0.0.0/0"
                    }
                ],
                "type": "host-local"
            },
            "isGateway": true,
            "type": "bridge"
        },
        {
            "capabilities": {
                "portMappings": true
            },
            "type": "portmap"
        },
        {
            "backend": "iptables",
            "type": "firewall"
        }
    ]
}

]

docker
  • 2 Answers
  • 2435 Views
Martin Hope
jnbdz
Asked: 2019-10-27 13:10:47 +0800 CST

How can I change the OCI Runtime in Podman

  • 3

I know that in Docker if you want to change the runtime you go to: /etc/docker/daemon.json

And modify:

{
    "runtimes": {
        "runnc": {
            "path": "/usr/sbin/runnc"
        }
    }
}

But how do I do this with Podman (or just add runtime)?

OCIRuntime: package:

runc: /usr/sbin/runc

path: /usr/sbin/runc

podman
  • 2 Answers
  • 2656 Views
Martin Hope
jnbdz
Asked: 2017-08-11 10:50:09 +0800 CST

Docker throws two warnings related to cgroup rt period/runtime in Ubuntu

  • 5

When I run docker & I get:

INFO[0000] libcontainerd: new containerd process, pid: 3091 
INFO[0000] [graphdriver] using prior storage driver: aufs 
INFO[0000] Graph migration to content-addressability took 0.00 seconds 
WARN[0000] Your kernel does not support cgroup rt period 
WARN[0000] Your kernel does not support cgroup rt runtime 
INFO[0000] Loading containers: start.

I also get all these warnings:

WARN[0000] libcontainerd: client is out of sync, restore was called on a fully synced container (8564990571b56c26f32872031507e77f786b870b27ed3f0b80eebe127ce65164). 
WARN[0000] libcontainerd: failed to retrieve container 8564990571b56c26f32872031507e77f786b870b27ed3f0b80eebe127ce65164 state: rpc error: code = 2 desc = containerd: container not found 
WARN[0000] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/8564990571b56c26f32872031507e77f786b870b27ed3f0b80eebe127ce65164/shm: invalid argument 
WARN[0000] libcontainerd: client is out of sync, restore was called on a fully synced container (c997c7c33a57163106e3de4c470a5f0e5bd3d030c259e62a9d6ea8c292e3551f). 
WARN[0000] libcontainerd: failed to retrieve container c997c7c33a57163106e3de4c470a5f0e5bd3d030c259e62a9d6ea8c292e3551f state: rpc error: code = 2 desc = containerd: container not found 
WARN[0000] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/c997c7c33a57163106e3de4c470a5f0e5bd3d030c259e62a9d6ea8c292e3551f/shm: invalid argument 
WARN[0000] libcontainerd: client is out of sync, restore was called on a fully synced container (28c274e176c9c112f8bc73f6916860665c63f1407ca2670944deee7b6ae2e747). 
WARN[0000] libcontainerd: failed to retrieve container 28c274e176c9c112f8bc73f6916860665c63f1407ca2670944deee7b6ae2e747 state: rpc error: code = 2 desc = containerd: container not found 
WARN[0000] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/28c274e176c9c112f8bc73f6916860665c63f1407ca2670944deee7b6ae2e747/shm: invalid argument 
WARN[0000] libcontainerd: client is out of sync, restore was called on a fully synced container (cca4cbbfb9970b29a26f6cc06622311c0ac789a729810529f35160f742e96c50). 
WARN[0000] libcontainerd: failed to retrieve container cca4cbbfb9970b29a26f6cc06622311c0ac789a729810529f35160f742e96c50 state: rpc error: code = 2 desc = containerd: container not found 
WARN[0000] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/cca4cbbfb9970b29a26f6cc06622311c0ac789a729810529f35160f742e96c50/shm: invalid argument 
WARN[0000] libcontainerd: client is out of sync, restore was called on a fully synced container (fa2937c2ca6cef38dea9de80b68c9a68497739c391393132870e9c6c295ee72b). 
WARN[0000] libcontainerd: failed to retrieve container fa2937c2ca6cef38dea9de80b68c9a68497739c391393132870e9c6c295ee72b state: rpc error: code = 2 desc = containerd: container not found 
WARN[0000] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/fa2937c2ca6cef38dea9de80b68c9a68497739c391393132870e9c6c295ee72b/shm: invalid argument 
WARN[0000] libcontainerd: client is out of sync, restore was called on a fully synced container (b8335587ad37a36a35fc2f1eb57b3b3d91f61af75262eb075b9045664885ee30). 
WARN[0000] libcontainerd: failed to retrieve container b8335587ad37a36a35fc2f1eb57b3b3d91f61af75262eb075b9045664885ee30 state: rpc error: code = 2 desc = containerd: container not found 
WARN[0000] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/b8335587ad37a36a35fc2f1eb57b3b3d91f61af75262eb075b9045664885ee30/shm: invalid argument 
WARN[0001] libcontainerd: client is out of sync, restore was called on a fully synced container (40d2418b6741c35dd249d5e4c7aefd248fa6f0efa25d7578f81fff06aea93d3b). 
WARN[0001] libcontainerd: failed to retrieve container 40d2418b6741c35dd249d5e4c7aefd248fa6f0efa25d7578f81fff06aea93d3b state: rpc error: code = 2 desc = containerd: container not found 
WARN[0001] failed to cleanup ipc mounts:
failed to umount /var/lib/docker/containers/40d2418b6741c35dd249d5e4c7aefd248fa6f0efa25d7578f81fff06aea93d3b/shm: invalid argument

lsb_release -a

LSB Version:    core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty

How can I correct this?

ubuntu
  • 2 Answers
  • 2464 Views
Martin Hope
jnbdz
Asked: 2017-08-11 07:30:13 +0800 CST

apt-get install linux-image-extra getting "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays."

  • 11

When installing:

sudo apt-get install \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual

I am getting:

W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

I found that someone else has had a similar issue: apt-get update mdadm scary warnings

So I followed the instructions:

/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf

Then:

update-initramfs -u

But the output is:

update-initramfs: Generating /boot/initrd.img-4.10.0-30-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

lsb_release -a

LSB Version:    core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty

vim /etc/mdadm/mdadm.conf

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This configuration was auto-generated on Thu, 10 Aug 2017 15:23:15 +0000 by mkconf

/etc/fstab

LABEL=cloudimg-rootfs   /        ext4   defaults        0 0
/var/swap.1 swap swap defaults 0 0

I think this started happening after I added:

/var/swap.1 swap swap defaults 0 0

Is there something else I need to do?

I am running a VM with the help of Vagrant.

UPDATE 1

I found another similar question to mine": https://askubuntu.com/questions/834903/i-dont-have-a-raid-but-get-the-warning-mdadm-conf-defines-no-arrays

I added:

ARRAY <ignore> devices=/dev/sda1

I added 1 at the end because I don't have /dev/sda stand alone.

Filesystem      Size  Used Avail Use% Mounted on
udev            473M     0  473M   0% /dev
tmpfs            97M  3.1M   94M   4% /run
/dev/sda1        19G  4.8G   15G  26% /
tmpfs           483M     0  483M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           483M     0  483M   0% /sys/fs/cgroup
vagrant_        384G   48G  337G  13% /vagrant
vagrant_www_    384G   48G  337G  13% /vagrant/www
tmpfs            97M     0   97M   0% /run/user/1000

I am doing this right? What does this do?

The warnings to have gone away.

ubuntu
  • 4 Answers
  • 25168 Views
Martin Hope
jnbdz
Asked: 2017-08-10 12:44:03 +0800 CST

I loose the swap every time I restart my Ubuntu server

  • 1

Here is how I set the swap:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1MB count="1000"
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1

Every time I reboot/restart the swap is gone.

The command free gives me zeros for swap. But the file /var/swap.1 is still there.

swap.1 file details:

-rw-r--r-- 1 root root 989000000 Aug 9 20:55 swap.1

The number 989000000 seems a bit big...

How can I make it persistent?

lsb_release -a

LSB Version:    core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty
ubuntu
  • 1 Answers
  • 600 Views
Martin Hope
jnbdz
Asked: 2017-02-25 12:56:01 +0800 CST

When updating on Ubuntu I get: Invalid 'Date' entry in Release

  • 1

When I do:

apt-get update -qq -y

I am getting this error:

W: Invalid 'Date' entry in Release file /var/lib/apt/lists/osquery-packages.s3.amazonaws.com_xenial_dists_xenial_Release

OS details:

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 16.04.2 LTS

Release: 16.04

Codename: xenial

The instructions that I followed for osquery:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B
add-apt-repository "deb [arch=amd64] https://osquery-packages.s3.amazonaws.com/xenial xenial main"

apt-get update -qq -y

apt-get install --no-install-recommends --no-install-suggests --force-yes -y -q \
osquery

UPDATE:

Did some tests. It's not related to this:

export TIMEZONE=UTC

cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
echo "${TIMEZONE}" | tee /etc/timezone
dpkg-reconfigure --frontend noninteractive tzdata

UPDATE 2

Inside of /var/lib/apt/lists/osquery-packages.s3.amazonaws.com_xenial_dists_xenial_Release:

Origin: osquery-builder
Label: osquery-builder
Suite: xenial
Codename: xenial
Date: Fri, 10 Feb 2017 15:02:17 -0800
Components: main
Architectures: amd64
ubuntu apt ubuntu-16.04
  • 1 Answers
  • 1860 Views
Martin Hope
jnbdz
Asked: 2016-01-14 17:22:42 +0800 CST

BIND9 private DNS server with OpenVPN config file errors

  • 1

I am setting up a private DNS server that will only be accessible by my OpenVPN users. OpenVPN is setup on the tun0 interface of my Ubuntu 14 server.

The issue is that I am getting some errors. I am unsure how to resolve them. Also I am unsure if if configured my BIND9 server correctly.

Here is what I get when I test my configs:

named-checkconf:

Nothing...

named-checkzone one.example.com db.one.example.com:

db.one.example.com:17: ignoring out-of-zone data (jeannicolas.com.air.jn) zone one.example.com/IN: loaded serial 3 OK

named-checkzone 8.10.in-addr.arpa /etc/bind/zones/db.10.8:

dns_rdata_fromtext: /etc/bind/zones/db.10.8:6: near eol: unexpected end of input zone 8.10.in-addr.arpa/IN: loading from master file /etc/bind/zones/db.10.8 failed: unexpected end of input zone 8.10.in-addr.arpa/IN: not loaded due to errors.

ifconfig details for OpenVPN:

tun0
Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:3646 errors:0 dropped:0 overruns:0 frame:0 TX packets:3957 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:476530 (476.5 KB) TX bytes:2238555 (2.2 MB)

named.conf.local

zone "one.example.com" {
        type master;
        file "/etc/bind/zones/db.one.example.com"; # zone file path
#       allow-transfer { 10.128.20.12; };         # ns2 private IP address - secondary
};

zone "8.10.in-addr.arpa" {
        type master;
        file "/etc/bind/zones/db.10.8";  # 10.8.0/24 subnet
#       allow-transfer { 10.128.20.12; };  # ns2 private IP address - secondary
};

zone "jn." {
        type master;
        file "/etc/bind/db.jn";
};

named.conf.options

acl "trusted" {
#       127.0.0.1;
        10.8.0/24;
#       10.8.1.0/24;
};

options {
        directory "/var/cache/bind";

        recursion yes;                 # enables resursive queries
        allow-recursion { trusted; };  # allows recursive queries from "trusted" clients
#       listen-on { 127.0.0.1; };   # ns1 private IP address - listen on private network only
        listen-on { 10.8.0/24 };
        allow-transfer { none; };      # disable zone transfers by default

        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
};

db.10.8

$TTL    604800
@       IN      SOA     one.example.com.        admin.one.example.com. (
                                3       ; Serial
                           604800       ; Refresh
                          2419200       ; Retry
                           604800 )     ; Negative Cache TTL
; name servers
        IN      NS      ns1.one.example.com.

; PTR Records
3.0     IN      PTR     ns1.one.example.com.    ; 10.8.0.3

db.one.example.com

$TTL    604800
@       IN      SOA     ns1.one.example.com. admin.one.example.com. (
                                3       ; Serial
                           604800       ; Refresh
                            86400       ; Retry
                          2419200       ; Expire
                           604800       ; Negative Cache TTL
)
;
; name servers - NS records
        IN      NS      ns1.one.example.com.

; name servers - A records
ns1.one.example.com.            IN      A       10.8.0.3

; 10.8.0.0/16 - A records
jeannicolas.com.air.jn.         IN      A       10.8.0.100

db.jn

;
; BIND data file for TLD ".jn"
;
$TTL    604800
@       IN      SOA     jn.     root.jn. (
                          3             ; Serial
                     604800             ; Refresh
                      86400             ; Retry
                    2419200             ; Expire
                     604800 )           ; Negative Cache TTL
;
@       IN      NS      ns1.jn.
@       IN      A       10.8.0.100
openvpn
  • 1 Answers
  • 1420 Views
Martin Hope
jnbdz
Asked: 2015-10-06 07:01:02 +0800 CST

Percona DB not starting: initscript mysql, action "start" failed

  • 2

After I installed Percona server I got this message:

 * Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
 * Run the following commands to create these functions:

    mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
    mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
    mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"

 * See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details

Job for mysql.service failed. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package percona-server-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of percona-server-server:
 percona-server-server depends on percona-server-server-5.6; however:
  Package percona-server-server-5.6 is not configured yet.

dpkg: error processing package percona-server-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Errors were encountered while processing:
 percona-server-server-5.6
 percona-server-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@public-server-01:~/src# systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql (Percona Server) daemon
   Loaded: loaded (/etc/init.d/mysql)
   Active: failed (Result: exit-code) since Wed 2015-09-30 04:26:52 UTC; 38min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 20916 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

Sep 30 04:26:41 public-server-01 systemd[1]: Starting LSB: Start and stop the mysql (Percona Server) daemon...
Sep 30 04:26:41 public-server-01 mysql[20916]: * Starting MySQL (Percona Server) database server mysqld
Sep 30 04:26:52 public-server-01 systemd[1]: mysql.service: control process exited, code=exited status=1
Sep 30 04:26:52 public-server-01 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona Server) daemon.
Sep 30 04:26:52 public-server-01 systemd[1]: Unit mysql.service entered failed state.
Sep 30 04:26:52 public-server-01 mysql[20916]: ...fail!
Sep 30 04:26:52 public-server-01 systemd[1]: mysql.service failed.

I don't understand why it is not starting.

I am running Ubuntu 15. 1GB of RAM...

ubuntu
  • 2 Answers
  • 2836 Views
Martin Hope
jnbdz
Asked: 2015-07-16 05:55:28 +0800 CST

Cannot recompile PHP on Mac OS X and enable PHP calendar

  • 1

I compiled PHP 5.6.11. PHP-FPM to be more precise. It works find but I need to enable calendar. So I tried to to do:

./configure --enable-fpm --with-pdo-mysql --with-mcrypt --with-zlib --with-openssl --with-curl --disable-posix-threads --enable-bcmath --enable-mbstring --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-curlwrappers --enable-sockets --with-gd --with-jpeg-dir --with-png-dir --enable-gd-native-ttf --enable-exif --enable-ftp --enable-shmop --with-vpx-dir --with-mysqli --with-mysql --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-t1lib --with-pear --enable-cgi --enable-xml --enable-libxml --enable-simplexml --with-iconv --enable-calendar --enable-dom

And then I did make and make install.

Make seems to be doing something but when I do make install I get this:

Installing shared extensions:
/usr/local/lib/php/extensions/no-debug-non-zts-20131226/ Installing PHP CLI binary: /usr/local/bin/ Installing PHP CLI man page:
/usr/local/php/man/man1/ Installing PHP FPM binary:
/usr/local/sbin/ Installing PHP FPM config: /usr/local/etc/ Installing PHP FPM man page: /usr/local/php/man/man8/ Installing PHP FPM status page: /usr/local/php/php/fpm/ Installing PHP CGI binary: /usr/local/bin/ Installing PHP CGI man page:
/usr/local/php/man/man1/ Installing build environment:
/usr/local/lib/php/build/ Installing header files:
/usr/local/include/php/ Installing helper programs:
/usr/local/bin/ program: phpize program: php-config Installing man pages: /usr/local/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar - already installed: 1.3.12 [PEAR] Console_Getopt - already installed: 1.3.1 [PEAR] Structures_Graph- already installed: 1.0.4 [PEAR] XML_Util - already installed: 1.2.3 [PEAR] PEAR - already installed: 1.9.5 Warning! a PEAR user config file already exists from a previous PEAR installation at '/Users/jeannicolas/.pearrc'. You may probably want to remove it. Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path /Users/jeannicolas/src/php-5.6.11/build/shtool install -c ext/phar/phar.phar /usr/local/bin ln -s -f phar.phar /usr/local/bin/phar Installing PDO headers:
/usr/local/include/php/ext/pdo/

I tried to do make clean and make install clean. But still, after I compiled and check my PHP info I still could not see calendar enabled.

Is there another step that I skipped that I need to do to recompile my PHP-FPM on my Mac OS X?

My Mac OS X is Yosemite Version 10.10.3. I am using NGiNX as the server.

mac-osx
  • 0 Answers
  • 646 Views
Martin Hope
jnbdz
Asked: 2015-06-05 13:40:07 +0800 CST

opcache causing errors: Allowed memory size, and malloc: *** error for object 0x10b4cbaf8: pointer being freed was not allocated

  • 1

Since I installed opcache I am getting these errors:

[Thu Jun 04 17:31:02 2015] [error] [client 127.0.0.1] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4485046248 bytes) in Unknown on line 0
[Thu Jun 04 17:31:13 2015] [error] [client 127.0.0.1] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4484571720 bytes) in Unknown on line 0
httpd(33061,0x7fff790d0300) malloc: *** error for object 0x10b4cbaf8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[Thu Jun 04 17:31:31 2015] [notice] child pid 33061 exit signal Abort trap (6)
httpd(33063,0x7fff790d0300) malloc: *** error for object 0x10b4cbaf8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[Thu Jun 04 17:31:32 2015] [notice] child pid 33063 exit signal Abort trap (6)
httpd(33064,0x7fff790d0300) malloc: *** error for object 0x10b4cbaf8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[Thu Jun 04 17:31:33 2015] [notice] child pid 33064 exit signal Abort trap (6)
[Thu Jun 04 17:31:34 2015] [error] [client 127.0.0.1] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4485049952 bytes) in Unknown on line 0

I am using Zend Server with Apache.

PHP Version 5.4.21

Here are my conf:

[opcache]
zend_extension="/usr/local/zend/lib/php_extensions/opcache.so"
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

When I try to reload my phpinfo.php page it is blank.

What is causing this problem and what did I forget or need to do?

php
  • 0 Answers
  • 560 Views
Martin Hope
jnbdz
Asked: 2014-12-30 19:37:43 +0800 CST

Cannot install Varnish on CentOS 7

  • 4

I am trying to install Varnish 4 on CentOS 7.

I first added these rpm:

sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/jemalloc-3.6.0-1.el6.x86_64.rpm
sudo rpm -iUvh http://195.220.108.108/linux/centos/7.0.1406/extras/x86_64/Packages/epel-release-7-2.noarch.rpm

yum install varnish

But I get this:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.team-cymru.org
 * epel: mirror.steadfast.net
 * extras: mirror.team-cymru.org
 * updates: mirror.team-cymru.org
Resolving Dependencies
--> Running transaction check
---> Package varnish.x86_64 0:4.0.2-1.el6 will be installed
--> Processing Dependency: varnish-libs = 4.0.2-1.el6 for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.3)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.2)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.0)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1(LIBVARNISHAPI_1.1)(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishapi.so.1()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libpcre.so.0()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvcc.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnishcompat.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvarnish.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Processing Dependency: libvgz.so()(64bit) for package: varnish-4.0.2-1.el6.x86_64
--> Running transaction check
---> Package varnish.x86_64 0:4.0.2-1.el6 will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: varnish-4.0.2-1.el6.x86_64
---> Package varnish-libs.x86_64 0:4.0.2-1.el6 will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: varnish-libs-4.0.2-1.el6.x86_64
--> Finished Dependency Resolution
Error: Package: varnish-libs-4.0.2-1.el6.x86_64 (varnish-4.0)
           Requires: libpcre.so.0()(64bit)
           Available: varnish-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-4.0.0-1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-libs-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-libs-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-libs-4.0.0-1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-4.0.1-1.el6.x86_64 (varnish-4.0)
               Not found
           Available: varnish-4.0.1-2.el7.x86_64 (epel)
               Not found
           Installing: varnish-4.0.2-1.el6.x86_64 (varnish-4.0)
               Not found
           Available: varnish-libs-4.0.1-1.el6.x86_64 (varnish-4.0)
               Not found
           Available: varnish-libs-4.0.1-2.el7.x86_64 (epel)
               Not found
           Installing: varnish-libs-4.0.2-1.el6.x86_64 (varnish-4.0)
               Not found
Error: Package: varnish-4.0.2-1.el6.x86_64 (varnish-4.0)
           Requires: libpcre.so.0()(64bit)
           Available: varnish-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-4.0.0-1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-libs-4.0.0-0.20131129tp1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-libs-4.0.0-0.20140328beta1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-libs-4.0.0-1.el6.x86_64 (varnish-4.0)
               libpcre.so.0()(64bit)
           Available: varnish-4.0.1-1.el6.x86_64 (varnish-4.0)
               Not found
           Available: varnish-4.0.1-2.el7.x86_64 (epel)
               Not found
           Installing: varnish-4.0.2-1.el6.x86_64 (varnish-4.0)
               Not found
           Available: varnish-libs-4.0.1-1.el6.x86_64 (varnish-4.0)
               Not found
           Available: varnish-libs-4.0.1-2.el7.x86_64 (epel)
               Not found
           Installing: varnish-libs-4.0.2-1.el6.x86_64 (varnish-4.0)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
centos
  • 1 Answers
  • 7065 Views
Martin Hope
jnbdz
Asked: 2014-12-05 11:47:52 +0800 CST

What are the commands to get top MISSES and HITS from Varnish 4?

  • 9

For work I am using Varnish 3 on CentOS, but at home I am using Varnish 4 on Ubuntu 14.04.

At work I use these commands:

Top hits: varnishtop -i rxurl
Top Misses: varnishtop -i txurl

But for some reason they do not work on Varnish 4 Ubuntu.

What are the equivalent of these commands for Varnish 4?

varnish
  • 1 Answers
  • 6423 Views
Martin Hope
jnbdz
Asked: 2013-09-03 17:49:04 +0800 CST

I can't open a static file with NGiNX root function

  • 1

I am trying to open a static file with root function. Here is my NGiNX config:

location = /test {
            root    /var/53c74dc1c284ff0d63b019fd736f2c7965939e0452104120130821064016.png;
    }

I get this error in my browser:

404 Not Found

Also it does not seem to produce any errors in the NGiNX error logs.

I am using Ubuntu 12.

And I am using NGiNX version 1.2.7.

nginx
  • 2 Answers
  • 549 Views
Martin Hope
jnbdz
Asked: 2011-11-19 19:19:16 +0800 CST

How can I protect files on my NGiNX server?

  • 2

I am trying to protect files on my server (multiple types), with NGiNX and PHP.

Basically I want people to have to sign in to the website if they want to access those static files like images. DropBox does it very well. Where by they force you to sign in to access any static files you put on there server.

I though about using NGiNX Perl Module. And I would write a perl script that would check the session to see if the user was sign in to give them access to a static file.

I would prefer using PHP because all my code is running under PHP and I am not sure how to check a session created by PHP with PERL.

So basically my question is: How can I protect static files of any types that would need the user to have sign in and have a valid session created with a PHP script?

security nginx php5
  • 1 Answers
  • 15914 Views
Martin Hope
jnbdz
Asked: 2011-07-16 12:41:36 +0800 CST

On my hosting plan I cannot have access the Internal Server errors

  • 1

I am using a share hosting with IWeb. And they hide all the Internal Server errors. But I need them to know what is causing my Apache Script to crash.

Is there any way to catch a HTTP 500 Internal Server error... So I can know what is causing it?

Thanks in advance.

UPDATE:

Here is .htaccess:

 AuthUserFile .htpasswd
 AuthType basic
 AuthName "Secret Files"
 Require valid-user

When I load the page I get the popup for the username and password... Then when I type in everything... and click OK I get Internal Server Error... To me it does not make sense. Why is it sending the error only after the user tried to login.

apache-2.2 shared-hosting
  • 1 Answers
  • 49 Views
Martin Hope
jnbdz
Asked: 2011-06-14 17:41:16 +0800 CST

Can't upgrade my Ubuntu server, it gets stuck on openjdk-6-jre-headless

  • 1

I am using Ubuntu Server.

When I do:

apt-get upgrade

it gets stuck on:

Setting up openjdk-6-jre-headless (6b20-1.9.7-0ubuntu1) ...

Why? And what can I do to stop it?

I tried removing it with apt-get... I get this error:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

So then I tried this:

dpkg --purge openjdk-6-jre-headless

I got this:

dpkg: dependency problems prevent removal of openjdk-6-jre-headless:
 openjdk-6-jre-lib depends on openjdk-6-jre-headless (>= 6b17).
 ca-certificates-java depends on openjdk-6-jre-headless (>= 6b16-1.6.1-2) | java6-runtime-headless; however:
  Package openjdk-6-jre-headless is to be removed.
  Package java6-runtime-headless is not installed.
  Package openjdk-6-jre-headless which provides java6-runtime-headless is to be removed.
 ca-certificates-java depends on openjdk-6-jre-headless (>= 6b16-1.6.1-2) | java6-runtime-headless; however:
  Package openjdk-6-jre-headless is to be removed.
  Package java6-runtime-headless is not installed.
  Package openjdk-6-jre-headless which provides java6-runtime-headless is to be removed.
dpkg: error processing openjdk-6-jre-headless (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 openjdk-6-jre-headless

The thing is I think my DB is using it... Not sure... I am using Cassandra with Thrift...

Yes, it's getting a bit more complex...

# dpkg --configure -a

I get:

dpkg: dependency problems prevent configuration of openjdk-6-jre:
 openjdk-6-jre depends on openjdk-6-jre-headless (>= 6b20-1.9.7-0ubuntu1); however:
  Package openjdk-6-jre-headless is not configured yet.
dpkg: error processing openjdk-6-jre (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
dpkg: dependency problems prevent configuration of libaccess-bridge-java:
 libaccess-bridge-java depends on default-jre | openjdk-6-jre | sun-java6-jre; however:
  Package default-jre is not installed.
  Package openjdk-6-jre is not configured yet.
  Package sun-java6-jre is not installed.
dpkg: error processing libaccess-bridge-java (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of icedtea-6-jre-cacao:
 icedtea-6-jre-cacao depends on openjdk-6-jre-headless (= 6b20-1.9.7-0ubuntu1); however:
  Package openjdk-6-jre-headless is not configured yet.
dpkg: error processing icedtea-6-jre-cacao (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libaccess-bridge-java-jni:
 libaccess-bridge-java-jni depends on libaccess-bridge-java (>= 1.26.2-5); however:
  Package libaccess-bridge-java is not configured yet.
dpkg: error processing libaccess-bridge-java-jni (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openjdk-6-jre
 libaccess-bridge-java
 icedtea-6-jre-cacao
 libaccess-bridge-java-jni

Thanks again for any help.

java ubuntu cassandra
  • 3 Answers
  • 2831 Views
Martin Hope
jnbdz
Asked: 2011-06-11 21:18:26 +0800 CST

How can I make sure PHP is using TBinaryProtocolAccelerated

  • 1

How can I make sure PHP is using TBinaryProtocolAccelerated and not TBinaryProtocol as the protocol?

I am using PHP5 in Ubuntu Server.

php5
  • 0 Answers
  • 220 Views
Martin Hope
jnbdz
Asked: 2011-06-11 11:26:06 +0800 CST

Cannot connect to my Cassandra

  • 5

My Cassandra used to work with no problems.

I was able to connect with no problems but now for some reason it doesn't work anymore.

[default@unknown] connect localhost/9160;
Exception connecting to localhost/9160. Reason: Connection refused.

and

root# ./bin/cassandra-cli -host localhost -port 9160
Exception connecting to localhost/9160. Reason: Connection refused.

I am on Linux Ubuntu Server.

Thanks in advance...

ubuntu cassandra connection-refused
  • 2 Answers
  • 14038 Views
Martin Hope
jnbdz
Asked: 2011-06-08 22:04:58 +0800 CST

Trying to install pecl Solr extension but it needs curl

  • 5

When I try to install solr-beta:

pecl install solr-beta

I get this error:

pecl/solr requires PHP extension "curl" No valid packages found install failed

The thing is curl is already installed and it seems to be enable when I look at my phpinfo page.

php curl solr
  • 1 Answers
  • 5151 Views

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Can you pass user/pass for HTTP Basic Authentication in URL parameters?

    • 5 Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    Check if port is open or closed on a Linux server?

    • 7 Answers
  • Marko Smith

    How to automate SSH login with password?

    • 10 Answers
  • Marko Smith

    How do I tell Git for Windows where to find my private RSA key?

    • 30 Answers
  • Marko Smith

    What's the default superuser username/password for postgres after a new install?

    • 5 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Smudge Our security auditor is an idiot. How do I give him the information he wants? 2011-07-23 14:44:34 +0800 CST
  • Martin Hope
    kernel Can scp copy directories recursively? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh returns "Bad owner or permissions on ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil How to automate SSH login with password? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin How do I deal with a compromised server? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve