Welcome, Guest. Please login or register.

Author Topic: Samba and SMBFS...  (Read 6177 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline olsen

Re: Samba and SMBFS...
« on: February 07, 2011, 07:33:31 PM »
Quote from: flaviosr;613310
Hi to all,
I configured Samba and it's ok! I can ping, the Amiga is seen and the sun is shining... :-)
But when I try to use SMBFS I have some problems:
° I made small scripts to "see" some PCs but only few times these scripts works... most of the times nothing happens and some the computer hangs;
° if I copy these scripts in a CLI shell everything is ok!
ARGH!!! What am I missing?


Are you sure that everything always works if you launch smbfs manually?

There's a potential issue with name resolution. If you don't have a DNS entry set up for each server you want to connect to, smbfs will fall back to sending broadcast name queries through the network in the hope that the server you want to connect to will respond. This may not always work. In fact, depending upon your TCP/IP stack it may not work at all. The reason why it may not work is because the TCP/IP stack may not be able to send the broadcast query to the right place due to a bug in the old TCP/IP code.

Anyway, a workaround for this name resolution issue is to use the IPv4 address of the server instead of trying its name.

So... the next question would be: how do you launch smbfs if you don't enter the command manually?
 

Offline olsen

Re: Samba and SMBFS...
« Reply #1 on: February 10, 2011, 08:07:20 PM »
Quote from: flaviosr;614107
Bad news (for me)... I made more tests and SMBFS hangs also when launched from CLI but not so often when lauched with a script!


Well, at least there's some consistency now. I'd be mighty surprised if the thing worked one way or not the other. From what I know, this sort of thing either works, or it doesn't, regardless of where or when you launch it.

Quote

I tried with IP address instead than name but I had no results!


Ouch. Does the server you want to connect to have a regular name? If so, does the server's own name, as reported by Samba, match it?

Quote

I tried passing from SMBFS 1.74 to the older 1.66 but again no results.


Generally, the newer versions have drastically fewer bugs and show less wacky and unpredictable behaviour. I recommend you try the newer version.

Quote

If I use device and service together the Amiga hangs immediately!!!
When I launch a script nothing happens... but if I open a CLI and try to "enter" the new device I receive a memory error!!! :-o
I am using a standard 18 Mb A4000T, could it be not powerful enough?


Honestly, this sounds rather bizarre. Does your Amiga crash or lock up in connection with the TCP/IP stack, or does it take smbfs to make trouble?

When did you last test your system's memory? Easy way to make a memory test: copy data from your hard disk into RAM-Disk until either RAM-Disk fills up, or your system crashes. If your system crashes before it fills up, you might want to see to those SIMMs.

Quote

Another question: are you using Miami or Genesis?


Um, neither :)

Quote

Which is better?


Depends upon what you're doing. Miami tends to be slower than Genesis. But Miami's GUI may arguably be a better design.
 

Offline olsen

Re: Samba and SMBFS...
« Reply #2 on: February 21, 2011, 01:01:51 PM »
Quote from: flaviosr;616770
I am thinking about the Amiga that I am using for tests... a "poor" A4000T with 68040@25... could it be that it needs time for the Amiga to be "connected" to my intranet? For example, even with fast PC, it takes a bit of time before other PCs are seen... perhaps simply the Amiga hangs instead than waiting for the connection to be extablished.


No, this isn't likely. The reason why the servers do not appear instantly is because they report their status at irregular intervals, and this information is collected and resent at irregular intervals, too, by the server which assumed responsibility for the network.

This is not a matter of speed or anything.

When you tell smbfs to connect to a server, it will first try to resolve the name of the server through a DNS (domain name system) lookup. If you do not run a local DNS server, then this lookup will probably fail. After it has failed, smbfs will repeat the lookup, but this time use a different query method which should work within the Samba/Windows network domain. This can fail, too, if the TCP/IP stack swallows the query packet sent.

What you see is probably the DNS lookup timing out and the second query attempt not always working.

Quote

I am going to test the memory (always a good thing) and trying also Genesis that you tell it's faster... and also waiting for some time before asking for a connection...

Other suggestions?


Here's what I used to do: I set the IP address of the Samba (or Windows) server to a fixed number and then edited the Amiga's host name database to map it to a predefined name. In AmiTCP that database is a file called "AmiTCP:db/hosts", and I think you can manually edit the database in Miami.

Anyway, you'd put the fixed IP address there and the name of the server you picked. To access the server thruough smbfs, you'd use thsi predefined server name you added to the hosts database. This has the effect of the DNS lookup always succeeding.