-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Trouble Shooting DSBMD
Please add this to your Trouble Shooting section in your README.MD file and to your hand book. As new user, I was stumped to figure out, what "bind() Address in use" should point me to fix, related to your DSBMD application. BIND9() comes to mind.
Here is what a normal running DSBMD app looks like, connected to a cell phone Samsung S21 via USB cable:
Check to see if dsbm is running using netstat -n | grep dsb and sockstat | grep dsbm commands
netstat -n | grep dsb
sockstat | grep dsbm
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
fred@fred-ghostbsd-pc ~> netstat -n | grep ds
fffff801b6a94500 stream 0 0 0 fffff801d63e4900 0 0 /var/run/dsbmd.socket
fffff801aa09ae00 stream 0 0 fffff800330aa988 0 0 0 /var/run/dsbmd.socket
fred@fred-ghostbsd-pc ~> sockstat | grep dsbm
fred gphotofs 7959 6 stream /var/run/dsbmd.socket
fred gphotofs 7959 10 stream /var/run/dsbmd.socket
fred dsbmc 6807 3 stream -> /tmp/.X11-unix/X0
fred dsbmc 6807 6 stream -> /tmp/.ICE-unix/1981
fred dsbmc 6807 10 stream -> /var/run/dsbmd.socket
fred dsbmc 6807 13 stream -> /tmp/dbus-Qh3pb2pIrd
fred dsbmc 6807 14 stream -> /tmp/dbus-IgaSWVGC6P
fred dsbmc 6807 23 stream -> /tmp/dbus-Qh3pb2pIrd
fred dsbmc 6807 24 stream -> /tmp/dbus-Qh3pb2pIrd
fred dsbmc 6807 25 stream -> /tmp/dbus-Qh3pb2pIrd
root dsbmd 6218 6 stream /var/run/dsbmd.socket
root dsbmd 6218 7 seqpac -> ??
root dsbmd 6218 8 seqpac -> ??
root dsbmd 6218 9 seqpac -> /var/run/devd.seqpacket.pipe
root dsbmd 6218 10 stream /var/run/dsbmd.socket
Check the status of the dsbmd service. Is it running ? What is the PID value?
sudo service dsbmd status
fred@fred-ghostbsd-pc ~> sudo service dsbmd status
Password:
dsbmd is running as pid 6218.
fred@fred-ghostbsd-pc ~>
Check for what dsbmd files exist in directory /var/run
ls -l /var/run/dsbmd*
fred@fred-ghostbsd-pc ~> ls -l /var/run/dsbmd*
-rw------- 1 root wheel 4 Jan 25 22:54 /var/run/dsbmd.pid
srwxrwxrwx 1 root wheel 0 Jan 25 22:54 /var/run/dsbmd.socket
fred@fred-ghostbsd-pc ~> sudo cat /var/run/dsbmd.pid
6218⏎
Check the size, type, and contents of the dsbmd.socket file: Seems to be size 0, and type S for Stream
ls -l /var/run/dsbmd.socket
fred@fred-ghostbsd-pc ~> ls -l /var/run/dsbmd.socket
srwxrwxrwx 1 root wheel 0 Jan 25 22:54 /var/run/dsbmd.socket
fred@fred-ghostbsd-pc ~> ls -ld /var/run/dsbmd.socket
srwxrwxrwx 1 root wheel 0 Jan 25 22:54 /var/run/dsbmd.socket
I probably should not have examined the contents of dsbmd.socket file, cause it breaks operation
fred@fred-ghostbsd-pc ~> cat /var/run/dsbmd.socket
cat /var/run/dsbmd.socket
+:dev=/dev/ugen0.2:fs=ptpfs:volid=SAMSUNG_Android:mntpt=/media/SAMSUNG_Android:type=PTP:cmds=mount,unmount
+:dev=/dev/pseudo00:fs=fuse:volid=ada0p2:mntpt=/media/ada0p2:type=HDD:cmds=mount,unmount
+:dev=/dev/cd0:fs=cd9660:volid=PC_GHS:mntpt=/media/cd0:type=DATACD:speed=0:cmds=mount,unmount,eject,speed
+:dev=/dev/ada0p2:fs=ext2fs:volid=ada0p2:type=HDD:cmds=mount,unmount
+:dev=/dev/ada0p1:fs=msdosfs:volid=ada0p1:type=HDD:cmds=mount,unmountfred@fred-ghostbsd-pc ~>
Look for the Log file:
fred@fred-ghostbsd-pc ~> ls /var/log/ds*
/var/log/dsbmd.log
fred@fred-ghostbsd-pc ~> ls -l /var/log/ds*
-rw-r--r-- 1 root wheel 1967 Jan 25 23:34 /var/log/dsbmd.log
PROBLEM: Start the dsbmd service and it immediately shuts down. Check the /var/log/dsbmd.log log file and it reports the "dsbmd: bind() address already in use"
fred@fred-ghostbsd-pc /v/run> sudo service dsbmd start
Starting dsbmd.
fred@fred-ghostbsd-pc /v/run> sudo service dsbmd status
dsbmd is not running.
Read the Log File using LESS command This top part of the file is the ERROR I was encountering:
File /var/run/dsbmd.pid existed and contained a 4 digit PID number like 5376. This was evident when running the sudo service dsbmd status_ command and getting the message dsbmd is not running.
fred@fred-ghostbsd-pc ~> less /var/log/dsbmd.log
dsbmd: dsbmd started on Tue Jan 25 19:50:31 2022
dsbmd: bind(): Address already in use on Tue Jan 25 19:50:31 2022
dsbmd: dsbmd started on Tue Jan 25 19:55:24 2022
dsbmd: bind(): Address already in use on Tue Jan 25 19:55:24 2022
dsbmd: dsbmd started on Tue Jan 25 19:55:55 2022
dsbmd: bind(): Address already in use on Tue Jan 25 19:55:55 2022
dsbmd: dsbmd started on Tue Jan 25 21:01:15 2022
dsbmd: bind(): Address already in use on Tue Jan 25 21:01:15 2022
dsbmd: dsbmd started on Tue Jan 25 21:11:45 2022
dsbmd: bind(): Address already in use on Tue Jan 25 21:11:45 2022
dsbmd: dsbmd started on Tue Jan 25 22:03:51 2022
dsbmd: bind(): Address already in use on Tue Jan 25 22:03:51 2022
dsbmd: dsbmd started on Tue Jan 25 22:19:22 2022
dsbmd: bind(): Address already in use on Tue Jan 25 22:19:22 2022
dsbmd: dsbmd started on Tue Jan 25 22:26:21 2022
dsbmd: bind(): Address already in use on Tue Jan 25 22:26:21 2022
dsbmd: dsbmd started on Tue Jan 25 22:41:51 2022
dsbmd: bind(): Address already in use on Tue Jan 25 22:41:51 2022
dsbmd: dsbmd started on Tue Jan 25 22:46:26 2022
dsbmd: bind(): Address already in use on Tue Jan 25 22:46:26 2022
dsbmd: dsbmd started on Tue Jan 25 22:51:27 2022
dsbmd: bind(): Address already in use on Tue Jan 25 22:51:27 2022
dsbmd: dsbmd started on Tue Jan 25 22:51:29 2022
/var/log/dsbmd.log
CORRECT: operation of dsbmd.log log file at the bottom section of the log file
/var/log/dsbmd.log
dsbmd: dsbmd started on Tue Jan 25 22:54:14 2022
dsbmd: Client with UID 1002 connected on Tue Jan 25 23:01:47 2022
dsbmd: Client with UID 1002 disconnected on Tue Jan 25 23:01:47 2022
dsbmd: Client with UID 1002 connected on Tue Jan 25 23:01:47 2022
dsbmd: Device /dev/ugen0.2 mounted on /media/SAMSUNG_Android by UID 1002 on Tue Jan 25 23:02:09 2022
dsbmd: Device /dev/ugen0.2 mounted on /media/SAMSUNG_Android by UID 1002 on Tue Jan 25 23:16:16 2022
dsbmd: Client with UID 1002 connected on Tue Jan 25 23:34:38 2022
dsbmd: Client with UID 1002 disconnected on Tue Jan 25 23:34:38 2022
fred@fred-ghostbsd-pc ~>
Conclusion: If the application will not start, remove the file /var/run/dsbmd.pid and start the app again with this line:
sudo service dsbmd start
sudo service dsbmd status
GOT IT RUNNING with this:
Check that you have the line in one of the ~/.xprofile startup files for your graphical display system.
export QT_QPA_PLATFORMTHEME=gtk2
In order to make Qt5 applications use qt5-style-plugins, add the line export QT_QPA_PLATFORMTHEME=gtk2 to one of the following files, depending on how you start your X session:
Add this line to ~/.xprofile for GhostBSD Operating System
export QT_QPA_PLATFORMTHEME=gtk2
Had to remove the dsbmd.pid file from /var/run directory
rm -i /var/run/dsbmd.pid
and remove empty directory dsbmd.socket
rmdir -i /var/run/dsbmd.socket
The dsbmd application will recreate these two files
Here is what the netstat -n | grep ds and the sockstat | grep dsbmd show when the file /var/run/dsbmd.pid is blocking the startup of DSBMD app:
netstat -n | grep ds
sockstat | grep dsbmd
NOTHING IS HAPPENING: Something is broke. DSBMD starts but immediately dies. What am I looking for to modify or repair? I don't know. I am a new user with no direction to turn to. The log file says, "bind() Address already in use" Okay is there a "BIND()" function to search for? find /var -name "dsbmd*" -print Lets search for a log file to read in /var/log or other files in /var/run
fred@fred-ghostbsd-pc /v/run> sudo service dsbmd start
Starting dsbmd.
fred@fred-ghostbsd-pc /v/run> sudo service dsbmd status
dsbmd is not running.
fred@fred-ghostbsd-pc /v/run> sockstat | grep dsbm
fred@fred-ghostbsd-pc /v/run>
fred@fred-ghostbsd-pc /v/run> netstat -n | grep ds
fred@fred-ghostbsd-pc /v/run [0|1]> sudo service dsbmd status
dsbmd is not running.
Maybe add to cryptic "bind() Address not found" message Check if file /var/run/dsbmd.pid exists and contains a valid PID number? Remove file /var/run/dsbmd.pid and start again sudo service dbsmbd start
sudo service dbsmbd start
Thanks, Let me know how I can help. I have given you information to add to a handbook to help a new user fix his own problems. Fred L. Finster