Malformed network data :(

Questions regarding Subversion Server may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

Malformed network data :(

Postby gendem » Tue Aug 05, 2008 2:20 am

Hi there

Please bear with me...I am not new to coding but I am new to code repository creation and management.

I have followed the instructions found in the Synology wiki here

http://www.synology.com/wiki/index.php/Step-by-step_guide_to_installing_Subversion_on_ARM-based_Synology_Products \

to get subversion installed and set up. I am now at the point of trying to access it, and I keep getting the error message "svn: Malformed network data" I am attempting to access the server over my local network using svn v1.5.1 on a Mac. The Mac firewall is off, and I can ssh to the server without issue.

The (uncommented) contents of svnserve.conf are:
Code: Select all
[general]
anon-access = write
auth-access = write
password-db = passwd
realm = My Code
[sasl]


inetd.conf contains
Code: Select all
svn stream tcp nowait svnowner /opt/bin/svnserve svnserve -i -r /volume1/svn


and /etc/services has, at the bottom,
Code: Select all
# to allow subversion
svn 3690/tcp # Subversion
svn 3690/udp # Subversion


The user svnowner is set up and is the owner of the repository.

Is there something I am missing?

...Mike
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby gendem » Tue Aug 05, 2008 1:13 pm

Oh, this is a DS-508.

...Mike
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby Risto » Tue Aug 05, 2008 5:37 pm

You might want to try locally accessing your repository on synology (over telnet or ssh) first. Just log in and do a local checkout to some folder (like /volume1/public/test). Does this work fine?

Cheers,
Risto
Risto
Student
Student
 
Posts: 62
Joined: Wed Oct 25, 2006 7:03 pm

Re: Malformed network data :(

Postby gendem » Tue Aug 05, 2008 10:38 pm

Code: Select all
cube> svn co file://localhost/volume1/svn/repository/ /volume1/test/
Checked out revision 0.
cube>


Works fine. Does this give you some ideas (I hope)?

...Mike
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby bzhou » Wed Aug 06, 2008 7:14 am

How about from ds-508 svn client to ds-508 svn server using svn protocol?
bzhou
Knowledgeable
Knowledgeable
 
Posts: 344
Joined: Sat Jan 12, 2008 1:57 am

Re: Malformed network data :(

Postby Risto » Wed Aug 06, 2008 8:22 am

Hi Mike,
Accessing the repository using file:/// bypasses the network access. Please try locally using the svn protocol (network access):
Code: Select all
svn co svn://<user>@localhost/<svn relative path> <local folder for working copy>


Does this work?

Risto
Risto
Student
Student
 
Posts: 62
Joined: Wed Oct 25, 2006 7:03 pm

Re: Malformed network data :(

Postby gendem » Wed Aug 06, 2008 11:36 pm

No, it doesn't:

Code: Select all
cube> svn co svn://mike@localhost/repository /volume1/test/
svn: Malformed network data
cube>


Could it be some kind of configuration issue or something? "repository" on the server is in

Code: Select all
/volume1/svn/repository


...Mike
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby Risto » Thu Aug 07, 2008 8:25 am

Hi Mike,
please check following:
1) Does /opt/bin/svnserve exist and is executable?
2) Does user svnowner have file system read-write access to /volume1/svn and subfolders?

Risto
Risto
Student
Student
 
Posts: 62
Joined: Wed Oct 25, 2006 7:03 pm

Re: Malformed network data :(

Postby gendem » Fri Aug 08, 2008 1:57 am

Code: Select all
cube> ls -la /opt/bin/svnserve
-rwxr-xr-x    1 root     root        55812 Jul 26 14:50 /opt/bin/svnserve
cube>



Code: Select all
drwxr-xr-x    9 root     root         4096 Aug  5 17:35 .
drwxr-xr-x   21 root     root         4096 Aug  4 20:32 ..
drwxrwxrwx    2 root     root         4096 Aug  4 20:32 @tmp
drwxrwxrwx    8 root     root         4096 Aug  6 22:27 Cube
-rw-------    1 root     root         7168 Aug  5 03:33 aquota.group
-rw-------    1 root     root         8192 Aug  7 20:55 aquota.user
drwx------    2 root     root        16384 Aug  1 00:24 lost+found
drwxrwxrwx   12 root     root         4096 Aug  1 18:47 opt
drwxr-xr-x    3 svnowner users        4096 Aug  1 19:59 svn
drwxr-xr-x    3 root     root         4096 Aug  5 17:37 test
drwxrwxrwx    2 root     root         4096 Aug  1 18:02 tmp


Code: Select all
drwxr-xr-x    3 svnowner users        4096 Aug  1 19:59 .
drwxr-xr-x    9 root     root         4096 Aug  5 17:35 ..
drwxr-xr-x    6 svnowner users        4096 Aug  1 19:59 repository
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby Risto » Fri Aug 08, 2008 8:24 am

Hi Mike,
that all looks fine to me.

Couple of checks you might further test. Run:
Code: Select all
netstat -a | grep svn

on the console to see if the svn port is listening at all. In case not you might try following - comment out inetd.conf line of svn and reboot your Synology box (or restart inet.d service).

After reboot/inet.d restart, log in over SSH as root and issue:
Code: Select all
sudo -u svnowner /opt/bin/svnserve -d -r /volume1/svn

This starts the svnserve in daemon mode instead of inet.d mode.
Open another console per SSH and try to checkout the repository - does it work now? If yes, then check your inet.d configuration again.

CTRL+C should terminate the svnserve on console1, if not terminate it with kill.

If that still did not work, try running svnserve as root (just for testing permissions problems). As root run:
Code: Select all
/opt/bin/svnserve -d -r /volume1/svn

and try to checkout on another console.

Risto
Risto
Student
Student
 
Posts: 62
Joined: Wed Oct 25, 2006 7:03 pm

Re: Malformed network data :(

Postby gendem » Sun Aug 10, 2008 10:35 pm

Hi Risto

OK, I did all the steps you suggested, and the checkout did work once the inetd configuration was removed, the system restarted and svnserve was set up using the command you suggested. I can check it out locally (on the DS508) and to my local machine over the network. This implies that the inetd or something is messed.

This is what I typed on the command line, per your instructions:

Code: Select all
sudo -u svnowner /opt/bin/svnserve -d -r /volume1/svn

and this is what is in inetd
Code: Select all
svn stream tcp nowait svnowner /opt/bin/svnserve svnserve -i -r /volume1/svn


I notice in Armyman's blog, the inetd line is like this:

Code: Select all
svn stream tcp nowait svnowner /opt/bin/svnserve -i -r /home/svnowner/repos


(missing the extra svnserve after the path). SHould I be using this one?

Does anything obvious jump out at you?

...Mike
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby Risto » Mon Aug 11, 2008 5:56 pm

Hi Mike,
nice to hear from a progress :)

You should use the line I wrote with the extra svnserve. See here http://www.manpagez.com/man/8/inetd/ for inet.d arguments. The last inet.d line parameter server paramater arguments starts with argv[0], which is the program name itself, thus it's quasi duplicated in this case.

To get it running under inet.d some more debugging is required. Add the -d option to the argument list of inet.d start script /usr/syno/etc/rc.d/S03inetd.sh so that the file looks like:
Code: Select all
...
start)
        if [ -x "$INETD" ] ; then
                echo "Starting inetd..."
                $INETD -d
        fi
        ;;
...

"..." is placeholder to lines before and after. Restart inet.d and take a look at the messages you get while accessing the subversion repository.

You did not write, what's the output of:
Code: Select all
netstat -a
?

Cheers,
Risto
Risto
Student
Student
 
Posts: 62
Joined: Wed Oct 25, 2006 7:03 pm

Re: Malformed network data :(

Postby gendem » Mon Aug 11, 2008 11:59 pm

There is no -d option for inetd installed on the system.

Code: Select all
cube> more /usr/syno/etc/rc.d/S03inetd.sh
#!/bin/sh
#
# S03inetd.sh - startup script for inetd
#
# This goes in /usr/syno/etc/rc.d and gets run at boot-time.

INETD=/usr/sbin/inetd


case "$1" in

start)
   if [ -x "$INETD" ] ; then
      echo "Starting inetd..."
      $INETD -d
   fi
   ;;
stop)
   echo "stop inetd"
   kill -9 `cat /var/run/inetd.pid`
   ;;
                           
restart)
   $0 stop
   $0 start
   ;;

*)
   echo "usage: $0 { start | stop | restart}" >&2
   exit 1
   ;;

esac

cube> /usr/syno/etc/rc.d/S03inetd.sh start
Starting inetd...
/usr/sbin/inetd: invalid option -- d
BusyBox v1.1.0 (2008.06.20-20:12+0000) multi-call binary

Usage: inetd [-f] [-q len] [conf]

cube>



If I remove the -d and call the script again...

Code: Select all
cube> netstat -a | grep svn
tcp        0      0 *:svn                   *:*                     LISTEN     
cube>


However, somehow it is now working both locally and remotely, so whatever happened, it works now.

Thanks for all your help! :)

...Mike
gendem
I'm New!
I'm New!
 
Posts: 9
Joined: Fri Aug 01, 2008 11:06 pm

Re: Malformed network data :(

Postby baumschule » Thu Jun 18, 2009 2:23 pm

hi i have a similar problem with my ds 207+.

i have installed the svn like written on
http://forum.synology.com/wiki/index.ph ... y_Products

but now i cant access via network!

port is listening
Code: Select all
Synology> netstat -a | grep svn
tcp        0      0 *:svn                   *:*                     LISTEN


connect from local console:
Code: Select all
Synology> svn co file://localhost/volume1/svn/test/ /volume1/test/
Checked out revision 0.

Synology> svn co svn://testuser@localhost/test /volume1/test/
svn: Malformed network data


can someone help me to solve the problem?
baumschule
I'm New!
I'm New!
 
Posts: 5
Joined: Thu Jun 18, 2009 1:00 pm

Re: Malformed network data :(

Postby Risto » Thu Jun 18, 2009 5:41 pm

What's inside your /etc/inetd.conf?
Accessing the repository via file:/// bypasses the network access, so the problem can be with spaning or svn repository config files.

Risto
Risto
Student
Student
 
Posts: 62
Joined: Wed Oct 25, 2006 7:03 pm

Next

Return to Subversion Server

Who is online

Users browsing this forum: No registered users and 0 guests