'setting SO_TIMESTAMPNS option: Protocol not available' error fping 5.1-1 on Ubuntu 22.04 over WSL1
grafias3787 opened this issue · 11 comments
As the title mentioned we have Ubuntu 22.04 running over WSL1 on Windows Server 2019 and face the below error when using the fping application. Of cource the IP 192.168.1.1 is reachable from the server. The issue was replicated on three different servers with the same specs and versions.
root@server: fping 192.168.1.1
setting SO_TIMESTAMNS option: Protocol not available
setting SO_TIMESTAMNS option (IPv6): Protocol not available
192.168.1.1 is unreachable
We have tested also version 5.0-1 with the same result.
Finally we have downgraded to 4.2-1 and it worked normally.
Can you please execute the following two commands inside your WSL1 Ubuntu enviroment and send back the output?
I hope gcc is installed.
Command-1
uname -a
Command-2
gcc -dM -E - </dev/null
Good day, below the results
root@server:~# uname -a
Linux server 4.4.0-17763-Microsoft #2268-Microsoft Thu Oct 07 16:36:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
root@server:~# gcc -dM -E - </dev/null
#define SSP_STRONG 3
#define DBL_MIN_EXP (-1021)
#define UINT_LEAST16_MAX 0xffff
#define __ATOMIC_ACQUIRE 2
#define FLT128_MAX_10_EXP 4932
#define FLT_MIN 1.17549435082228750796873653722224568e-38F
#define __GCC_IEC_559_COMPLEX 2
#define UINT_LEAST8_TYPE unsigned char
#define SIZEOF_FLOAT80 16
#define __INTMAX_C(c) c ## L
#define CHAR_BIT 8
#define UINT8_MAX 0xff
#define SCHAR_WIDTH 8
#define WINT_MAX 0xffffffffU
#define FLT32_MIN_EXP (-125)
#define ORDER_LITTLE_ENDIAN 1234
#define SIZE_MAX 0xffffffffffffffffUL
#define WCHAR_MAX 0x7fffffff
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define DBL_DENORM_MIN ((double)4.94065645841246544176568792868221372e-324L)
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_IEC_559 2
#define FLT32X_DECIMAL_DIG 17
#define FLT_EVAL_METHOD 0
#define FLT64_DECIMAL_DIG 17
#define CET 3
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define UINT_FAST64_MAX 0xffffffffffffffffUL
#define SIG_ATOMIC_TYPE int
#define DBL_MIN_10_EXP (-307)
#define FINITE_MATH_ONLY 0
#define FLT32X_MAX_EXP 1024
#define FLT32_HAS_DENORM 1
#define UINT_FAST8_MAX 0xff
#define FLT32_MAX_10_EXP 38
#define DEC64_MAX_EXP 385
#define __INT8_C(c) c
#define INT_LEAST8_WIDTH 8
#define UINT_LEAST64_MAX 0xffffffffffffffffUL
#define SHRT_MAX 0x7fff
#define LDBL_MAX 1.18973149535723176502126385303097021e+4932L
#define FLT64X_MAX_10_EXP 4932
#define LDBL_IS_IEC_60559 2
#define FLT64X_HAS_QUIET_NAN 1
#define UINT_LEAST8_MAX 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define FLT128_DENORM_MIN 6.47517511943802511092443895822764655e-4966F128
#define UINTMAX_TYPE long unsigned int
#define __linux 1
#define DEC32_EPSILON 1E-6DF
#define FLT_EVAL_METHOD_TS_18661_3 0
#define __unix 1
#define UINT32_MAX 0xffffffffU
#define FLT128_MIN_EXP (-16381)
#define WINT_MIN 0U
#define FLT128_MIN_10_EXP (-4931)
#define FLT32X_IS_IEC_60559 2
#define INT_LEAST16_WIDTH 16
#define SCHAR_MAX 0x7f
#define FLT128_MANT_DIG 113
#define WCHAR_MIN (-WCHAR_MAX - 1)
#define __INT64_C(c) c ## L
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define FLT32X_MANT_DIG 53
#define USER_LABEL_PREFIX
#define FLT64X_EPSILON 1.08420217248550443400745280086994171e-19F64x
#define STDC_HOSTED 1
#define DEC64_MIN_EXP (-382)
#define DBL_DIG 15
#define FLT32_DIG 6
#define FLT_EPSILON 1.19209289550781250000000000000000000e-7F
#define SHRT_WIDTH 16
#define FLT32_IS_IEC_60559 2
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
#define STDC_UTF_16 1
#define DBL_IS_IEC_60559 2
#define DEC32_MAX 9.999999E96DF
#define FLT64X_DENORM_MIN 3.64519953188247460252840593361941982e-4951F64x
#define FLT32X_HAS_INFINITY 1
#define INT32_MAX 0x7fffffff
#define unix 1
#define INT_WIDTH 32
#define SIZEOF_LONG 8
#define STDC_IEC_559 1
#define STDC_ISO_10646 201706L
#define __UINT16_C(c) c
#define DECIMAL_DIG 21
#define STDC_IEC_559_COMPLEX 1
#define FLT64_EPSILON 2.22044604925031308084726333618164062e-16F64
#define gnu_linux 1
#define FLT128_IS_IEC_60559 2
#define FLT64X_MIN_10_EXP (-4931)
#define LDBL_HAS_QUIET_NAN 1
#define FLT64_MANT_DIG 53
#define FLT64X_MANT_DIG 64
#define GNUC 11
#define pie 2
#define MMX 1
#define FLT_HAS_DENORM 1
#define SIZEOF_LONG_DOUBLE 16
#define BIGGEST_ALIGNMENT 16
#define FLT64_MAX_10_EXP 308
#define DBL_MAX ((double)1.79769313486231570814527423731704357e+308L)
#define INT_FAST32_MAX 0x7fffffffffffffffL
#define DBL_HAS_INFINITY 1
#define SIZEOF_FLOAT 4
#define __HAVE_SPECULATION_SAFE_VALUE 1
#define DEC32_MIN_EXP (-94)
#define INTPTR_WIDTH 64
#define FLT64X_HAS_INFINITY 1
#define UINT_LEAST32_MAX 0xffffffffU
#define FLT32X_HAS_DENORM 1
#define INT_FAST16_TYPE long int
#define MMX_WITH_SSE 1
#define LDBL_HAS_DENORM 1
#define FLT128_HAS_INFINITY 1
#define DEC32_MIN 1E-95DF
#define DBL_MAX_EXP 1024
#define WCHAR_WIDTH 32
#define FLT32_MAX 3.40282346638528859811704183484516925e+38F32
#define DEC128_EPSILON 1E-33DL
#define SSE2_MATH 1
#define __ATOMIC_HLE_RELEASE 131072
#define PTRDIFF_MAX 0x7fffffffffffffffL
#define __amd64 1
#define __ATOMIC_HLE_ACQUIRE 65536
#define LONG_LONG_MAX 0x7fffffffffffffffLL
#define SIZEOF_SIZE_T 8
#define FLT64X_MIN_EXP (-16381)
#define SIZEOF_WINT_T 4
#define LONG_LONG_WIDTH 64
#define FLT32_MAX_EXP 128
#define __GXX_ABI_VERSION 1016
#define FLT_MIN_EXP (-125)
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define INT16_MAX 0x7fff
#define __x86_64 1
#define INT_FAST64_TYPE long int
#define FLT64_DENORM_MIN 4.94065645841246544176568792868221372e-324F64
#define DBL_MIN ((double)2.22507385850720138309023271733240406e-308L)
#define FLT128_EPSILON 1.92592994438723585305597794258492732e-34F128
#define FLT64X_NORM_MAX 1.18973149535723176502126385303097021e+4932F64x
#define SIZEOF_POINTER 8
#define LP64 1
#define DBL_HAS_QUIET_NAN 1
#define FLT32X_EPSILON 2.22044604925031308084726333618164062e-16F32x
#define DECIMAL_BID_FORMAT 1
#define FLT64_MIN_EXP (-1021)
#define FLT64_MIN_10_EXP (-307)
#define FLT64X_DECIMAL_DIG 21
#define DEC128_MIN 1E-6143DL
#define REGISTER_PREFIX
#define UINT16_MAX 0xffff
#define DBL_HAS_DENORM 1
#define LDBL_HAS_INFINITY 1
#define FLT32_MIN 1.17549435082228750796873653722224568e-38F32
#define UINT8_TYPE unsigned char
#define FLT_DIG 6
#define NO_INLINE 1
#define DEC_EVAL_METHOD 2
#define DEC128_MAX 9.999999999999999999999999999999999E6144DL
#define FLT_MANT_DIG 24
#define LDBL_DECIMAL_DIG 21
#define VERSION "11.3.0"
#define __UINT64_C(c) c ## UL
#define _STDC_PREDEF_H 1
#define INT_LEAST32_MAX 0x7fffffff
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define FLT128_MAX_EXP 16384
#define FLT32_MANT_DIG 24
#define FLOAT_WORD_ORDER ORDER_LITTLE_ENDIAN
#define STDC_IEC_60559_COMPLEX 201404L
#define FLT128_HAS_DENORM 1
#define FLT32_DECIMAL_DIG 9
#define FLT128_DIG 33
#define __INT32_C(c) c
#define DEC64_EPSILON 1E-15DD
#define ORDER_PDP_ENDIAN 3412
#define DEC128_MIN_EXP (-6142)
#define INT_FAST32_TYPE long int
#define UINT_LEAST16_TYPE short unsigned int
#define unix 1
#define SIZE_TYPE long unsigned int
#define UINT64_MAX 0xffffffffffffffffUL
#define FLT_IS_IEC_60559 2
#define __GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
#define FLT64X_DIG 18
#define INT8_TYPE signed char
#define ELF 1
#define GCC_ASM_FLAG_OUTPUTS 1
#define UINT32_TYPE unsigned int
#define FLT_RADIX 2
#define INT_LEAST16_TYPE short int
#define LDBL_EPSILON 1.08420217248550443400745280086994171e-19L
#define __UINTMAX_C(c) c ## UL
#define SSE_MATH 1
#define __k8 1
#define FLT32X_MIN 2.22507385850720138309023271733240406e-308F32x
#define SIG_ATOMIC_MAX 0x7fffffff
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define STDC_IEC_60559_BFP 201404L
#define SIZEOF_PTRDIFF_T 8
#define LDBL_DIG 18
#define FLT64_IS_IEC_60559 2
#define x86_64 1
#define FLT32X_MIN_EXP (-1021)
#define DEC32_SUBNORMAL_MIN 0.000001E-95DF
#define INT_FAST16_MAX 0x7fffffffffffffffL
#define FLT64_DIG 15
#define UINT_FAST32_MAX 0xffffffffffffffffUL
#define UINT_LEAST64_TYPE long unsigned int
#define FLT_HAS_QUIET_NAN 1
#define FLT_MAX_10_EXP 38
#define LONG_MAX 0x7fffffffffffffffL
#define FLT64X_HAS_DENORM 1
#define DEC128_SUBNORMAL_MIN 0.000000000000000000000000000000001E-6143DL
#define FLT_HAS_INFINITY 1
#define __GNUC_EXECUTION_CHARSET_NAME "UTF-8"
#define UINT_FAST16_TYPE long unsigned int
#define DEC64_MAX 9.999999999999999E384DD
#define INT_FAST32_WIDTH 64
#define CHAR16_TYPE short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define SIZE_WIDTH 64
#define __SEG_FS 1
#define INT_LEAST16_MAX 0x7fff
#define DEC64_MANT_DIG 16
#define INT64_MAX 0x7fffffffffffffffL
#define __SEG_GS 1
#define FLT32_DENORM_MIN 1.40129846432481707092372958328991613e-45F32
#define SIG_ATOMIC_WIDTH 32
#define INT_LEAST64_TYPE long int
#define INT16_TYPE short int
#define INT_LEAST8_TYPE signed char
#define STDC_VERSION 201710L
#define SIZEOF_INT 4
#define DEC32_MAX_EXP 97
#define INT_FAST8_MAX 0x7f
#define FLT128_MAX 1.18973149535723176508575932662800702e+4932F128
#define INTPTR_MAX 0x7fffffffffffffffL
#define linux 1
#define FLT64_HAS_QUIET_NAN 1
#define FLT32_MIN_10_EXP (-37)
#define FLT32X_DIG 15
#define PTRDIFF_WIDTH 64
#define LDBL_MANT_DIG 64
#define FLT64_HAS_INFINITY 1
#define FLT64X_MAX 1.18973149535723176502126385303097021e+4932F64x
#define SIG_ATOMIC_MIN (-SIG_ATOMIC_MAX - 1)
#define code_model_small 1
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define DEC32_MANT_DIG 7
#define k8 1
#define INTPTR_TYPE long int
#define UINT16_TYPE short unsigned int
#define WCHAR_TYPE int
#define pic 2
#define UINTPTR_MAX 0xffffffffffffffffUL
#define INT_FAST64_WIDTH 64
#define INT_FAST64_MAX 0x7fffffffffffffffL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define FLT_NORM_MAX 3.40282346638528859811704183484516925e+38F
#define FLT32_HAS_INFINITY 1
#define FLT64X_MAX_EXP 16384
#define UINT_FAST64_TYPE long unsigned int
#define INT_MAX 0x7fffffff
#define linux 1
#define INT64_TYPE long int
#define FLT_MAX_EXP 128
#define ORDER_BIG_ENDIAN 4321
#define DBL_MANT_DIG 53
#define SIZEOF_FLOAT128 16
#define INT_LEAST64_MAX 0x7fffffffffffffffL
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define DEC64_MIN 1E-383DD
#define WINT_TYPE unsigned int
#define UINT_LEAST32_TYPE unsigned int
#define SIZEOF_SHORT 2
#define FLT32_NORM_MAX 3.40282346638528859811704183484516925e+38F32
#define SSE 1
#define LDBL_MIN_EXP (-16381)
#define FLT64_MAX 1.79769313486231570814527423731704357e+308F64
#define amd64 1
#define WINT_WIDTH 32
#define INT_LEAST8_MAX 0x7f
#define INT_LEAST64_WIDTH 64
#define LDBL_MAX_EXP 16384
#define FLT32X_MAX_10_EXP 308
#define SIZEOF_INT128 16
#define FLT64X_IS_IEC_60559 2
#define LDBL_MAX_10_EXP 4932
#define __ATOMIC_RELAXED 0
#define DBL_EPSILON ((double)2.22044604925031308084726333618164062e-16L)
#define FLT128_MIN 3.36210314311209350626267781732175260e-4932F128
#define _LP64 1
#define __UINT8_C(c) c
#define FLT64_MAX_EXP 1024
#define INT_LEAST32_TYPE int
#define SIZEOF_WCHAR_T 4
#define UINT64_TYPE long unsigned int
#define GNUC_PATCHLEVEL 0
#define FLT128_NORM_MAX 1.18973149535723176508575932662800702e+4932F128
#define FLT64_NORM_MAX 1.79769313486231570814527423731704357e+308F64
#define FLT128_HAS_QUIET_NAN 1
#define INTMAX_MAX 0x7fffffffffffffffL
#define INT_FAST8_TYPE signed char
#define FLT64X_MIN 3.36210314311209350626267781732175260e-4932F64x
#define GNUC_STDC_INLINE 1
#define FLT64_HAS_DENORM 1
#define FLT32_EPSILON 1.19209289550781250000000000000000000e-7F32
#define DBL_DECIMAL_DIG 17
#define STDC_UTF_32 1
#define INT_FAST8_WIDTH 8
#define FXSR 1
#define FLT32X_MAX 1.79769313486231570814527423731704357e+308F32x
#define DBL_NORM_MAX ((double)1.79769313486231570814527423731704357e+308L)
#define BYTE_ORDER ORDER_LITTLE_ENDIAN
#define INTMAX_WIDTH 64
#define __UINT32_C(c) c ## U
#define FLT_DENORM_MIN 1.40129846432481707092372958328991613e-45F
#define INT8_MAX 0x7f
#define LONG_WIDTH 64
#define PIC 2
#define UINT_FAST32_TYPE long unsigned int
#define FLT32X_NORM_MAX 1.79769313486231570814527423731704357e+308F32x
#define CHAR32_TYPE unsigned int
#define FLT_MAX 3.40282346638528859811704183484516925e+38F
#define SSE2 1
#define INT32_TYPE int
#define SIZEOF_DOUBLE 8
#define FLT_MIN_10_EXP (-37)
#define FLT64_MIN 2.22507385850720138309023271733240406e-308F64
#define INT_LEAST32_WIDTH 32
#define INTMAX_TYPE long int
#define DEC128_MAX_EXP 6145
#define FLT32X_HAS_QUIET_NAN 1
#define __ATOMIC_CONSUME 1
#define GNUC_MINOR 3
#define INT_FAST16_WIDTH 64
#define UINTMAX_MAX 0xffffffffffffffffUL
#define PIE 2
#define FLT32X_DENORM_MIN 4.94065645841246544176568792868221372e-324F32x
#define DBL_MAX_10_EXP 308
#define LDBL_DENORM_MIN 3.64519953188247460252840593361941982e-4951L
#define __INT16_C(c) c
#define STDC 1
#define PTRDIFF_TYPE long int
#define __ATOMIC_SEQ_CST 5
#define FLT32X_MIN_10_EXP (-307)
#define UINTPTR_TYPE long unsigned int
#define DEC64_SUBNORMAL_MIN 0.000000000000001E-383DD
#define DEC128_MANT_DIG 34
#define LDBL_MIN_10_EXP (-4931)
#define SIZEOF_LONG_LONG 8
#define FLT128_DECIMAL_DIG 36
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define FLT32_HAS_QUIET_NAN 1
#define FLT_DECIMAL_DIG 9
#define UINT_FAST16_MAX 0xffffffffffffffffUL
#define LDBL_NORM_MAX 1.18973149535723176502126385303097021e+4932L
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define UINT_FAST8_TYPE unsigned char
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3
Can you please run the following commands? These commands look for the string SO_TIMESTAMPNS
in all socket.h and types.h files under /usr/include.
cd /usr/include
find ./ -name socket.h -print0 | xargs -0 grep SO_TIMESTAMPNS
find ./ -name types.h -print0 | xargs -0 grep SO_TIMESTAMPNS
Should I run the commands having fping 5.1 installed or it doesn't matter? I have on the server running with version 4.2-1 because it is production server.
Just run it, fping does not need to be installed
root@server:~# cd /usr/include
root@server:/usr/include# find ./ -name socket.h -print0 | xargs -0 grep SO_TIMESTAMPNS
./asm-generic/socket.h:#define SO_TIMESTAMPNS_OLD 35
./asm-generic/socket.h:#define SO_TIMESTAMPNS_NEW 64
./asm-generic/socket.h:#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
./asm-generic/socket.h:#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
./asm-generic/socket.h:#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
root@server:/usr/include# find ./ -name types.h -print0 | xargs -0 grep SO_TIMESTAMPNS
root@server:/usr/include#
The better "really user-friendly" UX here, given that SO_TIMESTAMP* often require privileges not available (containers, outdated security module/syscall filters configuration, etc) would be to detect which one can be used at runtime, if any, and just do it. And be silent about it unless in debug or very-verbose mode, I guess...
I wanted to run fping inside of my Docker container and I get the same permission issue. I don't have enough unix-fu to know which permission or capability to give my Docker container to use SO_TIMESTAMP*
.
I still have the same problem even if I download the latest fixed version!
Could you help, please?
Hi @sergiossl,
could you describe the problem in more detail, perhaps copy & paste the output of fping
from the terminal?
The original report comprises two issues:
- There are error messages pertaining to the socket option
SO_TIMESTAMPNS
. - The target host is reported as
unreachable
although it is reachable.
The first issue was addressed in the development version of fping
(but not yet in an fping
release) via pull request #279, in that now a fallback to SO_TIMESTAMP
is tried if using SO_TIMESTAMPNS
fails, and a slightly different error message is produced only if both fail. As such I would at least expect there to be a different error message instead of exactly the same problem. It is also important to know if fping
gives a wrong result, i.e., reports a reachable target as unreachable.
(Please note that I do not have Windows and thus cannot reproduce the problem(s), neither can I verify any potential fixes.)
Thanks,
Erik
@sergiossl Please open a separate issue and describe the problem. I am closing this one as fixed since #279 has been merged.