rl(4): autoselect/manual media == no carrier at boot time?

2003-03-25 Thread Olivier Dony
Hello, that's me again :)

rl0: RealTek 8139 10/100BaseTX port 0xec00-0xecff mem 0xdf00-0xdfff irq 10 
at device 5.0 on pci0
rl0: Realtek 8139B detected. Warning, this may be unstable in autoselect mode
 ^^   ^^
This is my detected NIC. It has always been detecting 100baseTX half-duplex,
when I am actually plugged into a cool 100Mbps switch. So after a couple of
tests, I decided that full-duplex was going fine and appended media 100baseTX
mediaopt full-duplex to the ifconfig_rl0 line in my rc.conf, just in case.
The card was actually working fine in this mode. Also given that rl(4) isn't
so happy with autoselect mode if the proper PHY chip is not present (or
something), I thought this would be a good thing.

Now it happened that the server rebooted after a kernel panic (this is 5.0, I
will be taking *this* subject to -current), but the problem here is that rl(4)
detected no carrier :
kernel: rl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
kernel: inet 666.666.222.35 netmask 0xff00 broadcast 666.666.222.255
kernel: ether 00:50:fc:97:41:b4 
kernel: media: Ethernet 100baseTX full-duplex
kernel: status: no carrier 

My ISP says that they have not touched the UTP cable. After they rebooted the
server again while trying to find why it was down, the same no carrier
appears in the dmesg, so after a normal boot too. They claim that after this
second reboot they unplugged and then plugged back the UTP connection and the
NIC's led came to life and the network was up again (and still is, 
full-duplex).

My question is, is it possible that setting the media to 100baseTX
full-duplex could cause problems for carrier detection at boot time? Or is
my ISP lying and they unplugged the network just right during the kernel panic
and only plugged it back after a while? This doesn't sound likely...
I do not feel like rebooting again right now just to see if using autoselect
works, I'd rather not have to call them today to fix it once more ;-)

Thanks in advance

Olivier, always learning more thanks to you!

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


[Urgent] sendmail not echoing back during smtp connection

2003-03-24 Thread Olivier Dony
Help! I have a production server where sendmail suddenly stopped
answering smtp connections!
I have tried killing it and restarting it, but this doesn't change
anything.
The config didnt change, it just started to do this progressively,
from what I can see in the logs with increasing numbers of
[xxx.xxx.xxx.xxx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

If I connect to port 25 the connection is established but nothing is echo'd,
like no sendmail greeting, no reply whatsoever to smtp commands.
So all MTAs are timing out connecting to my server! But the delivery still works
fine, ie if I telnet to port 25 and give a valid mail from, rcpt to, data, etc,
without waiting for SMTP answers, the mail is delivered fine in my inbox...

How is this possible? I have tried everything, even when it doesn't make
sense, like allowing all from all in IPFW, restarting sendmail many times,
switching configs... short of rebooting the box of course, which probably
wouldn't help anyway.

LogLevel to 30 just yields a lot of intertwined :
---
Mar 24 18:51:54 charon sm-mta[39105]: h2OHkian039105: Milter: no active filter
Mar 24 18:51:54 charon sm-mta[39105]: h2OHkian039105: --- 220 charon.dom.tld ESMTP 
Sendmail 8.12.6/8.12.6; Mon, 24 Mar 2003 18:51:54
+0100 (CET)
Mar 24 18:51:54 charon sm-mta[39105]: h2OHkian039105: --- 421 4.4.1 charon.dom.tld 
Lost input channel from tomts4.bellnexxia.net
[209.226.175.10]
Mar 24 18:51:54 charon sm-mta[39105]: h2OHkian039105: lost input channel from 
tomts4.bellnexxia.net [209.226.175.10] to MTA after
startup
Mar 24 18:51:54 charon sm-mta[39105]: h2OHkian039105: tomts4.bellnexxia.net 
[209.226.175.10] did not issue MAIL/EXPN/VRFY/ETRN
during connection to MTA
---

But this --- 220 charon.dom.tld ESMTP Sendmail 8... never actually reaches the
client. (*but* from time to time there are successful connections in between!)

Any ideas? I think I must be cursed or something...

Olivier

PS: please make sure you CC to me as my address subcribed to the list
isnt getting the mails anymore


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


(SOLVED) Re: [Urgent] sendmail not echoing back during smtp connection

2003-03-24 Thread Olivier Dony
On Mon, Mar 24, 2003 at 06:58:21PM +0100, Olivier Dony wrote:
 Help! I have a production server where sendmail suddenly stopped
 answering smtp connections!
 I have tried killing it and restarting it, but this doesn't change
 anything.
 The config didnt change, it just started to do this progressively,
 from what I can see in the logs with increasing numbers of
 [xxx.xxx.xxx.xxx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
 
 If I connect to port 25 the connection is established but nothing is echo'd,
 like no sendmail greeting, no reply whatsoever to smtp commands.
 So all MTAs are timing out connecting to my server! But the delivery still works
 fine, ie if I telnet to port 25 and give a valid mail from, rcpt to, data, etc,
 without waiting for SMTP answers, the mail is delivered fine in my inbox...

Here is the explanation if someone ever gets the same problem:

DNSBL's are somehow blocking every connection, so the solution is to remove
every DNSBL from sendmail's config and restart it and the problem goes away.
(A lot of thanks to the sendmail-questions mailing-list :-)
I was using 4 of them : relays.ordb.org, list.dsbl.org, dun.dnsrbl.net
and spam.dnsrbl.net. I will try and see which one(s) is(are) causing the 
problem when the mail traffic calms down a bit.

This is probably due to the way DNSBL is implemented that nothing is logged 
regarding this problem and the client is just left there to timeout, and the 
timeout is really logged. This is what mislead me, but the progressive 
increase of the did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA 
messages in the log should be a red flag for anybody using DNSBLs.

Hope this can help someone.

Thanks for reading ;)

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: pkgdb clone disks (second chance)

2003-03-20 Thread Olivier Dony
On Tue, Mar 18, 2003 at 12:18:16PM +0100, Erwane Breton wrote:
 No response first time. I try again.
 
 hi all
 
 First, i've installed perl5.6.1 with the system, and later i upgrade (install 
 ?) to perl5.8.0. I ran the script use.perl port, and i deinstall perl5.6.1. 
 And now always i want to upgrade a ports who need perl, i must run 'pkgdb -F' 
 for fix the dependency with ... perl 5.6.1. when i install a ports with 
 'portinstall', i always see cleaning perl5.6.1. How i can tell to 
 portinstall or make to use perl5.8.0 and remove perl5.6.1 ?

That's what you did with 'use.perl port', and you can check that it appended a
couple of lines about the perl version to use to /etc/make.conf. From now on
make will use the port version when installing perl stuff, and perl scripts
will too.
Although ports that had been installed before might need to be rebuilt indeed,
or have at least their dependencies fixed.

 #
 The second is a project

For best results you should keep different questions on different e-mails with
relevant subjects.

 I have a server running FreeBSD5.0 and client running win98
 and i want to dump disk of client to create snapshot of the system for restore 
 it later when it crashes :o). Like ghost in fact but on FreeBSD.
 
 thanks for idea too :)

You can have a look at rsync from the ports, it's easy to use for snapshot
backups. A good tutorial on using it for this very purpose is located at :
http://www.mikerubel.org/computers/rsync_snapshots/
IIRC, it even explains how this can be used in conjunction with samba to
backup windows stuff.

Hope this helps.

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Apache mod_ssl how to?

2003-03-20 Thread Olivier Dony
On Thu, Mar 20, 2003 at 12:44:01PM +0100, Andreas Widere Andersen wrote:
 
 
 Hi,
 I recently installed the apache-13-modssl port on my FreeBSD 4.8 RC system. 
 I'm trying to set up a https virtual host without luck.
 
 I get this from my httpd-error.log:
 
 Ops, no RSA or DSA server certificate found?!
 
 I understand there's a missing certificate, but I can't seem to find a 
 website or info about how to create one and do this with a full description 
 of the process.
 
 Can someone in here please direct my to a place where I can find this info?

A search on google will give hundreds of results about the subject. You can
try: 
http://slacksite.com/apache/certificate.html

And there's also https://ca.freeicp.org/webra/entry-level if you want someone
to do the work for you ;)

Hope this helps.

Olivier

PS: Please don't use reply on an existing thread to post a new question, as
this will mess up the threads and diminish the visibility of your question
too.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Resource temporarily unavailable

2003-03-18 Thread Olivier Dony
On Tue, Mar 18, 2003 at 09:03:32AM +0100, Jan Blomqvist wrote:
 Hi!
 I have 800mhz 500mb node with freebsd 4.1, I often get this Resource
 temporarily unavailable
 I have problem to find out what kind of Resource its problem with, when I do
 top command everything looks ok lots of memory free and like 80% idle, and
 we have done some changes in the kernel options MAXMEM=(512*1024)
 options SHMMNI=64and also increased maxusers to 128.This is a
 example of error message:

Hi,

Just a couple of wild guesses :
- I suppose you have no particular maxprocess limit or whatever for your login
  class in /etc/login.conf? You can always have a look at login.conf(5)

- What does 'ps auxww' look like when this happens? Anything surprising there?
  'top' only shows the first so much heavier processes, so you might not see 
  everything.

- On my box here I just ran a little test and with all limits set to
  'unlimited' in login.conf I can trigger this error with a recursive shell
  script calling itself. It happens when about 475 processes have been
  spawned, and then they all die eventually and everything returns to normal.

Hope this helps a bit, but people on the list have probably more information
and also more relevant about this matter... good luck :-)

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Too many collisions on network?

2003-03-16 Thread Olivier Dony
Hello,

I have a webserver serving a lot of requests (almost filling 
up 4 Mbits/s of http at peak time everyday). It's running
Apache 1.3.27 on FreeBSD 4.7-RELEASE, and there are usually
about 200-250 http processes running. Today I was looking at
the various *stat tools to monitor it, and noticed a high
number of network collisions ie :

[EMAIL PROTECTED]:/root# netstat 5
input(Total)   output
   packets  errs  bytespackets  errs  bytes colls
  1598 0 190789   2035 02326238   659
  1722 0 220532   2298 02958770   981
  2547 0 347703   3078 02701052  1211
  1937 0 274644   2461 03332772  1117
  1619 0 235935   2169 02795248   725
  1739 0 262005   2257 02076768   885
  1461 0 255291   1781 02120986   537
  1685 0 273239   1941 02144180   699
and so on...
Earlier today there has been a time where the webserver was
unreachable, with 1 out of 200 packets reaching it only, then 
everything went back to normal. Nothing unusual in the logs.
Is there a way for me to see if the problem was the webserver 
itself or the network? And is this amount of collisions 
suspicious, given that the ISP is of course running a switched
network? 

Thanks in advance for any ideas :-)

Olivier

PS: Lately I have been unable to post anything on the freebsd 
mailing-lists from my blacktrap.net e-mail address, the mails are
accepted by the MX but seem to be discarded. I mailed 
[EMAIL PROTECTED] but did not receive any answer, maybe the
mail was discarded too. What can I do about this?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Too many collisions on network?

2003-03-16 Thread Olivier Dony
On Sunday, 16 March, 2003 16:23, Simon Barner wrote:
 
 Are you running your network adaptor in full-duplex mode? Perhaps the device on
 the other end of the wire does only support half-duplex. Changing this increased
 the throughput from 20kb/s to almost 1mb/s on our internal network here
 (10baseT/UTP).

I'm not really sure about this, here is the output of ifconfig related
to the external interface :

[EMAIL PROTECTED]:/root# ifconfig -m fxp0
fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet xxx.xxx.191.100 netmask 0xfff0 broadcast xxx.xxx.191.111
inet xxx.xxx.191.101 netmask 0x broadcast xxx.xxx.191.101
ether 00:e0:81:23:c5:32
media: Ethernet autoselect (10baseT/UTP)
status: active
supported media:
media autoselect
media 100baseTX mediaopt full-duplex
media 100baseTX
media 10baseT/UTP mediaopt full-duplex
media 10baseT/UTP
media 100baseTX mediaopt hw-loopback

It seems that fxp(4) supports full-duplex but that it is currently 
disabled, and I guess this is because the other end of the wire doesn't
support it, since the media has been autoselected? Please correct me
as I have never played a lot with ifconfig except for basic configutarion.
I wouldn't be too eager to do tests with this setting since this is a
production server and I have no direct physical access to it, so shutting
down the only interface by mistake is *not* an option ;-)
But if I was to change it, how would I go about this without shutting down
fxp0? 'ifconfig fxp0 media 10baseT/UTP mediaopt full-duplex' ??

Thanks for your help :-)

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


mod_cgi not working at all/weird behaviour

2003-03-16 Thread Olivier Dony
Hello,

I posted a problem some days ago about POST data not being passed to my cgi 
perl scripts. This only happens on my FreeBSD4.7-RELEASE server. Well in the 
process of troubleshooting I noticed that if I disabled mod_gzip (which is 
the only thing I don't have on my other working servers) my scripts stopped
working completely with error 500.
I tried then to reinstall everything. So I deinstalled perl, apache and what
depends on it, deleted apache's conf file and reinstalled everything 
*but mod_gzip*. Well my cgi's aren't working a bit more than before!

Anything I put in a cgi script ends with an internal error 500, and in the
errorlog it always says : 
[Fri Mar 14 00:18:19 2003] [error] [client 212.68.212.45] Premature end of script 
headers: /home/oli/public_html/cgi-bin/test.cgi

*Anything*, meaning that it fails too with a basic script like this :

---
#!/bin/sh
echo content-type: text/html
echo 

htmlbodyhello/body/html
---

(the empty line after content-type is there)
My scripts are done by hand using vim, so no binary ftp xfer involved.
All the scripts are chmod'd 0755, the containing directory too, and they give 
the expected output when run in the console.

This is with apache 1.3.27_4 from the ports, mod_php4 4.3.1, and perl base
or perl 5.6.1_11 from the ports (same result).
I've tried doing tests to output this basic thing with sh, perl, php, etc..
everything gives the same 500 error when executed through CGI, while working 
ok in the console!! 

And guess what, if I reinstall mod_gzip, as soon as it is enabled and set to
handle cgi-script with (mod_gzip_item_include mime ^text/html and
mod_gzip_item_include handler ^cgi-script$) the scripts start to work, ie they
give the expected output, but the first problem comes back : POST data is
always empty. So I had to change my scripts to use GET for submitting forms,
which is ugly and might even trigger query-string length problems I suppose.

I'm completely lost, this doesn't seem to make sense at all, but is probably
making sense if I knew where to look... The rest of the webserver is doing 
fine, basic html files and php are working ok, even with POST data! 
How could mod_gzip make my cgi scripts work, but only partly, and how come 
they aren't working at all without it, when working ok on my other FreeBSD 
webservers ??

Could someone help me or advice me before I completely lose my poor mind? ;-)
I've tried to reinstall everything, change permissions etc.. 
Always the same result...

Thanks a lot in advance if someone can provide any sort of help!

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Too many collisions on network?

2003-03-16 Thread Olivier Dony
On Sunday, 16 March, 2003 21:40, Bill Moran wrote:
 Dan Nelson wrote:
  Input errors probably means that whatever you're plugged into does not
  support full-duplex (i.e. it's a hub), which is why autoselect selected
  half-duplex.
 
 You know, now that he brings this up, I tend to agree.
 It's possible that the hub you're plugging into is saturated: that will
 result in high collision rates and poor performance.  You won't get
 anything better because that's the best the hub can do.
 If I'm right on this guess, you need to take it up with your ISP, as it's
 something they need to address.

Ok I left this one in autoselect for now, and will contact my ISP tomorrow,
and try and ask them to find solution for this high collision number 
problem... Thanks a lot everybody who answered :)

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: POST data not available in cgi perl scripts

2003-03-12 Thread Olivier Dony
On Wed, Mar 12, 2003 at 12:48:44PM +, Matthew Faircliff wrote:
 Hello,

Hiya,

 
 Have you tried using libapreq? I find that it is a superior method of transmitting 
 POST data. Find it in /usr/ports/www/p5-libapreq. 
 $my_posted_var = $r-parms{'my_var'};
 

Nope haven't tried it yet, because using CGI.pm was working for me on my other
servers, I never felt the need for a more clever thing, but I'll give it a try
for sure, this looks great.

 Also, why not look into Mason (like emb_perl, only better). It handles POST data 
 like a charm.

I'll have a look at it right now too.

But anyhow I don't think those will solve the problem because the POST data
coming from the HTTP request doesn't even reach my script, although it has
been working all the time on my previous servers. So I guess the problem is
not in my method of getting/parsing the data, but in the process between the
client's request and the script getting it. And PHP scripts get the POST data
fine, argh :(

But thanks a lot for your suggestions, I'll try them as soon as I am done
compiling the perl port and re-installing all my perl modules.. Not that there
is a chance of it working better, since the system's perl works ok for POST
when trying it in the console. But I'm lost so trying anything I haven't
yet...

Thanks again Matt :)

--
Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


POST data not available in cgi perl scripts

2003-03-11 Thread Olivier Dony
I understand this might be a little off topic but I can only reproduce the 
problem on one of my FreeBSD server, so it's not that much OT.

It's very simple, the data from a HTTP POST never reaches my CGI perl scripts.
There are no errors in the server log, the CGI executes fine, no debug with 
CGI::Carp, etc.. only thing is that the POST data is always empty. And that 
no matter what browser I use of course. Also I'm using CGI.pm, but handling 
it by hand yields the same results. The POST DATA is always empty.
Though if I run my script with 'perl -c' in interactive mode and POST
something it works ok and the script gets my POST DATA without problem.

Displaying the %ENV shows the correct QUERY_STRING when using GET, but with
POST the POST DATA never makes it to the script. 

This happens only on one of my FreeBSD : 4.7-RELEASE, apache 1.3.27, system 
perl v5.005_03, whereas the same CGI scripts run fine on my other 5.0-RELEASE
and 4.4-RELEASE, with the same apache version, and perl different or the same.

I have no idea where or what I could look to solve the problem. Maybe others
have had the same issue or any perl/cgi gurus have any ideas for me?

I will be glad to provide any additional info or config files.

TIA a lot for any hints

--
Olivier


PS: An example of a very basic test that fails, I POST into this CGI script,
and the output of the POST data is empty, though CONTENT_LENGTH is correct :

FILE post.cgi
#!/usr/bin/perl -w
print Content-type:text/html\n\n;
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
print DATA: [$buffer]br\n; # - nothing output between the brackets here
@pairs = split(//, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(C, hex($1))/eg;
$FORM{$name} = $value;
}
print htmlbody;
foreach $key (keys(%FORM)) {
print $key = $FORM{$key}br;
}
#   ^^^ here my output is always empty too

foreach $key (sort(keys %ENV)) {
print $key = $ENV{$key}br\n;
}

print /body/html;
/FILE post.cgi

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: POST data not available in cgi perl scripts

2003-03-11 Thread Olivier Dony
On Wed, Mar 12, 2003 at 12:21:59AM +0100, Olivier Dony wrote:
 (...)
 Though if I run my script with 'perl -c' in interactive mode and POST
^^^
Sorry here I meant 'perl' in command line to get the CGI.pm interactive mode,
and of course not 'perl -c', which I had used just before to check the syntax.

 something it works ok and the script gets my POST DATA without problem.
 (...)


--
Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Problem compiling 4.2-RELEASE kernel on another 4-4 computer

2002-12-09 Thread Olivier Dony
Hello,

I've got some trouble compiling the 4.2-RELEASE kernel on my 4.4-RELASE
box. The 4.2 one (dentaal) doesn't have enough hd space to do it.
So I cvsup'd src-sys of tag=RELENG_4_0_2-RELEASE into /usr/DENTAAL on my 4.4
one. I tweaked GENERIC into DENTAAL, and ran config DENTAAL. I'm actually 
trying to add IPSEC support in the 4.2 kernel.
Now trying to make depend :

root@titan:/usr/DENTAAL/src/sys/i386/conf# ls
./  ../  DENTAAL  GENERIC  LINT  NEWCARD
root@titan:/usr/DENTAAL/src/sys/i386/conf# /usr/sbin/config DENTAAL   
Don't forget to do a ``make depend''
Kernel build directory is ../../compile/DENTAAL
root@titan:/usr/DENTAAL/src/sys/i386/conf# cd ../../compile/DENTAAL
root@titan:/usr/DENTAAL/src/sys/compile/DENTAAL# make depend
cc -c -O -pipe -fomit-frame-pointer -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
-fformat-extensions -ansi  -nostdinc -I- -I. -I../.. -I/usr/include  -D_KERNEL
-include opt_global.h -elf  -mpreferred-stack-boundary=2 ../../i386/i386/genas
sym.c
../../i386/i386/genassym.c:76: warning: implicit declaration of function
`__offsetof'
../../i386/i386/genassym.c:76: syntax error before `struct'
../../i386/i386/genassym.c:76: syntax error before `struct'
../../i386/i386/genassym.c:76: syntax error before `struct'
../../i386/i386/genassym.c:76: syntax error before `)'
 and a lot of other alike ...

I assume there is a problem with this __offsetof() macro not being defined, 
but how do I fix the problem? Or is there anything I am doing wrong? Do I
need to provide the kernel config file?

Thanks a lot for any hints

Olivier

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message