Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-08 Thread Matthias Kellermann

Polytropon wrote:

As it has been mentioned before, /etc/make.conf is read
first with your +=, setting CONFIGURE_ARGS to only this
one value. Then, Makefile of the port is read, and it
has a = in it, not a +=, so CONFIGURE_ARGS is overwritten
and your setting is gone.

Hint:

Maybe the Makefile.local mechanism of the ports is still
available. Then, you would add your += directive in a file
called Makefile.local in the port's directory. As far is I
know, Makefile.local is read after Makefile, so you can
profit from settings done in the first mentioned place.

Thanks for your hint. This worked fine.

Nevertheless it would be a good thing to keep this kind of port
modifications in a central place.

Regards,
Matthias

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Matthias Kellermann

Hi list,

I want to compile a port with an option that is not controllable through 
the FreeBSD Makefile or with make config.


The specific port is lang/php4 and the option I want to add is 
--with-mime-magic (I know, php4 is old and not supported after 8.8.08 
and --with-mime-magic is deprecated, but thats another story...).


So I added an option to make.conf(5):

.if ${.CURDIR:M*/lang/php4}
CONFIGURE_ARGS+=--with-mime-magic
.endif

Unfortonately, this does not work.

When I add this option in the Makefile it works. The relevant part looks 
like this:


CONFIGURE_ARGS= --enable-versioning \
--with-mime-magic \
--enable-memory-limit \
--with-layout=GNU \
--with-config-file-scan-dir=${PREFIX}/etc/php \
--disable-all \
--program-prefix=

Any ideas whats wrong here?

Regards,
Matthias
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Matthias Kellermann

RW wrote:

On Thu, 07 Aug 2008 10:04:23 +0200
Matthias Kellermann [EMAIL PROTECTED] wrote:


Hi list,

I want to compile a port with an option that is not controllable
through the FreeBSD Makefile or with make config.
...
So I added an option to make.conf(5):

.if ${.CURDIR:M*/lang/php4}
CONFIGURE_ARGS+=--with-mime-magic
.endif

Unfortonately, this does not work. 
...

Any ideas whats wrong here?


make.conf is read before the makefile. The use of CONFIGURE_ARGS= in
the port makefile means that any change to CONFIGURE_ARGS made in
make.conf is lost.

I think you'll have to maintain a patch against the port makefile.


Thanks, but I thought CONFIGURE_ARGS+= should add this option and not 
overwrite the options from the Makefile. Therefore the plus-sign.


Regards,
Matthias
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


kern.ipc.maxsockets and FIN_WAIT_2: No buffer space available

2008-04-23 Thread Matthias Kellermann

Hi list,

I've got some problems with full sockets on one FreeBSD 6.2 system 
acting as a loadbalancer for a webfarm.


Sometimes I get some errors like these from different daemons:

haproxy[46932]: Proxy my_proxy reached system memory limit at 83 
sockets. Please check system tunables.
stunnel: LOG3[45738:139512832]: remote socket: No buffer space available 
(55)


netstat -m looks fine:
491/874/1365 mbufs in use (current/cache/total)
450/618/1068/25600 mbuf clusters in use (current/cache/total/max)
450/490 mbuf+clusters out of packet secondary zone in use (current/cache)
0/0/0/0 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/0 9k jumbo clusters in use (current/cache/total/max)
0/0/0/0 16k jumbo clusters in use (current/cache/total/max)
1022K/1454K/2477K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
0/8/6656 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by sendfile
7696 calls to protocol drain routines

But this looks bad:
# sysctl kern.ipc.numopensockets
kern.ipc.numopensockets: 11301
# sysctl kern.ipc.maxsockets
kern.ipc.maxsockets: 12328

After raising kern.ipc.maxsockets up to 16384 the errors disappeared, 
for now.


Some further research gave me the following result:
# netstat -n | grep -c FIN_WAIT_2
11156

Hmm, strange. All the connections go to (Debian Linux)-HTTP-Nodes. But I 
don't know why the connections don't close. On the Debian Linux system 
there are lots of sockets in LAST_ACK state.


Any ideas what could cause these problems and how I could solve them? 
Can I set a timeout for the FIN_WAIT_2 state on the FreeBSD system, so 
the sockets won't fill up with unused connections waiting for termination?


I also looked at all tcp4 sockets in netstat -n output. The number of 
these sockets is higher than kern.ipc.numopensockets at the same time. I 
think the number should be lower than kern.ipc.numopensockets because 
all tcp4 sockets are only a part of all sockets, right?


Thanks,
Matthias
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


issues with serial console output

2008-02-17 Thread Matthias Kellermann
Hi list,

I'm trying to install a FreeBSD system on a remote server I can only
access via a serial console with 57600 baud.

There is a Linux rescue system that I use for copying a FreeBSD HDD
image via dd to the harddisk.

To access the FreeBSD installation via remote serial console I've done
the following things:

/boot/loader.conf:
console=vidconsole,comconsole
boot_multicons=YES
comconsole_speed=57600

/boot.config:
-S57600 -Dh

/etc/ttys:
# only changed the following line
ttyd0 /usr/libexec/getty std.57600 vt100 on secure

I can see the loader and can choose between the different choices to
boot. After choosing the default entry all I get is this:

/boot/kernel/acpi.ko text=0x44a7c data=0x24c0+0x1b8c
syms=[0x4+0x7d50+0x4+0xaae0]
lots of lines of question marks

I don't get a login prompt nor the kernel messages. The console does not
response on my keyboard. Any ideas whats wrong?

Matthias



signature.asc
Description: OpenPGP digital signature


Re: Outgoing FTP connections with pf and ftp-proxy

2008-01-29 Thread Matthias Kellermann
Jonathan Horne schrieb:
 
 what about adding port 20 to your tcp_services definition (or perhaps pf will 
 accept the word 'ftp-data') ?
 
 hth,

Thanks Jonathan.

After adding ftp-data to the tcp_services list I could connect to one
FTP server successfully, but another one did not work. I've tried both
passive and active mode without success.

Any help is really appreciated.

Thanks,
Matthias



signature.asc
Description: OpenPGP digital signature


Outgoing FTP connections with pf and ftp-proxy

2008-01-27 Thread Matthias Kellermann
Hi list,

I'm trying to get outgoing FTP sessions to work with pf and
ftp/ftp-proxy in a NAT environment.

My simple config on a test machine looks like this:
--
int_if = rl0
localnet = 192.168.0.0/24
tcp_services = { ssh, domain, www, https, ftp }
udp_services = { domain }

nat on $int_if from $localnet to any - ($int_if)

rdr pass proto tcp from any to any port ftp - 127.0.0.1 port 8021

block all

pass from $localnet to any keep state
pass proto udp to any port $udp_services keep state

pass out proto tcp to any port $tcp_services keep state

pass in proto tcp from any to any user proxy keep state
pass in proto tcp from any to any port ssh keep state
--

FTP login works fine. But if I want to do a ls on the FTP server I get
the following error on the client (no matter if NAT client or gateway):

425 Failed to establish connection.

Any idea whats wrong with my setup?

Thanks,
Matthias




signature.asc
Description: OpenPGP digital signature


FreeBSD 6.2, bge devices not coming up (hanging at link state changed to DOWN)

2008-01-08 Thread Matthias Kellermann

Hi list,

I'm using FreeBSD 6.2 on a IBM x236 dual Xeon server. This device has 
two network interfaces working with the bge driver.


pciconf -v -l output:

[EMAIL PROTECTED]:1:0:  class=0x02 card=0x026f1014 chip=0x16a714e4 rev=0x02 
hdr=0x00

vendor   = 'Broadcom Corporation'
device   = 'BCM5703X NetXtreme Gigabit Ethernet'
class= network
subclass = ethernet
[EMAIL PROTECTED]:2:0:  class=0x02 card=0x026f1014 chip=0x16a714e4 rev=0x02 
hdr=0x00

vendor   = 'Broadcom Corporation'
device   = 'BCM5703X NetXtreme Gigabit Ethernet'
class= network
subclass = ethernet

My problem is using both interfaces at the same time. If I will give 
them both an ip address in the rc.conf with:


ifconfig_bge0=192.168.0.210/24
ifconfig_bge0_alias0=10.0.2.1/32
ifconfig_bge0_alias1=10.0.2.2/32
ifconfig_bge0_alias2=10.0.2.10/32
ifconfig_bge1=192.168.1.10/24

the system won't come up properly. I can see the messages:

bge0: link state changed to DOWN
bge1: link state changed to DOWN

The system is hanging at this state forever. I have to do a hard reset.

If I don't assign bge1 an ip address the system is coming up.
If I boot in safe mode the system is coming up, too.

Plugging out all the cables or booting with ACPI disabled won't work.

If I change the rc.conf to:

ifconfig_bge0=192.168.0.210/24 media 100baseTX mediaopt full-duplex
[...]
ifconfig_bge1=192.168.1.10/24 media 100baseTX mediaopt full-duplex

interface bge0 will come up (and is ping-able) but system will hang at bge1:

bge0: link state changed to DOWN
bge0: link state changed to UP
bge1: link state changed to DOWN

Any ideas whats wrong here? How can I investigate further? Why does it 
work in safe mode?


Thanks,
Matthias


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 6.2: freebsd-update and SMP Kernel

2007-12-02 Thread Matthias Kellermann
Hi again,

I've found the error by myself.

I've rebooted the system with nextboot -k mynewkernel which was stored
under /boot/mynewkernel. After moving mynewkernel to /boot/kernel and
rebooting again freebsd-update works just fine. I could update
6.2-RELEASE-p9 without any problems. freebsd-update has also chosen the
right SMP kernel now and installed the new version.

Matthias
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD 6.2: freebsd-update and SMP Kernel

2007-12-02 Thread Matthias Kellermann
Hi list,

i've built a SMP Kernel on an amd64 system because the GENERIC kernel on
my amd64 FreeBSD 6.2 box did not include SMP support. After booting with
the new kernel freebsd-update won't work:

# freebsd-update fetch
Cannot identify running kernel

# uname -a
FreeBSD hostname 6.2-RELEASE-p8 FreeBSD 6.2-RELEASE-p8 #0: Sun Dec  2
17:48:26 CET 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  amd64

I've used the default SMP config in /usr/src/sys/amd64/conf/. How can I
fix this issues? Is there any prebuilt SMP kernel available that can I
install and keep up to date with freebsd-update?

Matthias
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]