r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

Pekr
1-Nov-2008
[818x4]
As for your load balancer device - do you use two WANs connected 
to two providers? If so, you have to choose session balancing type, 
or some of your apps might not work (e.g. ICQ will disconnect you, 
when you go out via two different public IPs in one session)
Look at Access filter, and see if all traffic is enabled, and no 
services (represented by port numbers) are selectively disabled ...
Look at Virtual servers - do you run FTP server in your LAN? If so, 
disallow it for a while. (this will most probabyl not help though)
I went thru all the docs, and nothing suspicious in there. As your 
Total Commander FTP connection works, it has to be REBOL in conjunction 
with your local PC firewall or something like that. Or REBOL ftp 
protocol working differentcly could be the cause, but not sure, as 
it works from other locations ...
Vladimir
2-Nov-2008
[822]
Hey... thanks for bothering with my problem....  :)

I will go tomorrow in to the office and try few things... in the 
meantime they are just using totalcmd for uploading data...

I will be using two wans... but not yet... its still only one wan 
connection.
No more talk.... I'll try tomorrow...

My friends are telling me: "If everything else works it has to be 
that scripting language of yours."

I say: fuc..ing router should act as a simple wire... what goes in 
on one end goes out on other end.
I can change router... BUT I'M NOT CHANGING LANGUAGE! :)
I will report progress tomorrow.
Gabriele
2-Nov-2008
[823]
did you try both active and passive ftp?
Graham
2-Nov-2008
[824x2]
he tried both
and it works for us using his password :)
Vladimir
2-Nov-2008
[826x5]
yes :)
only problem is router.... without it if I connect directly PC with 
WAN connection... rebol scripts work...

I connect router on wan and pc on lan port and only rebol script 
doesnt work...
filezilla, total commander, ftp command from windows works...
I know (at least I thought I knew...  :( ) how to set up network 
and routers... I did this hundreds of times, and had problems with 
altme, torrent downloaders, games and many others... and solved them....

I tried to add ftp ports, and even whole range from 0-65535 to NAT 
routing tables.... tried to put whole lan ip range into dmz... Ill 
try tomorrow....
While Im at this... Does anyone know how ftp works from rebol ?
Details about ftp imlementation in rebol ?
Pavel
2-Nov-2008
[831x2]
Vladimir look at rebol.org script folder. there you can find a lot 
of solution/inspiration
also rebol.com documentation tutorial and examples especially rebol 
cookbook
Graham
2-Nov-2008
[833]
the source to ftp is available
Pekr
2-Nov-2008
[834]
Vladimir - you still probably did not tell us, what REBOL version 
do you use?
Vladimir
2-Nov-2008
[835x2]
I use 2.7.6 on windows.
@Graham: Where is the source available?

I thought maybe by looking into source and comparing it with the 
messages I get from net stats I could find more about my problem....

In the meantime I'll try tomorrow to open router completely... all 
the ports all the ip addresses... and see what happens.
Graham
2-Nov-2008
[837]
probe system/schemes/ftp
Vladimir
4-Nov-2008
[838x4]
here is something new....
I tried few things from windows command line.
here are two scripts and two logs:
1. script
binary
cd apl
put c:\slanje\zip\ik104test.zip
quit

1.log
......
230-User visaprom.com has group access to:  www
230 OK. Current restricted directory is /
ftp> binary
200 TYPE is now 8-bit binary
ftp> cd apl
250 OK. Current directory is /apl
ftp> put c:\slanje\zip\ik104test.zip
200 PORT command successful

425 Could not open data connection to port 35370: Operation timed 
out
ftp> quit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
2.script
LITERAL PASV
cd apl
put c:\slanje\zip\ik104test.zip
quit

2.log
.....
230-User visaprom.com has group access to:  www
230 OK. Current restricted directory is /
ftp> LITERAL PASV
227 Entering Passive Mode (194,9,94,127,234,131)
ftp> cd apl
Connection closed by remote host.
ftp> put c:\slanje\zip\ik104test.zip
Not connected.
ftp> quit
basicly if I enter Binary mode, upload fails and it looks like it 
has to do something with port above 35000 problem.
If I enter passive mode nothing works....
it always responds with network timeout....
And once more..... total commander works :)
Graham
4-Nov-2008
[842]
well, in this case, you should use wireshark and do a tcp trace
Vladimir
4-Nov-2008
[843x3]
Im trying..... will report
here is command with error:
to-port: open/binary/new/direct server/:file
** Access Error: Network timeout
** Where: confirm
** Near: to-port: open/binary/new/direct server/:file
and here are log files from wireshark:

http://www.visaprom.com/wiresharklog.txt
http://www.visaprom.com/wiresharklog details.txt


If anyone has little time to read thru them and can tell me something 
I would appriciate it very much :)
Graham
4-Nov-2008
[846]
what I normally do is click on the relevant tcp lines, and the right 
click, and then choose "follow tcp stream" so that I only get the 
relevant data.
DideC
4-Nov-2008
[847]
It seems the problem is after the PORT command.

It  define the port used to receive or send the file data (depending 
the command you issue).

Use Wireshark to have a look to what Total commander do regarding 
its PORT command.
So we can compare with the Rebol commands.


I guess the router firewall block the one Rebol use, but Total commander 
do it in an over way.
Vladimir
5-Nov-2008
[848x2]
Here is log from rebol ftp upload:


No.     Time        Source                Destination           Protocol 
Info

     67 3.356898    192.168.2.108         194.9.94.127          TCP   
        spiral-admin > ftp [SYN] Seq=0 Win=16384 Len=0 MSS=1460

     79 3.982028    194.9.94.127          192.168.2.108         TCP   
        ftp > spiral-admin [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1100

     80 3.982082    192.168.2.108         194.9.94.127          TCP   
        spiral-admin > ftp [ACK] Seq=1 Ack=1 Win=16500 Len=0

     90 4.056926    194.9.94.127          192.168.2.108         FTP   
        Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------

     92 4.057544    192.168.2.108         194.9.94.127          FTP   
        Request: USER visaprom.com

    102 4.129540    194.9.94.127          192.168.2.108         FTP  
        Response: 331 User visaprom.com OK. Password required

    103 4.129689    192.168.2.108         194.9.94.127          FTP  
        Request: PASS Du4m1t0R

    106 4.241608    194.9.94.127          192.168.2.108         FTP  
        Response: 230-User visaprom.com has group access to:  www    
     

    107 4.241781    192.168.2.108         194.9.94.127          FTP  
        Request: SYST

    118 4.305921    194.9.94.127          192.168.2.108         FTP  
        Response: 215 UNIX Type: L8

    119 4.306117    192.168.2.108         194.9.94.127          FTP  
        Request: PWD

    134 4.367656    194.9.94.127          192.168.2.108         FTP  
        Response: 257 "/" is your current location

    136 4.370939    192.168.2.108         194.9.94.127          FTP  
        Request: PORT 192,168,2,108,13,111

    143 4.435976    194.9.94.127          192.168.2.108         FTP  
        Response: 200 PORT command successful

    144 4.468135    192.168.2.108         194.9.94.127          FTP  
        Request: CWD apl/

    194 5.499179    192.168.2.108         194.9.94.127          FTP  
        [TCP Retransmission] Request: CWD apl/

    198 5.565745    194.9.94.127          192.168.2.108         FTP  
        Response: 250 OK. Current directory is /apl

    199 5.565955    192.168.2.108         194.9.94.127          FTP  
        Request: TYPE I

    275 7.640872    194.9.94.127          192.168.2.108         FTP  
        Response: 200 TYPE is now 8-bit binary

    276 7.641186    192.168.2.108         194.9.94.127          FTP  
        Request: STOR ik104test.zip

    290 7.903130    194.9.94.127          192.168.2.108         TCP  
        ftp > spiral-admin [ACK] Seq=613 Ack=111 Win=16500 Len=0

   1279 37.655879   192.168.2.108         194.9.94.127          TCP 
        spiral-admin > ftp [FIN, ACK] Seq=111 Ack=613 Win=15888 Len=0
there goes pass again :)
Henrik
5-Nov-2008
[850]
Vladimir, be careful as this group is web public.
Vladimir
5-Nov-2008
[851x5]
I know .. Im to tired :)
no problem... will change it in a sek...
Ill post log from total commander in a minute and then try to spot 
the difference...
No.     Time        Source                Destination           Protocol 
Info

     90 2.750586    192.168.2.108         194.9.94.127          FTP   
        Request: TYPE I

     97 2.823074    194.9.94.127          192.168.2.108         FTP   
        Response: 200 TYPE is now 8-bit binary

     98 2.828500    192.168.2.108         194.9.94.127          FTP   
        Request: PASV

    113 3.171841    192.168.2.108         194.9.94.127          FTP  
        [TCP Retransmission] Request: PASV

    114 3.244193    194.9.94.127          192.168.2.108         TCP  
        [TCP Previous segment lost] ftp > mgemanagement [ACK] Seq=80 
    Ack=15 Win=16500 Len=0

    131 3.889034    194.9.94.127          192.168.2.108         FTP  
        [TCP Retransmission] Response: 227 Entering Passive Mode (194,9,94,127,250,69)

    137 3.984887    192.168.2.108         194.9.94.127          FTP  
        Request: STOR ik104test.zip

    149 4.247163    194.9.94.127          192.168.2.108         TCP  
        ftp > mgemanagement [ACK] Seq=80 Ack=35 Win=16500 Len=0

    210 7.046287    194.9.94.127          192.168.2.108         FTP  
        Response: 150 Accepted data connection

    241 7.218716    192.168.2.108         194.9.94.127          TCP  
        mgemanagement > ftp [ACK] Seq=35 Ack=110 Win=16269 Len=0

   1613 17.145048   194.9.94.127          192.168.2.108         FTP 
        Response: 226-File successfully transferred

   1617 17.172970   192.168.2.108         194.9.94.127          FTP 
        Request: SIZE ik104test.zip

   1620 17.277591   194.9.94.127          192.168.2.108         FTP 
        Response: 213 566605

   1623 17.375906   192.168.2.108         194.9.94.127          FTP 
        Request: TYPE A

   1628 17.498619   194.9.94.127          192.168.2.108         FTP 
        Response: 200 TYPE is now ASCII

   1629 17.516657   192.168.2.108         194.9.94.127          FTP 
        Request: PASV

   1633 17.644044   194.9.94.127          192.168.2.108         FTP 
        Response: 227 Entering Passive Mode (194,9,94,127,205,237)

   1637 17.750889   192.168.2.108         194.9.94.127          FTP 
        Request: LIST

   1643 17.835367   194.9.94.127          192.168.2.108         FTP 
        Response: 150 Accepted data connection

   1644 17.863490   194.9.94.127          192.168.2.108         FTP 
        Response: 226-Options: -a -l 

   1645 17.863548   192.168.2.108         194.9.94.127          TCP 
        mgemanagement > ftp [ACK] Seq=75 Ack=364 Win=16015 Len=0
there it is.... difference is:

in total cmd:
on Request: STOR ik104test.zip
ftp > mgemanagement [ACK] Seq=80 Ack=35 Win=16500 Len=0
Response: 150 Accepted data connection

and in rebol
response is

 290 7.903130    194.9.94.127          192.168.2.108         TCP  
     ftp > spiral-admin [ACK] Seq=613 Ack=111 Win=16500 Len=0
30 seconds pause

1279 37.655879   192.168.2.108         194.9.94.127          TCP 
     spiral-admin > ftp [FIN, ACK] Seq=111 Ack=613 Win=15888 Len=0 
   149 4.247163    194.9.94.127          192.168.2.108         TCP
Anton
5-Nov-2008
[856]
I note in the "wireshark log.txt" you linked above, there is [TCP 
CHECKSUM INCORRECT] soon after the STOR command. I don't know what 
it means exactly.
Pekr
5-Nov-2008
[857]
FIN, ACK - your PC closes the connection (REBOL version) after receiving 
previous ACK, dunno why. Why is "spiral-admin" btw?
Dockimbel
5-Nov-2008
[858]
Your REBOL FTP session doesn't seem to use passive mode while Total 
Cmd does.
Pekr
5-Nov-2008
[859]
I think we several times suggested to set system/schemes/ftp/passive: 
true, and IIRC Vladimir claimed that it made no change for him ....
Vladimir
5-Nov-2008
[860x6]
I set it to passive
same error.... here is the log
4 0.136676    194.9.94.127          192.168.2.108         FTP    
  Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------

      5 0.136919    192.168.2.108         194.9.94.127          FTP    
        Request: USER visaprom.com

      6 0.195551    194.9.94.127          192.168.2.108         FTP    
        Response: 331 User visaprom.com OK. Password required

      7 0.195740    192.168.2.108         194.9.94.127          FTP    
        Request: PASS pass

      8 0.298224    194.9.94.127          192.168.2.108         FTP    
        Response: 230-User visaprom.com has group access to:  www     

      9 0.298434    192.168.2.108         194.9.94.127          FTP    
        Request: SYST

     10 0.359996    194.9.94.127          192.168.2.108         FTP   
        Response: 215 UNIX Type: L8

     11 0.360264    192.168.2.108         194.9.94.127          FTP   
        Request: PWD

     12 0.424862    194.9.94.127          192.168.2.108         FTP   
        Response: 257 "/" is your current location

     13 0.425117    192.168.2.108         194.9.94.127          FTP   
        Request: PASV

     14 0.485707    194.9.94.127          192.168.2.108         FTP   
        Response: 227 Entering Passive Mode (194,9,94,127,205,50)

     18 0.547818    192.168.2.108         194.9.94.127          FTP   
        Request: CWD apl/

     19 1.613365    192.168.2.108         194.9.94.127          FTP   
        [TCP Retransmission] Request: CWD apl/

     20 1.675732    194.9.94.127          192.168.2.108         TCP   
        [TCP Previous segment lost] ftp > gtrack-ne [ACK] Seq=603 Ack=66 
     Win=16500 Len=0

    106 30.535545   192.168.2.108         194.9.94.127          TCP  
        gtrack-ne > ftp [FIN, ACK] Seq=66 Ack=568 Win=15933 Len=0

    107 30.600678   194.9.94.127          192.168.2.108         TCP  
        ftp > gtrack-ne [ACK] Seq=603 Ack=67 Win=16500 Len=0

    108 30.600776   194.9.94.127          192.168.2.108         FTP  
        Response: 250 Logout.

    109 30.600798   192.168.2.108         194.9.94.127          TCP  
        [TCP Dup ACK 106#1] gtrack-ne > ftp [ACK] Seq=67 Ack=568 Win=15933 
    Len=0 SLE=603 SRE=616

    110 30.601077   194.9.94.127          192.168.2.108         TCP  
        ftp > gtrack-ne [FIN, ACK] Seq=616 Ack=67 Win=16500 Len=0

    111 30.601086   192.168.2.108         194.9.94.127          TCP  
        [TCP Dup ACK 106#2] gtrack-ne > ftp [ACK] Seq=67 Ack=568 Win=15933 
    Len=0 SLE=603 SRE=617
what is gtrack-ne ?
I tried again... now it is "ca-idms" instead of "gtrack-ne" and Seq=604 
instead of 603....
I have no fu...ing... idea what this is...
If there is anyone outthere who knows what this could be... ?
btw. I sent mails to pheenet (router manufacturer) support... Maybe 
they can help....
DideC
5-Nov-2008
[866]
I see no PORT command in Totalcommander log. That seems going in 
the way I claim before.
Graham
5-Nov-2008
[867]
What are these retransmission requests??